diff --git a/server/gameserver/constant.h b/server/gameserver/constant.h index b0f8d79..b135255 100755 --- a/server/gameserver/constant.h +++ b/server/gameserver/constant.h @@ -168,7 +168,8 @@ enum SkillTarget_e ST_EnemySingle = 6, ST_EnemyGroup = 7, ST_EnemyAndObject = 8, - ST_EnemyAndSelf = 9 + ST_EnemyAndSelf = 9, + ST_SingleEnemyAndSelf = 10 }; enum BuffTriggerType_e diff --git a/server/gameserver/human.cc b/server/gameserver/human.cc index 2efc17d..2e09b2e 100644 --- a/server/gameserver/human.cc +++ b/server/gameserver/human.cc @@ -1789,6 +1789,7 @@ void Human::SelectSkillTargets(const a8::Vec2& target_pos, std::set& ta break; case ST_FriendlyIncludeSelf: { + target_list.insert(this); for (auto& cell : grid_list) { for (Human* hum : cell->human_list) { if ((hum == this || hum->team_id == team_id) && @@ -1858,6 +1859,20 @@ void Human::SelectSkillTargets(const a8::Vec2& target_pos, std::set& ta } } break; + case ST_SingleEnemyAndSelf: + { + Entity* entity = room->GetEntityByUniId(skill_target_id); + if (entity && entity->entity_type == ET_Player) { + Human* hum = (Human*)entity; + if (hum->team_id != team_id) { + target_list.insert(hum); + } + } + target_list.insert(this); + } + break; + default: + break; } }