[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

+2 -15
View File
@@ -3214,12 +3214,12 @@ void Mob::ExecWeaponProc(const EQ::ItemInstance *inst, uint16 spell_id, Mob *on,
if (IsBeneficialSpell(spell_id) && (!IsNPC() || (IsNPC() && CastToNPC()->GetInnateProcSpellID() != spell_id))) { // NPC innate procs don't take this path ever
SpellFinished(spell_id, this, EQ::spells::CastingSlot::Item, 0, -1, spells[spell_id].ResistDiff, true, level_override);
if(twinproc)
SpellOnTarget(spell_id, this, false, false, 0, true, level_override);
SpellOnTarget(spell_id, this, 0, false, 0, true, level_override);
}
else if(!(on->IsClient() && on->CastToClient()->dead)) { //dont proc on dead clients
SpellFinished(spell_id, on, EQ::spells::CastingSlot::Item, 0, -1, spells[spell_id].ResistDiff, true, level_override);
if(twinproc)
SpellOnTarget(spell_id, on, false, false, 0, true, level_override);
SpellOnTarget(spell_id, on, 0, false, 0, true, level_override);
}
return;
}
@@ -4596,19 +4596,6 @@ bool Mob::TryDoubleMeleeRoundEffect() {
return false;
}
bool Mob::TryReflectSpell(uint32 spell_id)
{
if (!spells[spell_id].reflectable)
return false;
int chance = itembonuses.reflect_chance + spellbonuses.reflect_chance + aabonuses.reflect_chance;
if(chance && zone->random.Roll(chance))
return true;
return false;
}
void Mob::DoGravityEffect()
{
Mob *caster = nullptr;