Core/Entities: killed Creature::SetInCombatWithZone and replaced with AI version

Closes #12108 (again)

(cherry picked from commit 7c9722a4ae08b5f283f6a085a411e37604a7da9f)
This commit is contained in:
ariel-
2021-06-16 21:03:06 +02:00
committed by Shauren
parent 29bfa32fc3
commit c77925da4a
33 changed files with 60 additions and 95 deletions
@@ -1005,7 +1005,9 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
{
if (IsCreature(target))
{
target->ToCreature()->SetInCombatWithZone();
Creature* creature = target->ToCreature();
if (creature->IsAIEnabled)
creature->AI()->DoZoneInCombat();
TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction: SMART_ACTION_SET_IN_COMBAT_WITH_ZONE: Creature %s, target: %s", me->GetGUID().ToString().c_str(), target->GetGUID().ToString().c_str());
}
}