View Single Post
  #13  
Old 09-04-2008, 01:44 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Thumbs up

Code:
void Mob::SetInvisible(bool state)
{
    invisible = state;
    SendAppearancePacket(AT_Invis, invisible);
    // Invis breaks charms

    if ((this->GetPetType() == petCharmed) && invisible)
    {
        Mob* formerpet = this->GetPet();

        if(formerpet)
             formerpet->BuffFadeByEffect(SE_Charm);
    }
}
Always make sure a pointer is valid before using it.
Reply With Quote