Core/Entities: allow guardian pets to inherit spellmods

This commit is contained in:
ariel- authored and Aokromes committed 2017-05-07 06:06:34 +02:00
1 parent 6a7f15ecf4
commit 4eaa6b50b6
1 file changed
+2 -2
+2 -2
View File
@@ -13210,13 +13210,13 @@ Player* Unit::GetSpellModOwner() const
if (Player* player = const_cast<Unit*>(this)->ToPlayer())
return player;
if (IsPet() || IsTotem())
if (HasUnitTypeMask(UNIT_MASK_PET | UNIT_MASK_TOTEM | UNIT_MASK_GUARDIAN))
{
if (Unit* owner = GetOwner())
if (Player* player = owner->ToPlayer())
return player;
}
return NULL;
return nullptr;
}
///----------Pet responses methods-----------------