Correct charm invis breaking

This commit is contained in:
Michael Cook (mackal) 2015-10-30 16:45:34 -04:00
parent ec36a3787d
commit 1dd911b150

View File

@ -503,13 +503,9 @@ void Mob::SetInvisible(uint8 state)
SendAppearancePacket(AT_Invis, invisible); SendAppearancePacket(AT_Invis, invisible);
// Invis and hide breaks charms // Invis and hide breaks charms
if ((this->GetPetType() == petCharmed) && (invisible || hidden || improved_hidden)) auto formerpet = GetPet();
{ if (formerpet && formerpet->GetPetType() == petCharmed && (invisible || hidden || improved_hidden))
Mob* formerpet = this->GetPet(); formerpet->BuffFadeByEffect(SE_Charm);
if(formerpet)
formerpet->BuffFadeByEffect(SE_Charm);
}
} }
//check to see if `this` is invisible to `other` //check to see if `this` is invisible to `other`