From 1dd911b150e4ece1f14ef40f8d6f878867c864ad Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Fri, 30 Oct 2015 16:45:34 -0400 Subject: [PATCH] Correct charm invis breaking --- zone/mob.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/zone/mob.cpp b/zone/mob.cpp index fc46aac75..82875d451 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -503,13 +503,9 @@ void Mob::SetInvisible(uint8 state) SendAppearancePacket(AT_Invis, invisible); // Invis and hide breaks charms - if ((this->GetPetType() == petCharmed) && (invisible || hidden || improved_hidden)) - { - Mob* formerpet = this->GetPet(); - - if(formerpet) - formerpet->BuffFadeByEffect(SE_Charm); - } + auto formerpet = GetPet(); + if (formerpet && formerpet->GetPetType() == petCharmed && (invisible || hidden || improved_hidden)) + formerpet->BuffFadeByEffect(SE_Charm); } //check to see if `this` is invisible to `other`