mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 17:19:07 +00:00
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user