[Bug Fix] Fix Using Bind Wound Above 70% Health (#4340)

* [Bug Fix] Fix Using Bind Wound Above 70% Health

* Update client.cpp

* Update client.cpp
This commit is contained in:
Alex King 2024-05-26 10:06:26 -04:00 committed by GitHub
parent 49957e3269
commit 316fa54bd8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3199,9 +3199,7 @@ bool Client::BindWound(Mob *bindmob, bool start, bool fail)
percent_base = 70;
}
int percent_bonus = 0;
if (percent_base >= 70)
percent_bonus = spellbonuses.MaxBindWound + itembonuses.MaxBindWound + aabonuses.MaxBindWound;
int percent_bonus = spellbonuses.MaxBindWound + itembonuses.MaxBindWound + aabonuses.MaxBindWound;
int max_percent = percent_base + percent_bonus;
if (max_percent < 0)
@ -3220,9 +3218,7 @@ bool Client::BindWound(Mob *bindmob, bool start, bool fail)
else if (GetSkill(EQ::skills::SkillBindWound) >= 12)
bindhps = GetSkill(EQ::skills::SkillBindWound) / 4; // 4:1 skill-to-hp ratio
int bonus_hp_percent = 0;
if (percent_base >= 70)
bonus_hp_percent = spellbonuses.BindWound + itembonuses.BindWound + aabonuses.BindWound;
int bonus_hp_percent = spellbonuses.BindWound + itembonuses.BindWound + aabonuses.BindWound;
bindhps += (bindhps * bonus_hp_percent) / 100;
@ -3237,9 +3233,9 @@ bool Client::BindWound(Mob *bindmob, bool start, bool fail)
bindmob->SendHPUpdate();
}
else {
Message(Chat::Yellow, "You cannot bind wounds above %d%% hitpoints", max_percent);
Message(Chat::Yellow, "You cannot bind wounds above %d%% hitpoints.", max_percent);
if (bindmob != this && bindmob->IsClient())
bindmob->CastToClient()->Message(Chat::Yellow, "You cannot have your wounds bound above %d%% hitpoints", max_percent);
bindmob->CastToClient()->Message(Chat::Yellow, "You cannot have your wounds bound above %d%% hitpoints.", max_percent);
}
}
}