mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-31 17:43:47 +00:00
fix(Scripts/ZulAman): Fix Amani Hatcher behaviour (#20687)
This commit is contained in:
@@ -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())
|
||||
|
||||
@@ -96,6 +96,8 @@ public:
|
||||
void Talk(uint8 id, WorldObject const* whisperTarget = nullptr, Milliseconds delay = 0s);
|
||||
void Talk(uint8 id, Milliseconds delay) { Talk(id, nullptr, delay); }
|
||||
|
||||
WorldObject* GetSummoner() const;
|
||||
|
||||
explicit CreatureAI(Creature* creature) : UnitAI(creature), me(creature), _boundary(nullptr), _negateBoundary(false), m_MoveInLineOfSight_locked(false) { }
|
||||
|
||||
~CreatureAI() override {}
|
||||
|
||||
Reference in New Issue
Block a user