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:
KayenEQ 2014-11-16 09:37:26 -05:00
parent fc48a109fd
commit 650aa566b0

View File

@ -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;
}