diff --git a/LuaFunctions.cpp b/LuaFunctions.cpp index cb8f5c1..95e3287 100644 --- a/LuaFunctions.cpp +++ b/LuaFunctions.cpp @@ -561,6 +561,7 @@ ElunaRegister PlayerMethods[] = { "IsInGroup", &LuaPlayer::IsInGroup }, { "IsInGuild", &LuaPlayer::IsInGuild }, { "IsGM", &LuaPlayer::IsGM }, + { "IsImmuneToDamage", &LuaPlayer::IsImmuneToDamage }, { "IsAlliance", &LuaPlayer::IsAlliance }, { "IsHorde", &LuaPlayer::IsHorde }, #ifndef CLASSIC diff --git a/PlayerMethods.h b/PlayerMethods.h index 3c9678b..1ad7491 100644 --- a/PlayerMethods.h +++ b/PlayerMethods.h @@ -429,6 +429,13 @@ namespace LuaPlayer } #endif + int IsImmuneToDamage(lua_State* L, Player* player) + { + Eluna::Push(L, player->isTotalImmune()); + + return 1; + } + /** * Returns 'true' if the [Player] satisfies all requirements to complete the quest entry. *