diff --git a/zone/bonuses.cpp b/zone/bonuses.cpp index 05c8760cc..13aa824bc 100644 --- a/zone/bonuses.cpp +++ b/zone/bonuses.cpp @@ -5001,6 +5001,7 @@ void Mob::NegateSpellEffectBonuses(uint16 spell_id) case SE_MaxHPChange: if (negate_spellbonus) { spellbonuses.MaxHPChange = effect_value; } if (negate_aabonus) { aabonuses.MaxHPChange = effect_value; } + if (negate_aabonus) { aabonuses.MaxHP = effect_value; } if (negate_itembonus) { itembonuses.MaxHPChange = effect_value; } break; diff --git a/zone/bot.cpp b/zone/bot.cpp index 0e0156a5c..bffadd22c 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -6235,11 +6235,10 @@ int64 Bot::CalcMaxHP() { uint32 nd = 10000; bot_hp += (GenerateBaseHitPoints() + itembonuses.HP); bot_hp += itembonuses.heroic_max_hp; - nd += aabonuses.MaxHP; + nd += aabonuses.MaxHP + spellbonuses.MaxHPChange + itembonuses.MaxHPChange; bot_hp = ((float)bot_hp * (float)nd / (float)10000); bot_hp += (spellbonuses.HP + aabonuses.HP); bot_hp += GroupLeadershipAAHealthEnhancement(); - bot_hp += (bot_hp * ((spellbonuses.MaxHPChange + itembonuses.MaxHPChange) / 10000.0f)); max_hp = bot_hp; if (current_hp > max_hp) current_hp = max_hp; diff --git a/zone/client_mods.cpp b/zone/client_mods.cpp index 61c383a7e..d69f83676 100644 --- a/zone/client_mods.cpp +++ b/zone/client_mods.cpp @@ -322,11 +322,12 @@ int64 Client::CalcMaxHP() //but the actual effect sent on live causes the client //to apply it to (basehp + itemhp).. I will oblige to the client's whims over //the aa description - nd += aabonuses.MaxHP; //Natural Durability, Physical Enhancement, Planar Durability + + nd += aabonuses.MaxHP + spellbonuses.MaxHPChange + itembonuses.MaxHPChange; //Natural Durability, Physical Enhancement, Planar Durability (MaxHP and MaxHPChange are SPA214) max_hp = (float)max_hp * (float)nd / (float)10000; //this is to fix the HP-above-495k issue max_hp += spellbonuses.HP + aabonuses.HP; + max_hp += GroupLeadershipAAHealthEnhancement(); - max_hp += max_hp * ((spellbonuses.MaxHPChange + itembonuses.MaxHPChange) / 10000.0f); if (current_hp > max_hp) { current_hp = max_hp; } diff --git a/zone/common.h b/zone/common.h index 547dd6e0d..57056d0d5 100644 --- a/zone/common.h +++ b/zone/common.h @@ -287,7 +287,7 @@ struct StatBonuses { int32 AC; int64 HP; int64 HPRegen; - int64 MaxHP; + int64 MaxHP; //same bonus as MaxHPChange when applied to spells and item bonuses int64 ManaRegen; int64 EnduranceRegen; int64 Mana; @@ -413,7 +413,7 @@ struct StatBonuses { int32 MeleeLifetap; //i int32 Vampirism; //i int32 HealRate; // Spell effect that influences effectiveness of heals - int32 MaxHPChange; // Spell Effect + int32 MaxHPChange; // percent change in hit points (aabonuses use variable MaxHP) int16 SkillDmgTaken[EQ::skills::HIGHEST_SKILL + 2]; // All Skills + -1 int32 HealAmt; // Item Effect int32 SpellDmg; // Item Effect diff --git a/zone/merc.cpp b/zone/merc.cpp index c1dcecb0b..c48282ca9 100644 --- a/zone/merc.cpp +++ b/zone/merc.cpp @@ -461,15 +461,13 @@ int64 Merc::CalcMaxHP() { //but the actual effect sent on live causes the client //to apply it to (basehp + itemhp).. I will oblige to the client's whims over //the aa description - nd += aabonuses.MaxHP; //Natural Durability, Physical Enhancement, Planar Durability + nd += aabonuses.MaxHP + spellbonuses.MaxHPChange + itembonuses.MaxHPChange; //Natural Durability, Physical Enhancement, Planar Durability max_hp = (float)max_hp * (float)nd / (float)10000; //this is to fix the HP-above-495k issue max_hp += spellbonuses.HP + aabonuses.HP; max_hp += GroupLeadershipAAHealthEnhancement(); - max_hp += max_hp * ((spellbonuses.MaxHPChange + itembonuses.MaxHPChange) / 10000.0f); - if (current_hp > max_hp) current_hp = max_hp;