mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-30 00:53:46 +00:00
feat(Core/GameObject): Expand IsSummonedBy() to GameObjects (#14789)
Co-authored-by: jackpoz <giacomopoz@gmail.com>
This commit is contained in:
@@ -387,9 +387,14 @@ public:
|
||||
int room;
|
||||
Unit* Gandling;
|
||||
|
||||
void IsSummonedBy(Unit* summoner) override
|
||||
void IsSummonedBy(WorldObject* summoner) override
|
||||
{
|
||||
Gandling = summoner;
|
||||
if (summoner->GetTypeId() != TYPEID_UNIT)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Gandling = summoner->ToCreature();
|
||||
if (instance)
|
||||
{
|
||||
room = Gandling->GetAI()->GetData(GANDLING_ROOM_TO_USE); // it's set just before my spawn
|
||||
|
||||
@@ -106,7 +106,7 @@ public:
|
||||
me->DespawnOrUnsummon(1);
|
||||
}
|
||||
|
||||
void IsSummonedBy(Unit* /*summoner*/) override
|
||||
void IsSummonedBy(WorldObject* /*summoner*/) override
|
||||
{
|
||||
events2.Reset();
|
||||
events2.ScheduleEvent(INTRO_1, 1000);
|
||||
|
||||
@@ -72,7 +72,7 @@ struct boss_kormok : public ScriptedAI
|
||||
_summons.DespawnAll();
|
||||
}
|
||||
|
||||
void IsSummonedBy(Unit* /*summoner*/) override
|
||||
void IsSummonedBy(WorldObject* /*summoner*/) override
|
||||
{
|
||||
Talk(TALK_SUMMON);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user