mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-22 12:18:27 +00:00
[Bug Fix] Fixed Invis vs Undead / Invis Vs Animals not breaking charm + Added rule for custom capabilities (#1374)
* Fixed Invis vs Undead / Invis Vs Animals not breaking charm Added rule for custom capabilities * Fix logging & remove comments * change logic * change logic * if (RuleB(Pets, LivelikeBreakCharmOnInvis) || IsInvisible(formerpet))
This commit is contained in:
+7
-3
@@ -549,10 +549,14 @@ void Mob::SetInvisible(uint8 state)
|
||||
invisible = state;
|
||||
SendAppearancePacket(AT_Invis, invisible);
|
||||
// Invis and hide breaks charms
|
||||
|
||||
auto formerpet = GetPet();
|
||||
if (formerpet && formerpet->GetPetType() == petCharmed && (invisible || hidden || improved_hidden))
|
||||
formerpet->BuffFadeByEffect(SE_Charm);
|
||||
if (formerpet && formerpet->GetPetType() == petCharmed && (invisible || hidden || improved_hidden || invisible_animals || invisible_undead)) {
|
||||
if (RuleB(Pets, LivelikeBreakCharmOnInvis) || IsInvisible(formerpet))
|
||||
formerpet->BuffFadeByEffect(SE_Charm);
|
||||
}
|
||||
|
||||
LogRules("Pets:LivelikeBreakCharmOnInvis for [{}] | Invis [{}] - Hidden [{}] - Shroud of Stealth [{}] - IVA [{}] - IVU [{}]", GetCleanName(), invisible, hidden, improved_hidden, invisible_animals, invisible_undead);
|
||||
}
|
||||
}
|
||||
|
||||
//check to see if `this` is invisible to `other`
|
||||
|
||||
Reference in New Issue
Block a user