Skip to content

Commit

Permalink
[Bug Fix] Revert 2df7d19 (#4101)
Browse files Browse the repository at this point in the history
* [Bug Fix] Revert 2df7d19
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 <[email protected]>
  • Loading branch information
joligario and fryguy503 authored Feb 20, 2024
1 parent dcfc54d commit a99ce4f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions zone/attack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit a99ce4f

Please sign in to comment.