fix(Scripts/ZulAman): Fix Amani Hatcher behaviour (#20687)

This commit is contained in:
Andrew
2024-11-24 07:56:18 -03:00
committed by GitHub
parent cbcee46a82
commit c5876bff6f
3 changed files with 61 additions and 9 deletions

View File

@@ -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())