[Lua] Add IsImmuneToSpell Lua Mod (#4278)

* Add IsImmuneToSpell lua mod

* Add lua_parser.h include in spells.cpp
This commit is contained in:
Xackery
2024-04-28 05:20:34 -07:00
committed by GitHub
parent e268ab18f5
commit 39bb7e1723
5 changed files with 76 additions and 0 deletions
+9
View File
@@ -1602,6 +1602,15 @@ uint64 LuaParser::HealDamage(Mob *self, Mob* caster, uint64 value, uint16 spell_
return retval;
}
bool LuaParser::IsImmuneToSpell(Mob *self, Mob *caster, uint16 spell_id, bool &ignore_default)
{
bool retval = false;
for (auto &mod : mods_) {
mod.IsImmuneToSpell(self, caster, spell_id, retval, ignore_default);
}
return retval;
}
int64 LuaParser::CalcSpellEffectValue_formula(Mob *self, uint32 formula, int64 base_value, int64 max_value, int caster_level, uint16 spell_id, int ticsremaining, bool &ignoreDefault)
{
int64 retval = 0;