Core/Scripts: Make CreatureAI::DoZoneInCombat overload accepting a different creature static
Port From (https://github.com/TrinityCore/TrinityCore/commit/080bf4c5650d54694819f6aaf7a12f3cbc623ef4)
This commit is contained in:
@@ -55,11 +55,10 @@ namespace Game.AI
|
|||||||
base.OnCharmed(isNew);
|
base.OnCharmed(isNew);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DoZoneInCombat(Creature creature = null)
|
public void DoZoneInCombat() { DoZoneInCombat(me); }
|
||||||
{
|
|
||||||
if (!creature)
|
|
||||||
creature = me;
|
|
||||||
|
|
||||||
|
public static void DoZoneInCombat(Creature creature)
|
||||||
|
{
|
||||||
Map map = creature.GetMap();
|
Map map = creature.GetMap();
|
||||||
if (!map.IsDungeon()) // use IsDungeon instead of Instanceable, in case Battlegrounds will be instantiated
|
if (!map.IsDungeon()) // use IsDungeon instead of Instanceable, in case Battlegrounds will be instantiated
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -771,7 +771,7 @@ namespace Game.AI
|
|||||||
Creature summon = ObjectAccessor.GetCreature(_me, id);
|
Creature summon = ObjectAccessor.GetCreature(_me, id);
|
||||||
if (summon && summon.IsAIEnabled() && (entry == 0 || summon.GetEntry() == entry))
|
if (summon && summon.IsAIEnabled() && (entry == 0 || summon.GetEntry() == entry))
|
||||||
{
|
{
|
||||||
summon.GetAI().DoZoneInCombat(null);
|
summon.GetAI().DoZoneInCombat();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user