mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 10:31:29 +00:00
[Bug Fix] Legacy Manaburn should have hard cap. (#3905)
Legacy Manaburn can crit, however normal or crit has same hard cap. Created a rule to better manage the cap for server owners.
This commit is contained in:
parent
7ddafd9ed8
commit
0aa07e9529
@ -471,6 +471,7 @@ RULE_BOOL(Spells, DOTBonusDamageSplitOverDuration, true, "Disable to have Damage
|
||||
RULE_BOOL(Spells, HOTBonusHealingSplitOverDuration, true, "Disable to have Heal Over Time total bonus healing added to each tick instead of divided across duration")
|
||||
RULE_BOOL(Spells, UseLegacyFizzleCode, false, "Enable will turn on the legacy fizzle code which is far stricter and more accurate to 2001/2002 testing.")
|
||||
RULE_BOOL(Spells, LegacyManaburn, false, "Enable to have the legacy manaburn system from 2003 and earlier.")
|
||||
RULE_INT(Spells, LegacyManaburnCap, 9492, "Adjusted the hard cap (Normal or Crit) for the Legacy Manaburn system. DEFAULT: 9492")
|
||||
RULE_BOOL(Spells, EvacClearAggroInSameZone, false, "Enable to clear aggro on clients when evacing in same zone.")
|
||||
RULE_BOOL(Spells, CharmAggroOverLevel, false, "Enabling this rule will cause Charm casts over level to show resisted and cause aggro. Early EQ style.")
|
||||
RULE_BOOL(Spells, RequireMnemonicRetention, true, "Enabling will require spell slots 9-12 to have the appropriate Mnemonic Retention AA learned.")
|
||||
|
||||
@ -60,6 +60,7 @@ int64 Mob::GetActSpellDamage(uint16 spell_id, int64 value, Mob* target) {
|
||||
bool Critical = false;
|
||||
int64 base_value = value;
|
||||
int chance = 0;
|
||||
int legacy_manaburn_cap = RuleI(Spells, LegacyManaburnCap);
|
||||
|
||||
// Need to scale HT damage differently after level 40! It no longer scales by the constant value in the spell file. It scales differently, instead of 10 more damage per level, it does 30 more damage per level. So we multiply the level minus 40 times 20 if they are over level 40.
|
||||
if ((spell_id == SPELL_HARM_TOUCH || spell_id == SPELL_HARM_TOUCH2 || spell_id == SPELL_IMP_HARM_TOUCH ) && GetLevel() > 40)
|
||||
@ -138,12 +139,20 @@ int64 Mob::GetActSpellDamage(uint16 spell_id, int64 value, Mob* target) {
|
||||
value -= GetExtraSpellAmt(spell_id, itembonuses.SpellDmg, base_value) * ratio / 100;
|
||||
}
|
||||
|
||||
// legacy manaburn can crit, but is still held to the same cap
|
||||
if (RuleB(Spells, LegacyManaburn) && spell_id == SPELL_MANA_BURN) {
|
||||
if (value < -legacy_manaburn_cap) {
|
||||
value = -legacy_manaburn_cap;
|
||||
}
|
||||
}
|
||||
|
||||
entity_list.FilteredMessageCloseString(
|
||||
this, true, 100, Chat::SpellCrit, FilterSpellCrits,
|
||||
OTHER_CRIT_BLAST, nullptr, GetName(), itoa(-value));
|
||||
|
||||
if (IsClient())
|
||||
if (IsClient()) {
|
||||
MessageString(Chat::SpellCrit, YOU_CRIT_BLAST, itoa(-value));
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
@ -183,6 +192,13 @@ int64 Mob::GetActSpellDamage(uint16 spell_id, int64 value, Mob* target) {
|
||||
value -= GetExtraSpellAmt(spell_id, GetSpellDmg(), base_value);
|
||||
}
|
||||
|
||||
// Apply Manaburn Damage Cap
|
||||
if (RuleB(Spells, LegacyManaburn) && spell_id == SPELL_MANA_BURN) {
|
||||
if (value < -legacy_manaburn_cap) {
|
||||
value = -legacy_manaburn_cap;
|
||||
}
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user