@@ -16681,11 +16681,29 @@ void Unit::TriggerAurasProcOnEvent(ProcEventInfo& eventInfo, std::list<AuraAppli
|
|||||||
Player* Unit::GetSpellModOwner() const
|
Player* Unit::GetSpellModOwner() const
|
||||||
{
|
{
|
||||||
if (Player* player = const_cast<Unit*>(this)->ToPlayer())
|
if (Player* player = const_cast<Unit*>(this)->ToPlayer())
|
||||||
|
{
|
||||||
return player;
|
return player;
|
||||||
|
}
|
||||||
|
|
||||||
if (Unit* owner = GetOwner())
|
if (Unit* owner = GetOwner())
|
||||||
|
{
|
||||||
if (Player* player = owner->ToPlayer())
|
if (Player* player = owner->ToPlayer())
|
||||||
|
{
|
||||||
return player;
|
return player;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Special handling for Eye of Kilrogg
|
||||||
|
if (GetEntry() == NPC_EYE_OF_KILROGG)
|
||||||
|
{
|
||||||
|
if (TempSummon const* tempSummon = ToTempSummon())
|
||||||
|
{
|
||||||
|
if (Unit* summoner = tempSummon->GetSummonerUnit())
|
||||||
|
{
|
||||||
|
return summoner->ToPlayer();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,7 +62,8 @@ enum WarlockSpells
|
|||||||
SPELL_WARLOCK_SIPHON_LIFE_HEAL = 63106,
|
SPELL_WARLOCK_SIPHON_LIFE_HEAL = 63106,
|
||||||
SPELL_WARLOCK_UNSTABLE_AFFLICTION_DISPEL = 31117,
|
SPELL_WARLOCK_UNSTABLE_AFFLICTION_DISPEL = 31117,
|
||||||
SPELL_WARLOCK_IMPROVED_DRAIN_SOUL_R1 = 18213,
|
SPELL_WARLOCK_IMPROVED_DRAIN_SOUL_R1 = 18213,
|
||||||
SPELL_WARLOCK_IMPROVED_DRAIN_SOUL_PROC = 18371
|
SPELL_WARLOCK_IMPROVED_DRAIN_SOUL_PROC = 18371,
|
||||||
|
SPELL_WARLOCK_EYE_OF_KILROGG_FLY = 58083
|
||||||
};
|
};
|
||||||
|
|
||||||
enum WarlockSpellIcons
|
enum WarlockSpellIcons
|
||||||
@@ -84,16 +85,15 @@ class spell_warl_eye_of_kilrogg : public AuraScript
|
|||||||
|
|
||||||
// Glyph of Kilrogg
|
// Glyph of Kilrogg
|
||||||
if (player->HasAura(58081))
|
if (player->HasAura(58081))
|
||||||
|
{
|
||||||
if (Unit* charm = player->GetCharm())
|
if (Unit* charm = player->GetCharm())
|
||||||
{
|
{
|
||||||
charm->SetSpeed(MOVE_RUN, 2.14f, true);
|
|
||||||
if (charm->GetMapId() == 530 || charm->GetMapId() == 571)
|
if (charm->GetMapId() == 530 || charm->GetMapId() == 571)
|
||||||
{
|
{
|
||||||
charm->SetCanFly(true);
|
charm->CastSpell(charm, SPELL_WARLOCK_EYE_OF_KILROGG_FLY, true);
|
||||||
charm->SetSpeed(MOVE_FLIGHT, 2.14f, true);
|
|
||||||
charm->SendMovementFlagUpdate();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user