mirror of
https://github.com/EQEmu/Server.git
synced 2026-10-08 01:13:35 +00:00
Fix for perl CastSpell function so it will use a spells innate resist diff
settings if no override value is put in the function. Due to recent changes in how we defined that variable it would set it to 0 resist diff by default when called from perl.
This commit is contained in:
1 parent
fc48a109fd
commit
650aa566b0
1 file changed
+4
-1
+4
-1
@@ -3971,7 +3971,10 @@ XS(XS_Mob_CastSpell)
|
||||
resist_adjust = (int16)SvIV(ST(6));
|
||||
}
|
||||
|
||||
THIS->CastSpell(spell_id, target_id, slot, casttime, mana_cost, 0, 0xFFFFFFFF, 0xFFFFFFFF, 0, 0, &resist_adjust);
|
||||
if (resist_adjust == 0)//If you do not pass resist adjust as nullptr it will ignore the spells default resist adjust
|
||||
THIS->CastSpell(spell_id, target_id, slot, casttime, mana_cost, 0, 0xFFFFFFFF, 0xFFFFFFFF, 0, 0);
|
||||
else
|
||||
THIS->CastSpell(spell_id, target_id, slot, casttime, mana_cost, 0, 0xFFFFFFFF, 0xFFFFFFFF, 0, 0, &resist_adjust);
|
||||
}
|
||||
XSRETURN_EMPTY;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user