mirror of
https://github.com/EQEmu/Server.git
synced 2026-01-02 22:03:52 +00:00
[Bots] Apply Spells:IgnoreSpellDmgLvlRestriction to bots (#2024)
* Correct bot spell damage and healing pathways to account for rule Spell:IgnoreSpellDmgLvlRestriction * Corrected to be more consistent in regard to the 'spells[spell_id].no_heal_damage_item_mod' modifier. This modifier doesn't seem to actually exist on any content, and bots didn't use it to begin with. This restriction is present on players - do we want it on bots also?
This commit is contained in:
parent
fd878e7b16
commit
ac214f71d4
30
zone/bot.cpp
30
zone/bot.cpp
@ -6734,8 +6734,8 @@ int32 Bot::GetActSpellDamage(uint16 spell_id, int32 value, Mob* target) {
|
||||
|
||||
value -= GetBotFocusEffect(focusFcDamageAmt, spell_id);
|
||||
value -= GetBotFocusEffect(focusFcDamageAmt2, spell_id);
|
||||
|
||||
if(itembonuses.SpellDmg && spells[spell_id].classes[(GetClass() % 17) - 1] >= GetLevel() - 5)
|
||||
|
||||
if ((RuleB(Spells, IgnoreSpellDmgLvlRestriction) || spells[spell_id].classes[(GetClass() % 17) - 1] >= GetLevel() - 5) && itembonuses.SpellDmg)
|
||||
value += (GetExtraSpellAmt(spell_id, itembonuses.SpellDmg, value) * ratio / 100);
|
||||
|
||||
entity_list.MessageClose(this, false, 100, Chat::SpellCrit, "%s delivers a critical blast! (%d)", GetName(), -value);
|
||||
@ -6756,7 +6756,8 @@ int32 Bot::GetActSpellDamage(uint16 spell_id, int32 value, Mob* target) {
|
||||
value -= GetBotFocusEffect(focusFcDamageAmtCrit, spell_id);
|
||||
value -= GetBotFocusEffect(focusFcDamageAmt, spell_id);
|
||||
value -= GetBotFocusEffect(focusFcDamageAmt2, spell_id);
|
||||
if(itembonuses.SpellDmg && spells[spell_id].classes[(GetClass() % 17) - 1] >= GetLevel() - 5)
|
||||
|
||||
if ((RuleB(Spells, IgnoreSpellDmgLvlRestriction) || spells[spell_id].classes[(GetClass() % 17) - 1] >= GetLevel() - 5) && itembonuses.SpellDmg)
|
||||
value += GetExtraSpellAmt(spell_id, itembonuses.SpellDmg, value);
|
||||
|
||||
return value;
|
||||
@ -6788,16 +6789,31 @@ int32 Bot::GetActSpellHealing(uint16 spell_id, int32 value, Mob* target) {
|
||||
value += (GetBotFocusEffect(focusFcHealAmtCrit, spell_id) * modifier);
|
||||
value += GetBotFocusEffect(focusFcHealAmt, spell_id);
|
||||
value += target->GetFocusIncoming(focusFcHealAmtIncoming, SE_FcHealAmtIncoming, this, spell_id);
|
||||
|
||||
if(itembonuses.HealAmt && spells[spell_id].classes[(GetClass() % 17) - 1] >= GetLevel() - 5)
|
||||
|
||||
//Using IgnoreSpellDmgLvlRestriction
|
||||
if ((RuleB(Spells, IgnoreSpellDmgLvlRestriction) || spells[spell_id].classes[(GetClass() % 17) - 1] >= GetLevel() - 5) && itembonuses.HealAmt)
|
||||
value += (GetExtraSpellAmt(spell_id, itembonuses.HealAmt, value) * modifier);
|
||||
|
||||
value += (value * target->GetHealRate() / 100);
|
||||
if (Critical)
|
||||
entity_list.MessageClose(this, false, 100, Chat::SpellCrit, "%s performs an exceptional heal! (%d)", GetName(), value);
|
||||
|
||||
return value;
|
||||
} else {
|
||||
} else {
|
||||
int32 extra_heal = 0;
|
||||
//Using IgnoreSpellDmgLvlRestriction to also allow healing to scale
|
||||
if (RuleB(Spells, HOTsScaleWithHealAmt)) {
|
||||
if ((RuleB(Spells, IgnoreSpellDmgLvlRestriction) || spells[spell_id].classes[(GetClass() % 17) - 1] >= GetLevel() - 5) && itembonuses.HealAmt)
|
||||
extra_heal += GetExtraSpellAmt(spell_id, itembonuses.HealAmt, value);
|
||||
}
|
||||
|
||||
if (extra_heal) {
|
||||
int duration = CalcBuffDuration(this, target, spell_id);
|
||||
if (duration > 0) {
|
||||
extra_heal /= duration;
|
||||
value += extra_heal;
|
||||
}
|
||||
}
|
||||
|
||||
chance = (itembonuses.CriticalHealOverTime + spellbonuses.CriticalHealOverTime + aabonuses.CriticalHealOverTime);
|
||||
chance += target->GetFocusIncoming(focusFcHealPctCritIncoming, SE_FcHealPctCritIncoming, this, spell_id);
|
||||
if (spellbonuses.CriticalRegenDecay)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user