aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Entities/Creature
diff options
context:
space:
mode:
authorariel- <ariel-@users.noreply.github.com>2018-01-22 15:00:55 -0300
committerShauren <shauren.trinity@gmail.com>2021-06-16 21:03:06 +0200
commitc77925da4a320df5be5eaeb1fc799df50e22c041 (patch)
tree3a574f41483c6c73b6bd10aa254d15bbc2a4501c /src/server/game/Entities/Creature
parent29bfa32fc39de1d93fbdb272d48689174c547725 (diff)
Core/Entities: killed Creature::SetInCombatWithZone and replaced with AI version
Closes #12108 (again) (cherry picked from commit 7c9722a4ae08b5f283f6a085a411e37604a7da9f)
Diffstat (limited to 'src/server/game/Entities/Creature')
-rw-r--r--src/server/game/Entities/Creature/Creature.cpp34
-rw-r--r--src/server/game/Entities/Creature/Creature.h2
2 files changed, 0 insertions, 36 deletions
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index 8261a795915..7efc494158c 100644
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -2756,40 +2756,6 @@ void Creature::SendZoneUnderAttackMessage(Player* attacker)
sWorld->SendGlobalMessage(packet.Write(), nullptr, (enemy_team == ALLIANCE ? HORDE : ALLIANCE));
}
-void Creature::SetInCombatWithZone()
-{
- if (!CanHaveThreatList())
- {
- TC_LOG_ERROR("entities.unit", "Creature entry %u call SetInCombatWithZone but creature cannot have threat list.", GetEntry());
- return;
- }
-
- Map* map = GetMap();
-
- if (!map->IsDungeon())
- {
- TC_LOG_ERROR("entities.unit", "Creature entry %u call SetInCombatWithZone for map (id: %u) that isn't an instance.", GetEntry(), map->GetId());
- return;
- }
-
- Map::PlayerList const& PlList = map->GetPlayers();
-
- if (PlList.isEmpty())
- return;
-
- for (Map::PlayerList::const_iterator i = PlList.begin(); i != PlList.end(); ++i)
- {
- if (Player* player = i->GetSource())
- {
- if (player->IsGameMaster())
- continue;
-
- if (player->IsAlive())
- EngageWithTarget(player);
- }
- }
-}
-
bool Creature::HasSpell(uint32 spellID) const
{
for (uint8 i = 0; i < MAX_CREATURE_SPELLS; ++i)
diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h
index 442a364d1a4..6e6b2c65424 100644
--- a/src/server/game/Entities/Creature/Creature.h
+++ b/src/server/game/Entities/Creature/Creature.h
@@ -275,8 +275,6 @@ class TC_GAME_API Creature : public Unit, public GridObject<Creature>, public Ma
void SendZoneUnderAttackMessage(Player* attacker);
- void SetInCombatWithZone();
-
bool hasQuest(uint32 quest_id) const override;
bool hasInvolvedQuest(uint32 quest_id) const override;