mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 13:28:25 +00:00
[Lua] Add IsImmuneToSpell Lua Mod (#4278)
* Add IsImmuneToSpell lua mod * Add lua_parser.h include in spells.cpp
This commit is contained in:
@@ -84,6 +84,7 @@ Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
|
||||
#include "string_ids.h"
|
||||
#include "worldserver.h"
|
||||
#include "fastmath.h"
|
||||
#include "lua_parser.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <algorithm>
|
||||
@@ -4958,6 +4959,16 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
|
||||
|
||||
LogSpells("Checking to see if we are immune to spell [{}] cast by [{}]", spell_id, caster->GetName());
|
||||
|
||||
#ifdef LUA_EQEMU
|
||||
bool is_immune = false;
|
||||
bool ignore_default = false;
|
||||
is_immune = LuaParser::Instance()->IsImmuneToSpell(this, caster, spell_id, ignore_default);
|
||||
|
||||
if (ignore_default) {
|
||||
return is_immune;
|
||||
}
|
||||
#endif
|
||||
|
||||
if(!IsValidSpell(spell_id))
|
||||
return true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user