EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Server Code Submissions (https://www.eqemulator.org/forums/forumdisplay.php?f=669)
-   -   Charm fade by invis (https://www.eqemulator.org/forums/showthread.php?t=26082)

Hugghiebear 09-05-2008 12:45 AM

I will make sure to check that further pointers are valid. I've edited this code and tested it without a pet, with an enchanter animation, and with a charmed pet. All work properly with no crashes now.

My thanks to Cavedude for catching the bug (as well as running TGC and PEQ... my son and I enjoy your server).


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);
    }
}



All times are GMT -4. The time now is 03:03 AM.

Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.