[9287] Prevent weapon skill grow at player's pet hit.

This commit is contained in:
VladimirMangos 2010-02-02 23:58:11 +03:00
parent af3aced775
commit 1f1f414d76
4 changed files with 11 additions and 2 deletions

View file

@ -8480,6 +8480,14 @@ Unit *Unit::GetCharmer() const
return NULL;
}
bool Unit::IsCharmerOrOwnerPlayerOrPlayerItself() const
{
if (GetTypeId()==TYPEID_PLAYER)
return true;
return IS_PLAYER_GUID(GetCharmerOrOwnerGUID());
}
Player* Unit::GetCharmerOrOwnerPlayerOrPlayerItself()
{
uint64 guid = GetCharmerOrOwnerGUID();