mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-13 15:08:22 +00:00
[Rules] Add DOT and HOT Rules (#3760)
* [Rules] Add DOT and HOT Rules # Notes - Add `Spells:DOTDamageBonusSplitOverDuration` rule. - Allows operators to disable the DOT bonus damage being split over duration and instead adds the full amount every tic. - Add `Spells:HOTBonusHealingSplitOverDuration` rule. - Allows operators to disable the HOT bonus healing being split over duration and instead adds the full amount every tic. * Update effects.cpp * Update effects.cpp
This commit is contained in:
+21
-13
@@ -285,10 +285,13 @@ int64 Mob::GetActDoTDamage(uint16 spell_id, int64 value, Mob* target, bool from_
|
||||
extra_dmg += GetSkillDmgAmt(spells[spell_id].skill) * ratio / 100;
|
||||
}
|
||||
|
||||
if (extra_dmg) {
|
||||
int duration = CalcBuffDuration(this, target, spell_id);
|
||||
if (duration > 0)
|
||||
extra_dmg /= duration;
|
||||
if (RuleB(Spells, DOTBonusDamageSplitOverDuration)) {
|
||||
if (extra_dmg) {
|
||||
const int duration = CalcBuffDuration(this, target, spell_id);
|
||||
if (duration > 0) {
|
||||
extra_dmg /= duration;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
value -= extra_dmg;
|
||||
@@ -328,10 +331,13 @@ int64 Mob::GetActDoTDamage(uint16 spell_id, int64 value, Mob* target, bool from_
|
||||
extra_dmg += GetSkillDmgAmt(spells[spell_id].skill);
|
||||
}
|
||||
|
||||
if (extra_dmg) {
|
||||
int duration = CalcBuffDuration(this, target, spell_id);
|
||||
if (duration > 0)
|
||||
extra_dmg /= duration;
|
||||
if (RuleB(Spells, DOTBonusDamageSplitOverDuration)) {
|
||||
if (extra_dmg) {
|
||||
const int duration = CalcBuffDuration(this, target, spell_id);
|
||||
if (duration > 0) {
|
||||
extra_dmg /= duration;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
value -= extra_dmg;
|
||||
@@ -517,11 +523,13 @@ int64 Mob::GetActSpellHealing(uint16 spell_id, int64 value, Mob* target, bool fr
|
||||
}
|
||||
}
|
||||
|
||||
if (extra_heal) {
|
||||
int duration = CalcBuffDuration(this, target, spell_id);
|
||||
if (duration > 0) {
|
||||
extra_heal /= duration;
|
||||
value += extra_heal;
|
||||
if (RuleB(Spells, HOTBonusHealingSplitOverDuration)) {
|
||||
if (extra_heal) {
|
||||
const int duration = CalcBuffDuration(this, target, spell_id);
|
||||
if (duration > 0) {
|
||||
extra_heal /= duration;
|
||||
value += extra_heal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user