mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
Implemented support for allowing most focus effects to now be usable
by NPCs (ie Heal/Damage focus, cast time, spell range ect) from both spell buffs and items. Rule for enabling spell focus is TRUE by default Rule for enabling item focus is FALSE by default. Consilidated a number of redundant client / mob functions to use the same pathway for calculating effect values.
This commit is contained in:
@@ -3050,6 +3050,13 @@ void NPC::CalcItemBonuses(StatBonuses *newbon)
|
||||
if (cur->Worn.Effect>0 && (cur->Worn.Type == ET_WornEffect)) { // latent effects
|
||||
ApplySpellsBonuses(cur->Worn.Effect, cur->Worn.Level, newbon);
|
||||
}
|
||||
|
||||
if (RuleB(Spells, NPC_UseFocusFromItems)){
|
||||
if (cur->Focus.Effect>0 && (cur->Focus.Type == ET_Focus)){ // focus effects
|
||||
ApplySpellsBonuses(cur->Focus.Effect, cur->Focus.Level, newbon, 0, true);
|
||||
}
|
||||
}
|
||||
|
||||
if (cur->Haste > newbon->haste)
|
||||
newbon->haste = cur->Haste;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user