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] Client not updating HP bar when an HP Buff with a Heal is applied. #4237

Merged
merged 2 commits into from
Apr 2, 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
10 changes: 10 additions & 0 deletions zone/spells.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4639,6 +4639,16 @@ bool Mob::SpellOnTarget(
safe_delete(action_packet);
safe_delete(message_packet);

/*
Bug: When an HP buff with a heal effect is applied for first time, the heal portion of the effect heals the client and
updates HPs currently server side, but client side the HP bar does not register it as a heal thus you display as less than full HP.
However due to server thinking your healed, you are unable to correct it by healing.
Solution: You need to resend the HP update after buff completed and action packet resent.
*/
if ((IsEffectInSpell(spell_id, SE_TotalHP) || IsEffectInSpell(spell_id, SE_MaxHPChange)) && (IsEffectInSpell(spell_id, SE_CurrentHPOnce) || IsEffectInSpell(spell_id, SE_CurrentHP))) {
SendHPUpdate(true);
}

LogSpells("Cast of [{}] by [{}] on [{}] complete successfully", spell_id, GetName(), spelltar->GetName());

return true;
Expand Down