[Spells] Update SPA158 Reflect (#1590)

* update

* updates

* updates

* update

* update

* Update ruletypes.h

* Apply extra spell dmg

Mob with the reflect effect apply its Extra Spell Damage from item stat to the reflected spell.
Updated portion of formula for extra damage based on live parsing.

* correct formula
This commit is contained in:
KayenEQ authored and GitHub committed 2021-10-12 15:30:36 -04:00
1 parent 91adf9c0eb
commit 6a962f2591
11 files changed
+164 -80

No files matched your search

+7 -2
View File
@@ -46,7 +46,7 @@ extern WorldServer worldserver;
// the spell can still fail here, if the buff can't stack
// in this case false will be returned, true otherwise
bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_override)
bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_override, int reflect_effectiveness)
{
int caster_level, buffslot, effect, effect_value, i;
EQ::ItemInstance *SummonedItem=nullptr;
@@ -259,7 +259,12 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
//handles AAs and what not...
if(caster) {
dmg = caster->GetActSpellDamage(spell_id, dmg, this);
if (reflect_effectiveness) {
dmg = caster->GetActReflectedSpellDamage(spell_id, (int32)(spells[spell_id].base[i] * partial / 100), reflect_effectiveness);
}
else {
dmg = caster->GetActSpellDamage(spell_id, dmg, this);
}
caster->ResourceTap(-dmg, spell_id);
}