mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 17:54:48 +01:00
Core/Scripts: Make CreatureAI::DoZoneInCombat overload accepting a different creature static
This commit is contained in:
@@ -78,11 +78,8 @@ void CreatureAI::OnCharmed(bool isNew)
|
||||
UnitAI::OnCharmed(isNew);
|
||||
}
|
||||
|
||||
void CreatureAI::DoZoneInCombat(Creature* creature /*= nullptr*/)
|
||||
void CreatureAI::DoZoneInCombat(Creature* creature)
|
||||
{
|
||||
if (!creature)
|
||||
creature = me;
|
||||
|
||||
Map* map = creature->GetMap();
|
||||
if (!map->IsDungeon()) // use IsDungeon instead of Instanceable, in case battlegrounds will be instantiated
|
||||
{
|
||||
|
||||
@@ -155,7 +155,8 @@ class TC_GAME_API CreatureAI : public UnitAI
|
||||
// Called at reaching home after evade
|
||||
virtual void JustReachedHome() { }
|
||||
|
||||
void DoZoneInCombat(Creature* creature = nullptr);
|
||||
void DoZoneInCombat() { DoZoneInCombat(me); }
|
||||
static void DoZoneInCombat(Creature* creature);
|
||||
|
||||
// Called at text emote receive from player
|
||||
virtual void ReceiveEmote(Player* /*player*/, uint32 /*emoteId*/) { }
|
||||
@@ -251,6 +252,8 @@ class TC_GAME_API CreatureAI : public UnitAI
|
||||
uint32 const _scriptId;
|
||||
bool _isEngaged;
|
||||
bool _moveInLOSLocked;
|
||||
|
||||
friend Scripting::v2::ScriptedAI;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user