diff --git a/Source/Game/AI/SmartScripts/SmartScript.cs b/Source/Game/AI/SmartScripts/SmartScript.cs index 90097ea67..24da0bf0d 100644 --- a/Source/Game/AI/SmartScripts/SmartScript.cs +++ b/Source/Game/AI/SmartScripts/SmartScript.cs @@ -928,7 +928,9 @@ namespace Game.AI { if (IsCreature(target)) { - _me.SetInCombatWithZone(); + Creature creature = target.ToCreature(); + if (creature.IsAIEnabled) + creature.GetAI().DoZoneInCombat(); Log.outDebug(LogFilter.ScriptsAi, $"SmartScript.ProcessAction: SMART_ACTION_SET_IN_COMBAT_WITH_ZONE: Creature: {_me.GetGUID()}, Target: {target.GetGUID()}"); } } diff --git a/Source/Game/Entities/Creature/Creature.cs b/Source/Game/Entities/Creature/Creature.cs index 9e908d717..828e75a29 100644 --- a/Source/Game/Entities/Creature/Creature.cs +++ b/Source/Game/Entities/Creature/Creature.cs @@ -2446,36 +2446,6 @@ namespace Game.Entities Global.WorldMgr.SendGlobalMessage(packet, null, (enemy_team == Team.Alliance ? Team.Horde : Team.Alliance)); } - public void SetInCombatWithZone() - { - if (!CanHaveThreatList()) - { - Log.outError(LogFilter.Unit, "Creature entry {0} call SetInCombatWithZone but creature cannot have threat list.", GetEntry()); - return; - } - - Map map = GetMap(); - - if (!map.IsDungeon()) - { - Log.outError(LogFilter.Unit, "Creature entry {0} call SetInCombatWithZone for map (id: {1}) that isn't an instance.", GetEntry(), map.GetId()); - return; - } - - var PlList = map.GetPlayers(); - if (PlList.Empty()) - return; - - foreach (var player in PlList) - { - if (player.IsGameMaster()) - continue; - - if (player.IsAlive()) - EngageWithTarget(player); - } - } - public override bool HasSpell(uint spellId) { for (byte i = 0; i < SharedConst.MaxCreatureSpells; ++i)