mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
[Bug Fix] DI/Death Pact Fix (#3867)
* [Bug Fix] DI/Death Pact Fix Divine Intervention/Death Pact buffs were always fading the moment a person dropped below 16% regardless if it healed or not. It will now only fade if it succeeds in healing, and it will only check to heal when a person drops below 16% * Requested Updates
This commit is contained in:
+4
-1
@@ -3810,6 +3810,8 @@ void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, cons
|
||||
|
||||
if (damage > 0) {
|
||||
//if there is some damage being done and theres an attacker involved
|
||||
int previous_hp_ratio = GetHPRatio();
|
||||
|
||||
if (attacker) {
|
||||
// if spell is lifetap add hp to the caster
|
||||
if (IsValidSpell(spell_id) && IsLifetapSpell(spell_id)) {
|
||||
@@ -4035,8 +4037,9 @@ void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, cons
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (GetHPRatio() < 16)
|
||||
if (GetHPRatio() < 16 && previous_hp_ratio >= 16) {
|
||||
TryDeathSave();
|
||||
}
|
||||
}
|
||||
|
||||
TryTriggerOnCastRequirement();
|
||||
|
||||
Reference in New Issue
Block a user