From a99ce4fbdb854cceeb96ec722a228a66cc006f32 Mon Sep 17 00:00:00 2001 From: JJ <3617814+joligario@users.noreply.github.com> Date: Mon, 19 Feb 2024 23:35:32 -0500 Subject: [PATCH] [Bug Fix] Revert 2df7d19 (#4101) * [Bug Fix] Revert https://github.com/EQEmu/Server/commit/2df7d19f975cb21dd4eb7d6c7d40656cf58ed138 This change breaks lich-type spells as seen in #4098. Per comment on original change, also don't see where Runes come into play. * Revert invis change * [Bug Fix] Correct Rune damage check location for invis break. Correct the location of the CommonBreakInvis for runes. Appologize for the incorrect location. Thank you JJ for pointing me to the PR that caused the issue. --------- Co-authored-by: Trust --- zone/attack.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/zone/attack.cpp b/zone/attack.cpp index 3581054bd..a276f4d85 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -4071,6 +4071,10 @@ void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, cons //see if any runes want to reduce this damage if (!IsValidSpell(spell_id)) { + if (IsClient()) { + CommonBreakInvisible(); + } + damage = ReduceDamage(damage); LogCombat("Melee Damage reduced to [{}]", damage); damage = ReduceAllDamage(damage); @@ -4102,8 +4106,9 @@ void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, cons TryTriggerThreshHold(damage, SE_TriggerSpellThreshold, attacker); } - if (IsClient()) { - CommonBreakInvisible(); + if (IsClient() && CastToClient()->sneaking) { + CastToClient()->sneaking = false; + SendAppearancePacket(AppearanceType::Sneak, 0); } if (attacker && attacker->IsClient() && attacker->CastToClient()->sneaking) {