[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 <fryguy503@gmail.com>
This commit is contained in:
JJ
2024-02-19 23:35:32 -05:00
committed by GitHub
parent dcfc54d408
commit a99ce4fbdb
+7 -2
View File
@@ -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) {