diff --git a/common/ruletypes.h b/common/ruletypes.h index f113834fa..400c5f30f 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -396,6 +396,7 @@ RULE_BOOL(Spells, UseAdditiveFocusFromWornSlot, false, "Allows an additive focus RULE_BOOL(Spells, AlwaysSendTargetsBuffs, false, "Ignore Leadership Alternate Abilities level if true") RULE_BOOL(Spells, FlatItemExtraSpellAmt, false, "Allow SpellDmg stat to affect all spells, regardless of cast time/cooldown/etc") RULE_BOOL(Spells, IgnoreSpellDmgLvlRestriction, false, "Ignore the 5 level spread on applying SpellDmg") +RULE_BOOL(Spells, ItemExtraSpellAmtCalcAsPercent, false, "Apply the Item stats Spell Dmg and Heal Amount as Percentage-based modifiers instead of flat additions") RULE_BOOL(Spells, AllowItemTGB, false, "Target group buff (/tgb) doesn't work with items on live, custom servers want it though") RULE_BOOL(Spells, NPCInnateProcOverride, true, "NPC innate procs override the target type to single target") RULE_BOOL(Spells, OldRainTargets, false, "Use old incorrectly implemented maximum targets for rains") diff --git a/zone/effects.cpp b/zone/effects.cpp index 86e2422ab..41b8ecd62 100644 --- a/zone/effects.cpp +++ b/zone/effects.cpp @@ -284,8 +284,12 @@ int32 Mob::GetActDoTDamage(uint16 spell_id, int32 value, Mob* target) { int32 Mob::GetExtraSpellAmt(uint16 spell_id, int32 extra_spell_amt, int32 base_spell_dmg) { - if (RuleB(Spells, FlatItemExtraSpellAmt)) - return extra_spell_amt; + if (RuleB(Spells, FlatItemExtraSpellAmt)) { + if (RuleB(Spells, ItemExtraSpellAmtCalcAsPercent)) + return abs(base_spell_dmg)*extra_spell_amt/100; + else + return extra_spell_amt; + } int total_cast_time = 0; @@ -306,6 +310,9 @@ int32 Mob::GetExtraSpellAmt(uint16 spell_id, int32 extra_spell_amt, int32 base_s extra_spell_amt = abs(base_spell_dmg) / 2; } + if (RuleB(Spells, ItemExtraSpellAmtCalcAsPercent)) + return abs(base_spell_dmg)*extra_spell_amt/100; + return extra_spell_amt; }