diff options
author | Andrew <47818697+Nyeriah@users.noreply.github.com> | 2024-11-24 07:56:18 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-24 07:56:18 -0300 |
commit | c5876bff6fff4a3465c9aab9294fb2086b97105e (patch) | |
tree | b22406780639092a57b9f6891dbfcd427a390fbc /src/server/game/AI/CreatureAI.cpp | |
parent | cbcee46a828de497c15588d987ff31ed50034d71 (diff) |
fix(Scripts/ZulAman): Fix Amani Hatcher behaviour (#20687)
Diffstat (limited to 'src/server/game/AI/CreatureAI.cpp')
-rw-r--r-- | src/server/game/AI/CreatureAI.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/server/game/AI/CreatureAI.cpp b/src/server/game/AI/CreatureAI.cpp index 17daed82d1..82d8279b3b 100644 --- a/src/server/game/AI/CreatureAI.cpp +++ b/src/server/game/AI/CreatureAI.cpp @@ -62,6 +62,17 @@ void CreatureAI::Talk(uint8 id, WorldObject const* target /*= nullptr*/, Millise } } +/** + * @brief Returns the summoner creature/object, if the creature is a temporary summon. + */ +WorldObject* CreatureAI::GetSummoner() const +{ + if (TempSummon* summon = me->ToTempSummon()) + return summon->GetSummoner(); + + return nullptr; +} + inline bool IsValidCombatTarget(Creature* source, Player* target) { if (target->IsGameMaster()) |