mirror of
https://github.com/EQEmu/Server.git
synced 2026-08-28 11:47:55 +00:00
Rule to apply Spell Dmg and Heal Amount stats as a percentage instead of flat value. (#2017)
* Apply Spell Dmg and Heal Amt stats as a percentage increase (1 SD\HA = 1% increase to spell effectiveness) instead of a flat addition. * Corrected logic to allow for coexistence of FlatItemExtraSpellAmt rule and this. * Adjusted rule name to be less ambiguous.
This commit is contained in:
+9
-2
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user