diff --git a/server/gameserver/creature.cc b/server/gameserver/creature.cc index f5b219d7..2a4db8b5 100644 --- a/server/gameserver/creature.cc +++ b/server/gameserver/creature.cc @@ -893,3 +893,17 @@ void Creature::ResetAction() action_target_id = 0; need_sync_active_player = true; } + +bool Creature::IsProperTarget(Creature* target) +{ + return true; +} + +bool Creature::IsEnemy(Creature* target) +{ + if (room->GetRoomMode() == kZombieMode) { + return target->GetRace() != GetRace(); + } else { + return team_id != target->team_id; + } +} diff --git a/server/gameserver/creature.h b/server/gameserver/creature.h index 69a1e2e2..5c0edce9 100644 --- a/server/gameserver/creature.h +++ b/server/gameserver/creature.h @@ -57,6 +57,8 @@ class Creature : public MoveableEntity void AddPassiveSkill(int skill_id); void ClearPassiveSkill(); + bool IsProperTarget(Creature* target); + bool IsEnemy(Creature* target); virtual void SelectSkillTargets(Skill* skill, const a8::Vec2& target_pos, std::set& target_list); diff --git a/server/gameserver/human.cc b/server/gameserver/human.cc index 48729883..f49d64db 100644 --- a/server/gameserver/human.cc +++ b/server/gameserver/human.cc @@ -2032,15 +2032,6 @@ void Human::WinExp(Human* sender, int exp) } } -bool Human::IsEnemy(Human* hum) -{ - if (room->GetRoomMode() == kZombieMode) { - return hum->GetRace() != GetRace(); - } else { - return team_id != hum->team_id; - } -} - RoomObstacle* Human::SummonObstacle(int id, const a8::Vec2& pos) { RoomObstacle* obstacle = room->CreateObstacle(id, pos.x, pos.y); diff --git a/server/gameserver/human.h b/server/gameserver/human.h index c39c0c1d..8921cb1b 100644 --- a/server/gameserver/human.h +++ b/server/gameserver/human.h @@ -247,7 +247,6 @@ class Human : public Creature int GetSeat() { return seat_; } void SetSeat(int seat) { seat_ = seat; } void DeadDrop(); - bool IsEnemy(Human* hum); RoomObstacle* SummonObstacle(int id, const a8::Vec2& pos); virtual std::string GetName() override { return name;};