mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 13:46:24 +00:00
feat(Core/GameObject): Expand IsSummonedBy() to GameObjects (#14789)
Co-authored-by: jackpoz <giacomopoz@gmail.com>
This commit is contained in:
@@ -352,8 +352,13 @@ public:
|
||||
bool JustSummoned;
|
||||
uint16 despawnTimer;
|
||||
|
||||
void IsSummonedBy(Unit* summoner) override
|
||||
void IsSummonedBy(WorldObject* summoner) override
|
||||
{
|
||||
if (summoner->GetTypeId() != TYPEID_UNIT)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_pInstance->GetBossState(DATA_EREGOS) == IN_PROGRESS)
|
||||
if (Creature* eregos = me->FindNearestCreature(NPC_EREGOS, 450.0f, true))
|
||||
eregos->DespawnOrUnsummon(); // On retail this kills abusive call of drake during engaged Eregos
|
||||
@@ -363,13 +368,13 @@ public:
|
||||
switch (me->GetEntry())
|
||||
{
|
||||
case NPC_RUBY_DRAKE:
|
||||
me->CastSpell(summoner, SPELL_RIDE_RUBY_DRAKE_QUE);
|
||||
me->CastSpell(summoner->ToUnit(), SPELL_RIDE_RUBY_DRAKE_QUE);
|
||||
break;
|
||||
case NPC_EMERALD_DRAKE:
|
||||
me->CastSpell(summoner, SPELL_RIDE_EMERALD_DRAKE_QUE);
|
||||
me->CastSpell(summoner->ToUnit(), SPELL_RIDE_EMERALD_DRAKE_QUE);
|
||||
break;
|
||||
case NPC_AMBER_DRAKE:
|
||||
me->CastSpell(summoner, SPELL_RIDE_AMBER_DRAKE_QUE);
|
||||
me->CastSpell(summoner->ToUnit(), SPELL_RIDE_AMBER_DRAKE_QUE);
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user