fix(Core/Spells): Fixed Glyph of Kilrogg. (#13802)

Fixes #13623
This commit is contained in:
UltraNix
2022-11-16 05:26:05 +01:00
committed by GitHub
parent a490a9ac31
commit ae84bf67c4
2 changed files with 23 additions and 5 deletions

View File

@@ -16681,11 +16681,29 @@ void Unit::TriggerAurasProcOnEvent(ProcEventInfo& eventInfo, std::list<AuraAppli
Player* Unit::GetSpellModOwner() const
{
if (Player* player = const_cast<Unit*>(this)->ToPlayer())
{
return player;
}
if (Unit* owner = GetOwner())
{
if (Player* player = owner->ToPlayer())
{
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;
}