Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Fix] Revert 2df7d19 #4101

Merged
merged 3 commits into from
Feb 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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