From de28e84617c850e5e31c19abf3b4ba069e58943b Mon Sep 17 00:00:00 2001 From: Foe Date: Wed, 7 Aug 2024 10:25:04 +0200 Subject: [PATCH] ElunaTemplate refactor (#492) * Merge the ElunaGlobal and the ElunaTemplate classes * Misc. refactoring of SetMethods and thunk to accommodate the merge * Clean up the method headers and remove no longer needed end of array entries * Add method names to output for wrong state and not implemented errors --- ElunaTemplate.h | 169 +++++++++------------- LuaFunctions.cpp | 2 +- methods/CMangos/AuraMethods.h | 4 +- methods/CMangos/BattleGroundMethods.h | 4 +- methods/CMangos/CorpseMethods.h | 4 +- methods/CMangos/CreatureMethods.h | 44 +++--- methods/CMangos/ElunaQueryMethods.h | 4 +- methods/CMangos/GameObjectMethods.h | 4 +- methods/CMangos/GlobalMethods.h | 6 +- methods/CMangos/GroupMethods.h | 12 +- methods/CMangos/GuildMethods.h | 8 +- methods/CMangos/ItemMethods.h | 18 +-- methods/CMangos/MapMethods.h | 8 +- methods/CMangos/ObjectMethods.h | 4 +- methods/CMangos/PlayerMethods.h | 116 ++++++++------- methods/CMangos/QuestMethods.h | 6 +- methods/CMangos/SpellMethods.h | 4 +- methods/CMangos/UnitMethods.h | 44 +++--- methods/CMangos/VehicleMethods.h | 4 +- methods/CMangos/WorldObjectMethods.h | 8 +- methods/CMangos/WorldPacketMethods.h | 4 +- methods/Mangos/AuraMethods.h | 4 +- methods/Mangos/BattleGroundMethods.h | 4 +- methods/Mangos/CorpseMethods.h | 4 +- methods/Mangos/CreatureMethods.h | 32 ++-- methods/Mangos/ElunaQueryMethods.h | 4 +- methods/Mangos/GameObjectMethods.h | 4 +- methods/Mangos/GlobalMethods.h | 12 +- methods/Mangos/GroupMethods.h | 12 +- methods/Mangos/GuildMethods.h | 4 +- methods/Mangos/ItemMethods.h | 18 +-- methods/Mangos/MapMethods.h | 8 +- methods/Mangos/ObjectMethods.h | 4 +- methods/Mangos/PlayerMethods.h | 120 ++++++++------- methods/Mangos/QuestMethods.h | 6 +- methods/Mangos/SpellMethods.h | 4 +- methods/Mangos/UnitMethods.h | 46 +++--- methods/Mangos/VehicleMethods.h | 4 +- methods/Mangos/WorldObjectMethods.h | 8 +- methods/Mangos/WorldPacketMethods.h | 4 +- methods/TrinityCore/AuraMethods.h | 4 +- methods/TrinityCore/BattleGroundMethods.h | 4 +- methods/TrinityCore/CorpseMethods.h | 4 +- methods/TrinityCore/CreatureMethods.h | 4 +- methods/TrinityCore/ElunaQueryMethods.h | 4 +- methods/TrinityCore/GameObjectMethods.h | 4 +- methods/TrinityCore/GlobalMethods.h | 6 +- methods/TrinityCore/GroupMethods.h | 4 +- methods/TrinityCore/GuildMethods.h | 4 +- methods/TrinityCore/ItemMethods.h | 4 +- methods/TrinityCore/MapMethods.h | 4 +- methods/TrinityCore/ObjectMethods.h | 4 +- methods/TrinityCore/PlayerMethods.h | 24 ++- methods/TrinityCore/QuestMethods.h | 4 +- methods/TrinityCore/SpellMethods.h | 4 +- methods/TrinityCore/UnitMethods.h | 4 +- methods/TrinityCore/VehicleMethods.h | 4 +- methods/TrinityCore/WorldObjectMethods.h | 4 +- methods/TrinityCore/WorldPacketMethods.h | 4 +- methods/VMangos/AuraMethods.h | 4 +- methods/VMangos/BattleGroundMethods.h | 4 +- methods/VMangos/CorpseMethods.h | 4 +- methods/VMangos/CreatureMethods.h | 30 ++-- methods/VMangos/ElunaQueryMethods.h | 4 +- methods/VMangos/GameObjectMethods.h | 4 +- methods/VMangos/GlobalMethods.h | 6 +- methods/VMangos/GroupMethods.h | 12 +- methods/VMangos/GuildMethods.h | 4 +- methods/VMangos/ItemMethods.h | 20 ++- methods/VMangos/MapMethods.h | 6 +- methods/VMangos/ObjectMethods.h | 4 +- methods/VMangos/PlayerMethods.h | 60 ++++---- methods/VMangos/QuestMethods.h | 4 +- methods/VMangos/SpellMethods.h | 4 +- methods/VMangos/UnitMethods.h | 30 ++-- methods/VMangos/VehicleMethods.h | 4 +- methods/VMangos/WorldObjectMethods.h | 4 +- methods/VMangos/WorldPacketMethods.h | 4 +- 78 files changed, 452 insertions(+), 637 deletions(-) diff --git a/ElunaTemplate.h b/ElunaTemplate.h index 0443e3a733..6a19eb560c 100644 --- a/ElunaTemplate.h +++ b/ElunaTemplate.h @@ -26,80 +26,6 @@ extern "C" #include "UniqueTrackablePtr.h" #endif -class ElunaGlobal -{ -public: - struct ElunaRegister - { - const char* name; - int(*func)(Eluna*); - MethodRegisterState regState = METHOD_REG_ALL; - }; - - static int thunk(lua_State* L) - { - ElunaRegister* l = static_cast(lua_touserdata(L, lua_upvalueindex(1))); - Eluna* E = static_cast(lua_touserdata(L, lua_upvalueindex(2))); - int top = lua_gettop(L); - int expected = l->func(E); - int args = lua_gettop(L) - top; - if (args < 0 || args > expected) - { - ELUNA_LOG_ERROR("[Eluna]: %s returned unexpected amount of arguments %i out of %i. Report to devs", l->name, args, expected); - ASSERT(false); - } - lua_settop(L, top + expected); - return expected; - } - - static void SetMethods(Eluna* E, ElunaRegister* methodTable) - { - ASSERT(E); - ASSERT(methodTable); - - lua_pushglobaltable(E->L); - - for (; methodTable && methodTable->name; ++methodTable) - { - lua_pushstring(E->L, methodTable->name); - - // if the method should not be registered, push a closure to error output function - if (methodTable->regState == METHOD_REG_NONE) - { - lua_pushcclosure(E->L, MethodUnimpl, 0); - lua_rawset(E->L, -3); - continue; - } - - // if we're in multistate mode, we need to check whether a method is flagged as a world or a map specific method - if (!E->GetCompatibilityMode() && methodTable->regState != METHOD_REG_ALL) - { - // if the method should not be registered, push a closure to error output function - if ((E->GetBoundMapId() == -1 && methodTable->regState == METHOD_REG_MAP) || - (E->GetBoundMapId() != -1 && methodTable->regState == METHOD_REG_WORLD)) - { - lua_pushcclosure(E->L, MethodWrongState, 0); - lua_rawset(E->L, -3); - continue; - } - } - - // push method table and Eluna object pointers as light user data - lua_pushlightuserdata(E->L, (void*)methodTable); - lua_pushlightuserdata(E->L, (void*)E); - - // push a closure to the thunk function with 2 upvalues (method table and Eluna object) - lua_pushcclosure(E->L, thunk, 2); - lua_rawset(E->L, -3); - } - - lua_remove(E->L, -1); - } - - static int MethodWrongState(lua_State* L) { luaL_error(L, "attempt to call a method that does not exist for state: %d", Eluna::GetEluna(L)->GetBoundMapId()); return 0; } - static int MethodUnimpl(lua_State* L) { luaL_error(L, "attempt to call a method that is not implemented for this emulator"); return 0; } -}; - class ElunaObject { public: @@ -226,15 +152,27 @@ MAKE_ELUNA_OBJECT_VALUE_IMPL(ObjectGuid); MAKE_ELUNA_OBJECT_VALUE_IMPL(WorldPacket); MAKE_ELUNA_OBJECT_VALUE_IMPL(ElunaQuery); -template +template struct ElunaRegister { const char* name; - int(*mfunc)(Eluna*, T*); - MethodRegisterState regState = METHOD_REG_ALL; + typename std::conditional, int(*)(Eluna*), int(*)(Eluna*, T*)>::type mfunc; + MethodRegisterState regState; + + // constructor for non-globals (with T*) + ElunaRegister(const char* name, int(*func)(Eluna*, T*), MethodRegisterState state = METHOD_REG_ALL) + : name(name), mfunc(func), regState(state) {} + + // constructor for globals (without T*) + ElunaRegister(const char* name, int(*func)(Eluna*), MethodRegisterState state = METHOD_REG_ALL) + : name(name), mfunc(func), regState(state) {} + + // constructor for nullptr functions and METHOD_REG_NONE (unimplemented methods) + ElunaRegister(const char* name, MethodRegisterState state = METHOD_REG_NONE) + : name(name), mfunc(nullptr), regState(state) {} }; -template +template class ElunaTemplate { public: @@ -260,7 +198,7 @@ class ElunaTemplate // create metatable for userdata of this type luaL_newmetatable(E->L, tname); - int metatable = lua_gettop(E->L); + int metatable = lua_gettop(E->L); // push methodtable to stack to be accessed and modified by users lua_pushvalue(E->L, metatable); @@ -339,47 +277,62 @@ class ElunaTemplate lua_pop(E->L, 1); } - template - static void SetMethods(Eluna* E, ElunaRegister* methodTable) + template + static void SetMethods(Eluna* E, ElunaRegister const (&methodTable)[N]) { ASSERT(E); - ASSERT(tname); ASSERT(methodTable); - // get metatable - lua_pushstring(E->L, tname); - lua_rawget(E->L, LUA_REGISTRYINDEX); - ASSERT(lua_istable(E->L, -1)); + // determine if the method table functions are global or non-global + constexpr bool isGlobal = std::is_same_v; + + if constexpr (isGlobal) + { + lua_pushglobaltable(E->L); + } + else + { + ASSERT(tname); + + // get metatable + lua_pushstring(E->L, tname); + lua_rawget(E->L, LUA_REGISTRYINDEX); + ASSERT(lua_istable(E->L, -1)); + } // load all core-specific methods - for (; methodTable && methodTable->name; ++methodTable) + for (std::size_t i = 0; i < N; i++) { + const auto& method = methodTable + i; + // push the method name to the Lua stack - lua_pushstring(E->L, methodTable->name); + lua_pushstring(E->L, method->name); // if the method should not be registered, push a closure to error output function - if (methodTable->regState == METHOD_REG_NONE) + if (method->regState == METHOD_REG_NONE) { - lua_pushcclosure(E->L, MethodUnimpl, 0); + lua_pushstring(E->L, method->name); + lua_pushcclosure(E->L, MethodUnimpl, 1); lua_rawset(E->L, -3); continue; } // if we're in multistate mode, we need to check whether a method is flagged as a world or a map specific method - if (!E->GetCompatibilityMode() && methodTable->regState != METHOD_REG_ALL) + if (!E->GetCompatibilityMode() && method->regState != METHOD_REG_ALL) { // if the method should not be registered, push a closure to error output function - if ((E->GetBoundMapId() == -1 && methodTable->regState == METHOD_REG_MAP) || - (E->GetBoundMapId() != -1 && methodTable->regState == METHOD_REG_WORLD)) + if ((E->GetBoundMapId() == -1 && method->regState == METHOD_REG_MAP) || + (E->GetBoundMapId() != -1 && method->regState == METHOD_REG_WORLD)) { - lua_pushcclosure(E->L, MethodWrongState, 0); + lua_pushstring(E->L, method->name); + lua_pushcclosure(E->L, MethodWrongState, 1); lua_rawset(E->L, -3); continue; } } // push method table and Eluna object pointers as light user data - lua_pushlightuserdata(E->L, (void*)methodTable); + lua_pushlightuserdata(E->L, (void*)method); lua_pushlightuserdata(E->L, (void*)E); // push a closure to the thunk function with 2 upvalues (method table and Eluna object) @@ -462,12 +415,26 @@ class ElunaTemplate ElunaRegister* l = static_cast*>(lua_touserdata(L, lua_upvalueindex(1))); Eluna* E = static_cast(lua_touserdata(L, lua_upvalueindex(2))); - T* obj = E->CHECKOBJ(1); // get self - if (!obj) - return 0; + // determine if the method table functions are global or non-global + constexpr bool isGlobal = std::is_same_v; + + // we only check self if the method is not a global + T* obj; + if constexpr (!isGlobal) + { + obj = E->CHECKOBJ(1); + if (!obj) + return 0; + } int top = lua_gettop(L); - int expected = l->mfunc(E, obj); + + int expected = 0; + if constexpr (isGlobal) + expected = l->mfunc(E); // global method + else + expected = l->mfunc(E, obj); // non-global method + int args = lua_gettop(L) - top; if (args < 0 || args > expected) { @@ -516,8 +483,8 @@ class ElunaTemplate static int LessOrEqual(lua_State* L) { return CompareError(L); } static int Call(lua_State* L) { return luaL_error(L, "attempt to call a %s value", tname); } - static int MethodWrongState(lua_State* L) { luaL_error(L, "attempt to call a method that does not exist for state: %d", Eluna::GetEluna(L)->GetBoundMapId()); return 0; } - static int MethodUnimpl(lua_State* L) { luaL_error(L, "attempt to call a method that is not implemented for this emulator"); return 0; } + static int MethodWrongState(lua_State* L) { luaL_error(L, "attempt to call method '%s' that does not exist for state: %d", lua_tostring(L, lua_upvalueindex(1)), Eluna::GetEluna(L)->GetBoundMapId()); return 0; } + static int MethodUnimpl(lua_State* L) { luaL_error(L, "attempt to call method '%s' that is not implemented for this emulator", lua_tostring(L, lua_upvalueindex(1))); return 0; } }; template const char* ElunaTemplate::tname = NULL; diff --git a/LuaFunctions.cpp b/LuaFunctions.cpp index 91d8d404f1..2590acd7d9 100644 --- a/LuaFunctions.cpp +++ b/LuaFunctions.cpp @@ -127,7 +127,7 @@ template<> int ElunaTemplate::ToString(lua_State* L) void RegisterFunctions(Eluna* E) { - ElunaGlobal::SetMethods(E, LuaGlobalFunctions::GlobalMethods); + ElunaTemplate<>::SetMethods(E, LuaGlobalFunctions::GlobalMethods); ElunaTemplate::Register(E, "Object"); ElunaTemplate::SetMethods(E, LuaObject::ObjectMethods); diff --git a/methods/CMangos/AuraMethods.h b/methods/CMangos/AuraMethods.h index e3a289e4d3..c7ab629a29 100644 --- a/methods/CMangos/AuraMethods.h +++ b/methods/CMangos/AuraMethods.h @@ -198,9 +198,7 @@ namespace LuaAura { "SetStackAmount", &LuaAura::SetStackAmount }, // Other - { "Remove", &LuaAura::Remove }, - - { NULL, NULL, METHOD_REG_NONE } + { "Remove", &LuaAura::Remove } }; }; #endif diff --git a/methods/CMangos/BattleGroundMethods.h b/methods/CMangos/BattleGroundMethods.h index a4373d5441..42920985d3 100644 --- a/methods/CMangos/BattleGroundMethods.h +++ b/methods/CMangos/BattleGroundMethods.h @@ -245,9 +245,7 @@ namespace LuaBattleGround { "GetMaxPlayersPerTeam", &LuaBattleGround::GetMaxPlayersPerTeam }, { "GetMinPlayersPerTeam", &LuaBattleGround::GetMinPlayersPerTeam }, { "GetWinner", &LuaBattleGround::GetWinner }, - { "GetStatus", &LuaBattleGround::GetStatus }, - - { NULL, NULL, METHOD_REG_NONE } + { "GetStatus", &LuaBattleGround::GetStatus } }; }; #endif diff --git a/methods/CMangos/CorpseMethods.h b/methods/CMangos/CorpseMethods.h index b4f4a94793..e263d04a0b 100644 --- a/methods/CMangos/CorpseMethods.h +++ b/methods/CMangos/CorpseMethods.h @@ -83,9 +83,7 @@ namespace LuaCorpse // Other { "ResetGhostTime", &LuaCorpse::ResetGhostTime }, - { "SaveToDB", &LuaCorpse::SaveToDB }, - - { NULL, NULL, METHOD_REG_NONE } + { "SaveToDB", &LuaCorpse::SaveToDB } }; }; #endif diff --git a/methods/CMangos/CreatureMethods.h b/methods/CMangos/CreatureMethods.h index 4f4d4dcf4b..f96db232e5 100644 --- a/methods/CMangos/CreatureMethods.h +++ b/methods/CMangos/CreatureMethods.h @@ -1222,7 +1222,7 @@ namespace LuaCreature #ifndef CATA { "GetShieldBlockValue", &LuaCreature::GetShieldBlockValue }, #else - { "GetShieldBlockValue", nullptr, METHOD_REG_NONE }, + { "GetShieldBlockValue", METHOD_REG_NONE }, #endif // Setters @@ -1243,7 +1243,7 @@ namespace LuaCreature #ifndef CATA { "SetDisableReputationGain", &LuaCreature::SetDisableReputationGain }, #else - { "SetDisableReputationGain", nullptr, METHOD_REG_NONE }, + { "SetDisableReputationGain", METHOD_REG_NONE }, #endif // Boolean @@ -1271,7 +1271,7 @@ namespace LuaCreature #ifndef CATA { "IsReputationGainDisabled", &LuaCreature::IsReputationGainDisabled }, #else - { "IsReputationGainDisabled", nullptr, METHOD_REG_NONE }, + { "IsReputationGainDisabled", METHOD_REG_NONE }, #endif // Other @@ -1291,26 +1291,24 @@ namespace LuaCreature { "RemoveFromWorld", &LuaCreature::RemoveFromWorld }, // Not implemented methods - { "GetWaypointPath", nullptr, METHOD_REG_NONE }, // TC/Acore - { "GetLootMode", nullptr, METHOD_REG_NONE }, // TC/Acore - { "SetRegeneratingHealth", nullptr, METHOD_REG_NONE }, // TC/Acore - { "SetLootMode", nullptr, METHOD_REG_NONE }, // TC/Acore - { "SetReactState", nullptr, METHOD_REG_NONE }, // TC/Acore - { "IsDungeonBoss", nullptr, METHOD_REG_NONE }, // TC/Acore - { "IsTrigger", nullptr, METHOD_REG_NONE }, // TC/Acore - { "CanStartAttack", nullptr, METHOD_REG_NONE }, // TC/Acore - { "IsDamageEnoughForLootingAndReward", nullptr, METHOD_REG_NONE }, // TC/Acore - { "HasLootMode", nullptr, METHOD_REG_NONE }, // TC/Acore - { "AddLootMode", nullptr, METHOD_REG_NONE }, // TC/Acore - { "ResetLootMode", nullptr, METHOD_REG_NONE }, // TC/Acore - { "RemoveLootMode", nullptr, METHOD_REG_NONE }, // TC/Acore - { "GetThreat", nullptr, METHOD_REG_NONE }, // TC/Acore - { "ClearThreat", nullptr, METHOD_REG_NONE }, // TC/Acore - { "ResetAllThreat", nullptr, METHOD_REG_NONE }, // TC/Acore - { "FixateTarget", nullptr, METHOD_REG_NONE }, // TC/Acore - { "ClearFixate", nullptr, METHOD_REG_NONE }, // TC/Acore - - { NULL, NULL, METHOD_REG_NONE } + { "GetWaypointPath", METHOD_REG_NONE }, // TC/Acore + { "GetLootMode", METHOD_REG_NONE }, // TC/Acore + { "SetRegeneratingHealth", METHOD_REG_NONE }, // TC/Acore + { "SetLootMode", METHOD_REG_NONE }, // TC/Acore + { "SetReactState", METHOD_REG_NONE }, // TC/Acore + { "IsDungeonBoss", METHOD_REG_NONE }, // TC/Acore + { "IsTrigger", METHOD_REG_NONE }, // TC/Acore + { "CanStartAttack", METHOD_REG_NONE }, // TC/Acore + { "IsDamageEnoughForLootingAndReward", METHOD_REG_NONE }, // TC/Acore + { "HasLootMode", METHOD_REG_NONE }, // TC/Acore + { "AddLootMode", METHOD_REG_NONE }, // TC/Acore + { "ResetLootMode", METHOD_REG_NONE }, // TC/Acore + { "RemoveLootMode", METHOD_REG_NONE }, // TC/Acore + { "GetThreat", METHOD_REG_NONE }, // TC/Acore + { "ClearThreat", METHOD_REG_NONE }, // TC/Acore + { "ResetAllThreat", METHOD_REG_NONE }, // TC/Acore + { "FixateTarget", METHOD_REG_NONE }, // TC/Acore + { "ClearFixate", METHOD_REG_NONE } // TC/Acore }; }; #endif diff --git a/methods/CMangos/ElunaQueryMethods.h b/methods/CMangos/ElunaQueryMethods.h index 3ab85a70ec..cdf30a43bb 100644 --- a/methods/CMangos/ElunaQueryMethods.h +++ b/methods/CMangos/ElunaQueryMethods.h @@ -333,9 +333,7 @@ namespace LuaQuery // Boolean { "NextRow", &LuaQuery::NextRow }, - { "IsNull", &LuaQuery::IsNull }, - - { NULL, NULL, METHOD_REG_NONE } + { "IsNull", &LuaQuery::IsNull } }; }; #undef RESULT diff --git a/methods/CMangos/GameObjectMethods.h b/methods/CMangos/GameObjectMethods.h index 201f28d73d..63e279d8f7 100644 --- a/methods/CMangos/GameObjectMethods.h +++ b/methods/CMangos/GameObjectMethods.h @@ -332,9 +332,7 @@ namespace LuaGameObject { "SaveToDB", &LuaGameObject::SaveToDB }, // Not implemented methods - { "IsDestructible", nullptr, METHOD_REG_NONE }, // Not implemented - - { NULL, NULL, METHOD_REG_NONE } + { "IsDestructible", METHOD_REG_NONE } // Not implemented }; }; #endif diff --git a/methods/CMangos/GlobalMethods.h b/methods/CMangos/GlobalMethods.h index 9f3974a07b..10785a1fb9 100644 --- a/methods/CMangos/GlobalMethods.h +++ b/methods/CMangos/GlobalMethods.h @@ -3180,7 +3180,7 @@ namespace LuaGlobalFunctions return 0; } - ElunaGlobal::ElunaRegister GlobalMethods[] = + ElunaRegister<> GlobalMethods[] = { // Hooks { "RegisterPacketEvent", &LuaGlobalFunctions::RegisterPacketEvent }, @@ -3295,9 +3295,7 @@ namespace LuaGlobalFunctions { "CreateInt64", &LuaGlobalFunctions::CreateLongLong }, { "CreateUint64", &LuaGlobalFunctions::CreateULongLong }, { "StartGameEvent", &LuaGlobalFunctions::StartGameEvent }, - { "StopGameEvent", &LuaGlobalFunctions::StopGameEvent }, - - { NULL, NULL, METHOD_REG_NONE } + { "StopGameEvent", &LuaGlobalFunctions::StopGameEvent } }; } #endif diff --git a/methods/CMangos/GroupMethods.h b/methods/CMangos/GroupMethods.h index c0b5df41a3..088cf6ca92 100644 --- a/methods/CMangos/GroupMethods.h +++ b/methods/CMangos/GroupMethods.h @@ -405,7 +405,7 @@ namespace LuaGroup #if defined WOTLK { "IsLFGGroup", &LuaGroup::IsLFGGroup }, #else - { "IsLFGGroup", nullptr, METHOD_REG_NONE }, + { "IsLFGGroup", METHOD_REG_NONE }, #endif // Other @@ -413,12 +413,10 @@ namespace LuaGroup { "ConvertToRaid", &LuaGroup::ConvertToRaid, METHOD_REG_WORLD }, // World state method only in multistate // Not implemented methods - { "IsBFGroup", nullptr, METHOD_REG_NONE }, // not implemented - { "ConvertToLFG", nullptr, METHOD_REG_NONE }, // not implemented - { "GetMemberFlags", nullptr, METHOD_REG_NONE }, // not implemented - { "SetMemberFlag", nullptr, METHOD_REG_NONE }, // not implemented - - { NULL, NULL, METHOD_REG_NONE } + { "IsBFGroup", METHOD_REG_NONE }, // not implemented + { "ConvertToLFG", METHOD_REG_NONE }, // not implemented + { "GetMemberFlags", METHOD_REG_NONE }, // not implemented + { "SetMemberFlag", METHOD_REG_NONE } // not implemented }; }; diff --git a/methods/CMangos/GuildMethods.h b/methods/CMangos/GuildMethods.h index 2338cc1735..757ae5ca26 100644 --- a/methods/CMangos/GuildMethods.h +++ b/methods/CMangos/GuildMethods.h @@ -255,13 +255,13 @@ namespace LuaGuild #if defined(TBC) || defined(WOTLK) { "SetBankTabText", &LuaGuild::SetBankTabText, METHOD_REG_WORLD }, // World state method only in multistate #else - { "SetBankTabText", nullptr, METHOD_REG_NONE }, + { "SetBankTabText", METHOD_REG_NONE }, #endif { "SetMemberRank", &LuaGuild::SetMemberRank, METHOD_REG_WORLD }, // World state method only in multistate #ifndef CATA { "SetLeader", &LuaGuild::SetLeader, METHOD_REG_WORLD }, // World state method only in multistate #else - { "SetLeader", nullptr, METHOD_REG_NONE }, + { "SetLeader", METHOD_REG_NONE }, #endif // Other @@ -269,9 +269,7 @@ namespace LuaGuild { "SendPacketToRanked", &LuaGuild::SendPacketToRanked }, { "Disband", &LuaGuild::Disband, METHOD_REG_WORLD }, // World state method only in multistate { "AddMember", &LuaGuild::AddMember, METHOD_REG_WORLD }, // World state method only in multistate - { "DeleteMember", &LuaGuild::DeleteMember, METHOD_REG_WORLD }, // World state method only in multistate - - { NULL, NULL, METHOD_REG_NONE } + { "DeleteMember", &LuaGuild::DeleteMember, METHOD_REG_WORLD } // World state method only in multistate }; }; #endif diff --git a/methods/CMangos/ItemMethods.h b/methods/CMangos/ItemMethods.h index 3e94d1e3c8..1f771ac066 100644 --- a/methods/CMangos/ItemMethods.h +++ b/methods/CMangos/ItemMethods.h @@ -793,7 +793,7 @@ namespace LuaItem #if (!defined(TBC) && !defined(CLASSIC)) { "GetFlags2", &LuaItem::GetFlags2 }, #else - { "GetFlags2", nullptr, METHOD_REG_NONE }, + { "GetFlags2", METHOD_REG_NONE }, #endif { "GetExtraFlags", &LuaItem::GetExtraFlags }, { "GetBuyCount", &LuaItem::GetBuyCount }, @@ -810,12 +810,12 @@ namespace LuaItem #if defined(TBC) || defined(WOTLK) { "GetRandomSuffix", &LuaItem::GetRandomSuffix }, #else - { "GetRandomSuffix", nullptr, METHOD_REG_NONE }, + { "GetRandomSuffix", METHOD_REG_NONE }, #endif #if defined(WOTLK) { "GetStatsCount", &LuaItem::GetStatsCount }, #else - { "GetStatsCount", nullptr, METHOD_REG_NONE }, + { "GetStatsCount", METHOD_REG_NONE }, #endif // Setters @@ -843,24 +843,22 @@ namespace LuaItem #if defined(TBC) || defined(WOTLK) { "IsCurrencyToken", &LuaItem::IsCurrencyToken }, #else - { "IsCurrencyToken", nullptr, METHOD_REG_NONE }, + { "IsCurrencyToken", METHOD_REG_NONE }, #endif #if defined(WOTLK) { "IsBoundAccountWide", &LuaItem::IsBoundAccountWide }, { "IsWeaponVellum", &LuaItem::IsWeaponVellum }, { "IsArmorVellum", &LuaItem::IsArmorVellum }, #else - { "IsBoundAccountWide", nullptr, METHOD_REG_NONE }, - { "IsWeaponVellum", nullptr, METHOD_REG_NONE }, - { "IsArmorVellum", nullptr, METHOD_REG_NONE }, + { "IsBoundAccountWide", METHOD_REG_NONE }, + { "IsWeaponVellum", METHOD_REG_NONE }, + { "IsArmorVellum", METHOD_REG_NONE }, #endif // Other { "SaveToDB", &LuaItem::SaveToDB }, // Not implemented methods - { "IsRefundExpired", nullptr, METHOD_REG_NONE }, // not implemented - - { NULL, NULL, METHOD_REG_NONE } + { "IsRefundExpired", METHOD_REG_NONE } // not implemented }; }; #endif diff --git a/methods/CMangos/MapMethods.h b/methods/CMangos/MapMethods.h index a24049db54..1ab68e7a5a 100644 --- a/methods/CMangos/MapMethods.h +++ b/methods/CMangos/MapMethods.h @@ -357,15 +357,13 @@ namespace LuaMap { "IsArena", &LuaMap::IsArena }, { "IsHeroic", &LuaMap::IsHeroic }, #else - { "IsArena", nullptr, METHOD_REG_NONE }, - { "IsHeroic", nullptr, METHOD_REG_NONE }, + { "IsArena", METHOD_REG_NONE }, + { "IsHeroic", METHOD_REG_NONE }, #endif // Other { "SaveInstanceData", &LuaMap::SaveInstanceData }, - { "Data", &LuaMap::Data }, - - { NULL, NULL, METHOD_REG_NONE } + { "Data", &LuaMap::Data } }; }; #endif diff --git a/methods/CMangos/ObjectMethods.h b/methods/CMangos/ObjectMethods.h index 7dec65cc78..b758d79825 100644 --- a/methods/CMangos/ObjectMethods.h +++ b/methods/CMangos/ObjectMethods.h @@ -490,9 +490,7 @@ namespace LuaObject { "ToCreature", &LuaObject::ToCreature }, { "ToPlayer", &LuaObject::ToPlayer }, { "ToCorpse", &LuaObject::ToCorpse }, - { "RemoveFlag", &LuaObject::RemoveFlag }, - - { NULL, NULL, METHOD_REG_NONE } + { "RemoveFlag", &LuaObject::RemoveFlag } }; }; #endif diff --git a/methods/CMangos/PlayerMethods.h b/methods/CMangos/PlayerMethods.h index eec0344685..602c424837 100644 --- a/methods/CMangos/PlayerMethods.h +++ b/methods/CMangos/PlayerMethods.h @@ -3802,22 +3802,22 @@ namespace LuaPlayer { "GetArenaPoints", &LuaPlayer::GetArenaPoints }, { "GetHonorPoints", &LuaPlayer::GetHonorPoints }, #else - { "GetArenaPoints", nullptr, METHOD_REG_NONE }, - { "GetHonorPoints", nullptr, METHOD_REG_NONE }, + { "GetArenaPoints", METHOD_REG_NONE }, + { "GetHonorPoints", METHOD_REG_NONE }, #endif #if defined(WOTLK) { "GetPhaseMaskForSpawn", &LuaPlayer::GetPhaseMaskForSpawn }, { "GetActiveSpec", &LuaPlayer::GetActiveSpec }, { "GetSpecsCount", &LuaPlayer::GetSpecsCount }, #else - { "GetPhaseMaskForSpawn", nullptr, METHOD_REG_NONE }, - { "GetActiveSpec", nullptr, METHOD_REG_NONE }, - { "GetSpecsCount", nullptr, METHOD_REG_NONE }, + { "GetPhaseMaskForSpawn", METHOD_REG_NONE }, + { "GetActiveSpec", METHOD_REG_NONE }, + { "GetSpecsCount", METHOD_REG_NONE }, #endif #ifndef CATA { "GetShieldBlockValue", &LuaPlayer::GetShieldBlockValue }, #else - { "GetShieldBlockValue", nullptr, METHOD_REG_NONE }, + { "GetShieldBlockValue", METHOD_REG_NONE }, #endif { "GetMailCount", &LuaPlayer::GetMailCount }, @@ -3853,10 +3853,10 @@ namespace LuaPlayer { "SetArenaPoints", &LuaPlayer::SetArenaPoints }, { "SetHonorPoints", &LuaPlayer::SetHonorPoints }, #else - { "SetKnownTitle", nullptr, METHOD_REG_NONE }, - { "UnsetKnownTitle", nullptr, METHOD_REG_NONE }, - { "SetArenaPoints", nullptr, METHOD_REG_NONE }, - { "SetHonorPoints", nullptr, METHOD_REG_NONE }, + { "SetKnownTitle", METHOD_REG_NONE }, + { "UnsetKnownTitle", METHOD_REG_NONE }, + { "SetArenaPoints", METHOD_REG_NONE }, + { "SetHonorPoints", METHOD_REG_NONE }, #endif // Boolean @@ -3910,20 +3910,20 @@ namespace LuaPlayer { "CanFly", &LuaPlayer::CanFly }, { "IsFlying", &LuaPlayer::IsFlying }, #else - { "HasTitle", nullptr, METHOD_REG_NONE }, - { "IsInArenaTeam", nullptr, METHOD_REG_NONE }, - { "InArena", nullptr, METHOD_REG_NONE }, - { "CanFly", nullptr, METHOD_REG_NONE }, - { "IsFlying", nullptr, METHOD_REG_NONE }, + { "HasTitle", METHOD_REG_NONE }, + { "IsInArenaTeam", METHOD_REG_NONE }, + { "InArena", METHOD_REG_NONE }, + { "CanFly", METHOD_REG_NONE }, + { "IsFlying", METHOD_REG_NONE }, #endif #if defined(WOTLK) { "HasAchieved", &LuaPlayer::HasAchieved }, { "HasTalent", &LuaPlayer::HasTalent }, { "CanTitanGrip", &LuaPlayer::CanTitanGrip }, #else - { "HasAchieved", nullptr, METHOD_REG_NONE }, - { "HasTalent", nullptr, METHOD_REG_NONE }, - { "CanTitanGrip", nullptr, METHOD_REG_NONE }, + { "HasAchieved", METHOD_REG_NONE }, + { "HasTalent", METHOD_REG_NONE }, + { "CanTitanGrip", METHOD_REG_NONE }, #endif { "CanCompleteRepeatableQuest", &LuaPlayer::CanCompleteRepeatableQuest }, { "CanRewardQuest", &LuaPlayer::CanRewardQuest }, @@ -4012,56 +4012,54 @@ namespace LuaPlayer { "ModifyHonorPoints", &LuaPlayer::ModifyHonorPoints }, { "ModifyArenaPoints", &LuaPlayer::ModifyArenaPoints }, #else - { "RemoveArenaSpellCooldowns", nullptr, METHOD_REG_NONE }, - { "ModifyHonorPoints", nullptr, METHOD_REG_NONE }, - { "ModifyArenaPoints", nullptr, METHOD_REG_NONE }, + { "RemoveArenaSpellCooldowns", METHOD_REG_NONE }, + { "ModifyHonorPoints", METHOD_REG_NONE }, + { "ModifyArenaPoints", METHOD_REG_NONE }, #endif #if defined(WOTLK) { "ResetPetTalents", &LuaPlayer::ResetPetTalents }, { "ResetAchievements", &LuaPlayer::ResetAchievements }, { "SendMovieStart", &LuaPlayer::SendMovieStart }, #else - { "ResetPetTalents", nullptr, METHOD_REG_NONE }, - { "ResetAchievements", nullptr, METHOD_REG_NONE }, - { "SendMovieStart", nullptr, METHOD_REG_NONE }, + { "ResetPetTalents", METHOD_REG_NONE }, + { "ResetAchievements", METHOD_REG_NONE }, + { "SendMovieStart", METHOD_REG_NONE }, #endif // Not implemented methods - { "GetChampioningFaction", nullptr, METHOD_REG_NONE }, // ACore & TC only - { "GetRecruiterId", nullptr, METHOD_REG_NONE }, // not implemented - { "GetHonorStoredKills", nullptr, METHOD_REG_NONE }, // classic only - { "GetRankPoints", nullptr, METHOD_REG_NONE }, // classic only - { "GetHonorLastWeekStandingPos", nullptr, METHOD_REG_NONE }, // classic only - { "SetHonorStoredKills", nullptr, METHOD_REG_NONE }, // classic only - { "SetRankPoints", nullptr, METHOD_REG_NONE }, // classic only - { "SetHonorLastWeekStandingPos", nullptr, METHOD_REG_NONE }, // classic only - { "SetMovement", nullptr, METHOD_REG_NONE }, // not implemented - { "SetFFA", nullptr, METHOD_REG_NONE }, // not implemented + { "GetChampioningFaction", METHOD_REG_NONE }, // ACore & TC only + { "GetRecruiterId", METHOD_REG_NONE }, // not implemented + { "GetHonorStoredKills", METHOD_REG_NONE }, // classic only + { "GetRankPoints", METHOD_REG_NONE }, // classic only + { "GetHonorLastWeekStandingPos", METHOD_REG_NONE }, // classic only + { "SetHonorStoredKills", METHOD_REG_NONE }, // classic only + { "SetRankPoints", METHOD_REG_NONE }, // classic only + { "SetHonorLastWeekStandingPos", METHOD_REG_NONE }, // classic only + { "SetMovement", METHOD_REG_NONE }, // not implemented + { "SetFFA", METHOD_REG_NONE }, // not implemented { "IsImmuneToEnvironmentalDamage", nullptr}, // not implemented - { "InRandomLfgDungeon", nullptr, METHOD_REG_NONE }, // not implemented - { "HasPendingBind", nullptr, METHOD_REG_NONE }, //not implmented - { "CanFlyInZone", nullptr, METHOD_REG_NONE }, // not implemented - { "IsNeverVisible", nullptr, METHOD_REG_NONE }, // not implemented - { "IsUsingLfg", nullptr, METHOD_REG_NONE }, // not implemented - { "HasReceivedQuestReward", nullptr, METHOD_REG_NONE }, // not implemented - { "IsOutdoorPvPActive", nullptr, METHOD_REG_NONE }, // not implemented - { "IsARecruiter", nullptr, METHOD_REG_NONE }, // not implemented - { "SetAchievement", nullptr, METHOD_REG_NONE }, // TC/Acore - { "RemovePet", nullptr, METHOD_REG_NONE }, // not implemented - { "SummonPet", nullptr, METHOD_REG_NONE }, // not implemented - { "RemoveActiveQuest", nullptr, METHOD_REG_NONE }, // not implemented - { "RemoveRewardedQuest", nullptr, METHOD_REG_NONE }, // not implemented - { "KilledPlayerCredit", nullptr, METHOD_REG_NONE }, // not implemented - { "KillGOCredit", nullptr, METHOD_REG_NONE }, // not implemented - { "GainSpellComboPoints", nullptr, METHOD_REG_NONE }, // not implemented - { "AddTalent", nullptr, METHOD_REG_NONE }, // not implemented - { "BindToInstance", nullptr, METHOD_REG_NONE }, // not implemented - { "UpdateHonor", nullptr, METHOD_REG_NONE }, // classic only - { "ResetHonor", nullptr, METHOD_REG_NONE }, // classic only - { "ClearHonorInfo", nullptr, METHOD_REG_NONE }, // classic only - { "GetXP", nullptr, METHOD_REG_NONE }, // not implemented - { "GetXPForNextLevel", nullptr, METHOD_REG_NONE }, // not implemented - - { NULL, NULL, METHOD_REG_NONE } + { "InRandomLfgDungeon", METHOD_REG_NONE }, // not implemented + { "HasPendingBind", METHOD_REG_NONE }, //not implmented + { "CanFlyInZone", METHOD_REG_NONE }, // not implemented + { "IsNeverVisible", METHOD_REG_NONE }, // not implemented + { "IsUsingLfg", METHOD_REG_NONE }, // not implemented + { "HasReceivedQuestReward", METHOD_REG_NONE }, // not implemented + { "IsOutdoorPvPActive", METHOD_REG_NONE }, // not implemented + { "IsARecruiter", METHOD_REG_NONE }, // not implemented + { "SetAchievement", METHOD_REG_NONE }, // TC/Acore + { "RemovePet", METHOD_REG_NONE }, // not implemented + { "SummonPet", METHOD_REG_NONE }, // not implemented + { "RemoveActiveQuest", METHOD_REG_NONE }, // not implemented + { "RemoveRewardedQuest", METHOD_REG_NONE }, // not implemented + { "KilledPlayerCredit", METHOD_REG_NONE }, // not implemented + { "KillGOCredit", METHOD_REG_NONE }, // not implemented + { "GainSpellComboPoints", METHOD_REG_NONE }, // not implemented + { "AddTalent", METHOD_REG_NONE }, // not implemented + { "BindToInstance", METHOD_REG_NONE }, // not implemented + { "UpdateHonor", METHOD_REG_NONE }, // classic only + { "ResetHonor", METHOD_REG_NONE }, // classic only + { "ClearHonorInfo", METHOD_REG_NONE }, // classic only + { "GetXP", METHOD_REG_NONE }, // not implemented + { "GetXPForNextLevel", METHOD_REG_NONE } // not implemented }; }; #endif diff --git a/methods/CMangos/QuestMethods.h b/methods/CMangos/QuestMethods.h index 4f2d2cc7e1..8977e2f64d 100644 --- a/methods/CMangos/QuestMethods.h +++ b/methods/CMangos/QuestMethods.h @@ -188,14 +188,12 @@ namespace LuaQuest #if defined(TBC) || defined(WOTLK) { "IsDaily", &LuaQuest::IsDaily }, #else - { "IsDaily", nullptr, METHOD_REG_NONE }, + { "IsDaily", METHOD_REG_NONE }, #endif { "IsRepeatable", &LuaQuest::IsRepeatable }, // Not implemented methods - { "GetMaxLevel", nullptr, METHOD_REG_NONE }, // not implemented - - { NULL, NULL, METHOD_REG_NONE } + { "GetMaxLevel", METHOD_REG_NONE } // not implemented }; }; #endif diff --git a/methods/CMangos/SpellMethods.h b/methods/CMangos/SpellMethods.h index 25eb87f8a0..0f3e09a79c 100644 --- a/methods/CMangos/SpellMethods.h +++ b/methods/CMangos/SpellMethods.h @@ -186,9 +186,7 @@ namespace LuaSpell // Other { "Cancel", &LuaSpell::Cancel }, { "Cast", &LuaSpell::Cast }, - { "Finish", &LuaSpell::Finish }, - - { NULL, NULL, METHOD_REG_NONE } + { "Finish", &LuaSpell::Finish } }; }; #endif diff --git a/methods/CMangos/UnitMethods.h b/methods/CMangos/UnitMethods.h index c6ee6bddaa..68cab3fa85 100644 --- a/methods/CMangos/UnitMethods.h +++ b/methods/CMangos/UnitMethods.h @@ -2586,32 +2586,30 @@ namespace LuaUnit { "SetCritterGUID", &LuaUnit::SetCritterGUID }, { "MoveJump", &LuaUnit::MoveJump }, #else - { "GetCritterGUID", nullptr, METHOD_REG_NONE }, - { "GetVehicleKit", nullptr, METHOD_REG_NONE }, - { "SetFFA", nullptr, METHOD_REG_NONE }, - { "SetSanctuary", nullptr, METHOD_REG_NONE }, - { "SetCritterGUID", nullptr, METHOD_REG_NONE }, - { "IsOnVehicle", nullptr, METHOD_REG_NONE }, - { "RemoveArenaAuras", nullptr, METHOD_REG_NONE }, - { "MoveJump", nullptr, METHOD_REG_NONE }, + { "GetCritterGUID", METHOD_REG_NONE }, + { "GetVehicleKit", METHOD_REG_NONE }, + { "SetFFA", METHOD_REG_NONE }, + { "SetSanctuary", METHOD_REG_NONE }, + { "SetCritterGUID", METHOD_REG_NONE }, + { "IsOnVehicle", METHOD_REG_NONE }, + { "RemoveArenaAuras", METHOD_REG_NONE }, + { "MoveJump", METHOD_REG_NONE }, #endif // Not implemented methods - { "GetVehicle", nullptr, METHOD_REG_NONE }, // not implemented - { "SetStunned", nullptr, METHOD_REG_NONE }, // not implemented - { "SetCanFly", nullptr, METHOD_REG_NONE }, // not implemented - { "SetVisible", nullptr, METHOD_REG_NONE }, // not implemented - { "IsVisible", nullptr, METHOD_REG_NONE }, // not implemented - { "IsMoving", nullptr, METHOD_REG_NONE }, // not implemented - { "IsFlying", nullptr, METHOD_REG_NONE }, // not implemented - { "RestoreDisplayId", nullptr, METHOD_REG_NONE }, // not implemented - { "RestoreFaction", nullptr, METHOD_REG_NONE }, //not implemented - { "RemoveBindSightAuras", nullptr, METHOD_REG_NONE }, // not implemented - { "RemoveCharmAuras", nullptr, METHOD_REG_NONE }, // not implemented - { "DisableMelee", nullptr, METHOD_REG_NONE }, // not implemented - { "SummonGuardian", nullptr, METHOD_REG_NONE }, // not implemented - - { NULL, NULL, METHOD_REG_NONE } + { "GetVehicle", METHOD_REG_NONE }, // not implemented + { "SetStunned", METHOD_REG_NONE }, // not implemented + { "SetCanFly", METHOD_REG_NONE }, // not implemented + { "SetVisible", METHOD_REG_NONE }, // not implemented + { "IsVisible", METHOD_REG_NONE }, // not implemented + { "IsMoving", METHOD_REG_NONE }, // not implemented + { "IsFlying", METHOD_REG_NONE }, // not implemented + { "RestoreDisplayId", METHOD_REG_NONE }, // not implemented + { "RestoreFaction", METHOD_REG_NONE }, //not implemented + { "RemoveBindSightAuras", METHOD_REG_NONE }, // not implemented + { "RemoveCharmAuras", METHOD_REG_NONE }, // not implemented + { "DisableMelee", METHOD_REG_NONE }, // not implemented + { "SummonGuardian", METHOD_REG_NONE } // not implemented }; }; #endif diff --git a/methods/CMangos/VehicleMethods.h b/methods/CMangos/VehicleMethods.h index d82756e6ce..a615051400 100644 --- a/methods/CMangos/VehicleMethods.h +++ b/methods/CMangos/VehicleMethods.h @@ -104,9 +104,7 @@ namespace LuaVehicle // Other { "AddPassenger", &LuaVehicle::AddPassenger }, - { "RemovePassenger", &LuaVehicle::RemovePassenger }, - - { NULL, NULL, METHOD_REG_NONE } + { "RemovePassenger", &LuaVehicle::RemovePassenger } }; } diff --git a/methods/CMangos/WorldObjectMethods.h b/methods/CMangos/WorldObjectMethods.h index b62491ee4a..d937dee798 100644 --- a/methods/CMangos/WorldObjectMethods.h +++ b/methods/CMangos/WorldObjectMethods.h @@ -1158,8 +1158,8 @@ namespace LuaWorldObject { "GetPhaseMask", &LuaWorldObject::GetPhaseMask }, { "SetPhaseMask", &LuaWorldObject::SetPhaseMask }, #else - { "GetPhaseMask", nullptr, METHOD_REG_NONE }, - { "SetPhaseMask", nullptr, METHOD_REG_NONE }, + { "GetPhaseMask", METHOD_REG_NONE }, + { "SetPhaseMask", METHOD_REG_NONE }, #endif // Boolean @@ -1185,9 +1185,7 @@ namespace LuaWorldObject { "PlayMusic", &LuaWorldObject::PlayMusic }, { "PlayDirectSound", &LuaWorldObject::PlayDirectSound }, { "PlayDistanceSound", &LuaWorldObject::PlayDistanceSound }, - { "Data", &LuaWorldObject::Data }, - - { NULL, NULL, METHOD_REG_NONE } + { "Data", &LuaWorldObject::Data } }; }; #endif diff --git a/methods/CMangos/WorldPacketMethods.h b/methods/CMangos/WorldPacketMethods.h index 803c3f1f29..3155f8a571 100644 --- a/methods/CMangos/WorldPacketMethods.h +++ b/methods/CMangos/WorldPacketMethods.h @@ -341,9 +341,7 @@ namespace LuaPacket { "WriteGUID", &LuaPacket::WriteGUID }, { "WriteString", &LuaPacket::WriteString }, { "WriteFloat", &LuaPacket::WriteFloat }, - { "WriteDouble", &LuaPacket::WriteDouble }, - - { NULL, NULL, METHOD_REG_NONE } + { "WriteDouble", &LuaPacket::WriteDouble } }; }; diff --git a/methods/Mangos/AuraMethods.h b/methods/Mangos/AuraMethods.h index 6e45a0e473..467eb33adb 100644 --- a/methods/Mangos/AuraMethods.h +++ b/methods/Mangos/AuraMethods.h @@ -198,9 +198,7 @@ namespace LuaAura { "SetStackAmount", &LuaAura::SetStackAmount }, // Other - { "Remove", &LuaAura::Remove }, - - { NULL, NULL, METHOD_REG_NONE } + { "Remove", &LuaAura::Remove } }; }; #endif diff --git a/methods/Mangos/BattleGroundMethods.h b/methods/Mangos/BattleGroundMethods.h index d1bc8c049f..5ca31c5a48 100644 --- a/methods/Mangos/BattleGroundMethods.h +++ b/methods/Mangos/BattleGroundMethods.h @@ -243,9 +243,7 @@ namespace LuaBattleGround { "GetMaxPlayersPerTeam", &LuaBattleGround::GetMaxPlayersPerTeam }, { "GetMinPlayersPerTeam", &LuaBattleGround::GetMinPlayersPerTeam }, { "GetWinner", &LuaBattleGround::GetWinner }, - { "GetStatus", &LuaBattleGround::GetStatus }, - - { NULL, NULL, METHOD_REG_NONE } + { "GetStatus", &LuaBattleGround::GetStatus } }; }; #endif diff --git a/methods/Mangos/CorpseMethods.h b/methods/Mangos/CorpseMethods.h index b4f4a94793..e263d04a0b 100644 --- a/methods/Mangos/CorpseMethods.h +++ b/methods/Mangos/CorpseMethods.h @@ -83,9 +83,7 @@ namespace LuaCorpse // Other { "ResetGhostTime", &LuaCorpse::ResetGhostTime }, - { "SaveToDB", &LuaCorpse::SaveToDB }, - - { NULL, NULL, METHOD_REG_NONE } + { "SaveToDB", &LuaCorpse::SaveToDB } }; }; #endif diff --git a/methods/Mangos/CreatureMethods.h b/methods/Mangos/CreatureMethods.h index 56c2973a4c..16c122d75f 100644 --- a/methods/Mangos/CreatureMethods.h +++ b/methods/Mangos/CreatureMethods.h @@ -1192,23 +1192,21 @@ namespace LuaCreature { "UpdateEntry", &LuaCreature::UpdateEntry }, // Not implemented methods - { "GetWaypointPath", nullptr, METHOD_REG_NONE }, // not implemented - { "GetLootMode", nullptr, METHOD_REG_NONE }, // not implemented - { "SetRegeneratingHealth", nullptr, METHOD_REG_NONE }, // not implemented - { "SetLootMode", nullptr, METHOD_REG_NONE }, // not implemented - { "SetReactState", nullptr, METHOD_REG_NONE }, // not implemented - { "IsDungeonBoss", nullptr, METHOD_REG_NONE }, // not implemented - { "IsTrigger", nullptr, METHOD_REG_NONE }, // not implemented - { "CanStartAttack", nullptr, METHOD_REG_NONE }, // not implemented - { "IsDamageEnoughForLootingAndReward", nullptr, METHOD_REG_NONE }, // not implemented - { "HasLootMode", nullptr, METHOD_REG_NONE }, // not implemented - { "AddLootMode", nullptr, METHOD_REG_NONE }, // not implemented - { "ResetLootMode", nullptr, METHOD_REG_NONE }, // not implemented - { "RemoveLootMode", nullptr, METHOD_REG_NONE }, // not implemented - { "RemoveFromWorld", nullptr, METHOD_REG_NONE }, // not implemented - { "GetRank", nullptr, METHOD_REG_NONE }, // not implemented - - { NULL, NULL, METHOD_REG_NONE } + { "GetWaypointPath", METHOD_REG_NONE }, // not implemented + { "GetLootMode", METHOD_REG_NONE }, // not implemented + { "SetRegeneratingHealth", METHOD_REG_NONE }, // not implemented + { "SetLootMode", METHOD_REG_NONE }, // not implemented + { "SetReactState", METHOD_REG_NONE }, // not implemented + { "IsDungeonBoss", METHOD_REG_NONE }, // not implemented + { "IsTrigger", METHOD_REG_NONE }, // not implemented + { "CanStartAttack", METHOD_REG_NONE }, // not implemented + { "IsDamageEnoughForLootingAndReward", METHOD_REG_NONE }, // not implemented + { "HasLootMode", METHOD_REG_NONE }, // not implemented + { "AddLootMode", METHOD_REG_NONE }, // not implemented + { "ResetLootMode", METHOD_REG_NONE }, // not implemented + { "RemoveLootMode", METHOD_REG_NONE }, // not implemented + { "RemoveFromWorld", METHOD_REG_NONE }, // not implemented + { "GetRank", METHOD_REG_NONE } // not implemented }; }; #endif diff --git a/methods/Mangos/ElunaQueryMethods.h b/methods/Mangos/ElunaQueryMethods.h index 87ae0e5119..835e521a6c 100644 --- a/methods/Mangos/ElunaQueryMethods.h +++ b/methods/Mangos/ElunaQueryMethods.h @@ -335,9 +335,7 @@ namespace LuaQuery // Boolean { "NextRow", &LuaQuery::NextRow }, - { "IsNull", &LuaQuery::IsNull }, - - { NULL, NULL, METHOD_REG_NONE } + { "IsNull", &LuaQuery::IsNull } }; }; #undef RESULT diff --git a/methods/Mangos/GameObjectMethods.h b/methods/Mangos/GameObjectMethods.h index 503095a113..4d8f430635 100644 --- a/methods/Mangos/GameObjectMethods.h +++ b/methods/Mangos/GameObjectMethods.h @@ -337,9 +337,7 @@ namespace LuaGameObject { "SaveToDB", &LuaGameObject::SaveToDB }, // Not implemented methods - { "IsDestructible", nullptr, METHOD_REG_NONE }, // Not implemented - - { NULL, NULL, METHOD_REG_NONE } + { "IsDestructible", METHOD_REG_NONE } // Not implemented }; }; #endif diff --git a/methods/Mangos/GlobalMethods.h b/methods/Mangos/GlobalMethods.h index 6271b66ba3..61b5e52501 100644 --- a/methods/Mangos/GlobalMethods.h +++ b/methods/Mangos/GlobalMethods.h @@ -2923,7 +2923,7 @@ namespace LuaGlobalFunctions return 0; } - ElunaGlobal::ElunaRegister GlobalMethods[] = + ElunaRegister<> GlobalMethods[] = { // Hooks { "RegisterPacketEvent", &LuaGlobalFunctions::RegisterPacketEvent }, @@ -2974,7 +2974,7 @@ namespace LuaGlobalFunctions { "GetPlayerByName", &LuaGlobalFunctions::GetPlayerByName, METHOD_REG_WORLD }, // World state method only in multistate { "GetGameTime", &LuaGlobalFunctions::GetGameTime }, { "GetPlayersInWorld", &LuaGlobalFunctions::GetPlayersInWorld, METHOD_REG_WORLD }, // World state method only in multistate - { "GetPlayersOnMap", nullptr, METHOD_REG_NONE }, // Map state method only in multistate TODO + { "GetPlayersOnMap", METHOD_REG_NONE }, // Map state method only in multistate TODO { "GetGuildByName", &LuaGlobalFunctions::GetGuildByName }, { "GetGuildByLeaderGUID", &LuaGlobalFunctions::GetGuildByLeaderGUID }, { "GetPlayerCount", &LuaGlobalFunctions::GetPlayerCount }, @@ -3037,11 +3037,9 @@ namespace LuaGlobalFunctions { "StopGameEvent", &LuaGlobalFunctions::StopGameEvent }, // unimplemented - { "WorldDBQueryAsync", nullptr, METHOD_REG_NONE }, - { "CharDBQueryAsync", nullptr, METHOD_REG_NONE }, - { "AuthDBQueryAsync", nullptr, METHOD_REG_NONE }, - - { NULL, NULL, METHOD_REG_NONE } + { "WorldDBQueryAsync", METHOD_REG_NONE }, + { "CharDBQueryAsync", METHOD_REG_NONE }, + { "AuthDBQueryAsync", METHOD_REG_NONE } }; } #endif diff --git a/methods/Mangos/GroupMethods.h b/methods/Mangos/GroupMethods.h index 86e25d0f94..9b9037fe19 100644 --- a/methods/Mangos/GroupMethods.h +++ b/methods/Mangos/GroupMethods.h @@ -401,19 +401,17 @@ namespace LuaGroup #if !(defined(CLASSIC) || defined(TBC)) { "IsLFGGroup", &LuaGroup::IsLFGGroup }, #else - { "IsLFGGroup", nullptr, METHOD_REG_NONE }, + { "IsLFGGroup", METHOD_REG_NONE }, #endif // Other { "SendPacket", &LuaGroup::SendPacket }, { "ConvertToRaid", &LuaGroup::ConvertToRaid, METHOD_REG_WORLD }, // World state method only in multistate // Not implemented methods - { "IsBFGroup", nullptr, METHOD_REG_NONE }, // not implemented - { "ConvertToLFG", nullptr, METHOD_REG_NONE }, // not implemented - { "GetMemberFlags", nullptr, METHOD_REG_NONE }, // not implemented - { "SetMemberFlag", nullptr, METHOD_REG_NONE }, // not implemented - - { NULL, NULL, METHOD_REG_NONE } + { "IsBFGroup", METHOD_REG_NONE }, // not implemented + { "ConvertToLFG", METHOD_REG_NONE }, // not implemented + { "GetMemberFlags", METHOD_REG_NONE }, // not implemented + { "SetMemberFlag", METHOD_REG_NONE } // not implemented }; }; diff --git a/methods/Mangos/GuildMethods.h b/methods/Mangos/GuildMethods.h index 39c0421d83..84cd1f60a9 100644 --- a/methods/Mangos/GuildMethods.h +++ b/methods/Mangos/GuildMethods.h @@ -259,9 +259,7 @@ namespace LuaGuild { "SendPacketToRanked", &LuaGuild::SendPacketToRanked }, { "Disband", &LuaGuild::Disband, METHOD_REG_WORLD }, // World state method only in multistate { "AddMember", &LuaGuild::AddMember, METHOD_REG_WORLD }, // World state method only in multistate - { "DeleteMember", &LuaGuild::DeleteMember, METHOD_REG_WORLD }, // World state method only in multistate - - { NULL, NULL, METHOD_REG_NONE } + { "DeleteMember", &LuaGuild::DeleteMember, METHOD_REG_WORLD } // World state method only in multistate }; }; #endif diff --git a/methods/Mangos/ItemMethods.h b/methods/Mangos/ItemMethods.h index 5ec717d948..14ed2fa581 100644 --- a/methods/Mangos/ItemMethods.h +++ b/methods/Mangos/ItemMethods.h @@ -798,7 +798,7 @@ namespace LuaItem #if (!defined(TBC) && !defined(CLASSIC)) { "GetFlags2", &LuaItem::GetFlags2 }, #else - { "GetFlags2", nullptr, METHOD_REG_NONE }, + { "GetFlags2", METHOD_REG_NONE }, #endif { "GetExtraFlags", &LuaItem::GetExtraFlags }, { "GetBuyCount", &LuaItem::GetBuyCount }, @@ -815,12 +815,12 @@ namespace LuaItem #ifndef CLASSIC { "GetRandomSuffix", &LuaItem::GetRandomSuffix }, #else - { "GetRandomSuffix", nullptr, METHOD_REG_NONE }, + { "GetRandomSuffix", METHOD_REG_NONE }, #endif #ifdef WOTLK { "GetStatsCount", &LuaItem::GetStatsCount }, #else - { "GetStatsCount", nullptr, METHOD_REG_NONE }, + { "GetStatsCount", METHOD_REG_NONE }, #endif // Setters @@ -848,28 +848,26 @@ namespace LuaItem #ifndef CLASSIC { "IsCurrencyToken", &LuaItem::IsCurrencyToken }, #else - { "IsCurrencyToken", nullptr, METHOD_REG_NONE }, + { "IsCurrencyToken", METHOD_REG_NONE }, #endif #if (!defined(TBC) && !defined(CLASSIC)) { "IsBoundAccountWide", &LuaItem::IsBoundAccountWide }, #else - { "IsBoundAccountWide", nullptr, METHOD_REG_NONE }, + { "IsBoundAccountWide", METHOD_REG_NONE }, #endif #if defined(WOTLK) { "IsWeaponVellum", &LuaItem::IsWeaponVellum }, { "IsArmorVellum", &LuaItem::IsArmorVellum }, #else - { "IsWeaponVellum", nullptr, METHOD_REG_NONE }, - { "IsArmorVellum", nullptr, METHOD_REG_NONE }, + { "IsWeaponVellum", METHOD_REG_NONE }, + { "IsArmorVellum", METHOD_REG_NONE }, #endif // Other { "SaveToDB", &LuaItem::SaveToDB }, // Not implemented methods - { "IsRefundExpired", nullptr, METHOD_REG_NONE }, // not implemented - - { NULL, NULL, METHOD_REG_NONE } + { "IsRefundExpired", METHOD_REG_NONE } // not implemented }; }; #endif diff --git a/methods/Mangos/MapMethods.h b/methods/Mangos/MapMethods.h index b463e32a18..5bef07e290 100644 --- a/methods/Mangos/MapMethods.h +++ b/methods/Mangos/MapMethods.h @@ -359,14 +359,12 @@ namespace LuaMap { "IsArena", &LuaMap::IsArena }, { "IsHeroic", &LuaMap::IsHeroic }, #else - { "IsArena", nullptr, METHOD_REG_NONE }, - { "IsHeroic", nullptr, METHOD_REG_NONE }, + { "IsArena", METHOD_REG_NONE }, + { "IsHeroic", METHOD_REG_NONE }, #endif // Other { "SaveInstanceData", &LuaMap::SaveInstanceData }, - { "Data", &LuaMap::Data }, - - { NULL, NULL, METHOD_REG_NONE } + { "Data", &LuaMap::Data } }; }; #endif diff --git a/methods/Mangos/ObjectMethods.h b/methods/Mangos/ObjectMethods.h index 7dec65cc78..b758d79825 100644 --- a/methods/Mangos/ObjectMethods.h +++ b/methods/Mangos/ObjectMethods.h @@ -490,9 +490,7 @@ namespace LuaObject { "ToCreature", &LuaObject::ToCreature }, { "ToPlayer", &LuaObject::ToPlayer }, { "ToCorpse", &LuaObject::ToCorpse }, - { "RemoveFlag", &LuaObject::RemoveFlag }, - - { NULL, NULL, METHOD_REG_NONE } + { "RemoveFlag", &LuaObject::RemoveFlag } }; }; #endif diff --git a/methods/Mangos/PlayerMethods.h b/methods/Mangos/PlayerMethods.h index 2280baaebe..09a12f9499 100644 --- a/methods/Mangos/PlayerMethods.h +++ b/methods/Mangos/PlayerMethods.h @@ -3703,28 +3703,28 @@ namespace LuaPlayer { "GetRankPoints", &LuaPlayer::GetRankPoints }, { "GetHonorLastWeekStandingPos", &LuaPlayer::GetHonorLastWeekStandingPos }, #else - { "GetHonorStoredKills", nullptr, METHOD_REG_NONE }, - { "GetRankPoints", nullptr, METHOD_REG_NONE }, - { "GetHonorLastWeekStandingPos", nullptr, METHOD_REG_NONE }, + { "GetHonorStoredKills", METHOD_REG_NONE }, + { "GetRankPoints", METHOD_REG_NONE }, + { "GetHonorLastWeekStandingPos", METHOD_REG_NONE }, #endif #if defined(TBC) || defined (WOTLK) { "GetArenaPoints", &LuaPlayer::GetArenaPoints }, { "GetHonorPoints", &LuaPlayer::GetHonorPoints }, #else - { "GetArenaPoints", nullptr, METHOD_REG_NONE }, - { "GetHonorPoints", nullptr, METHOD_REG_NONE }, + { "GetArenaPoints", METHOD_REG_NONE }, + { "GetHonorPoints", METHOD_REG_NONE }, #endif #ifdef WOTLK { "GetPhaseMaskForSpawn", &LuaPlayer::GetPhaseMaskForSpawn }, #else - { "GetPhaseMaskForSpawn", nullptr, METHOD_REG_NONE }, + { "GetPhaseMaskForSpawn", METHOD_REG_NONE }, #endif #if (!defined(TBC) && !defined(CLASSIC)) { "GetActiveSpec", &LuaPlayer::GetActiveSpec }, { "GetSpecsCount", &LuaPlayer::GetSpecsCount }, #else - { "GetActiveSpec", nullptr, METHOD_REG_NONE }, - { "GetSpecsCount", nullptr, METHOD_REG_NONE }, + { "GetActiveSpec", METHOD_REG_NONE }, + { "GetSpecsCount", METHOD_REG_NONE }, #endif // Setters @@ -3754,24 +3754,24 @@ namespace LuaPlayer { "SetGender", &LuaPlayer::SetGender }, { "SetSheath", &LuaPlayer::SetSheath }, #if defined(CLASSIC) - { "SetKnownTitle", nullptr, METHOD_REG_NONE }, - { "UnsetKnownTitle", nullptr, METHOD_REG_NONE }, + { "SetKnownTitle", METHOD_REG_NONE }, + { "UnsetKnownTitle", METHOD_REG_NONE }, { "SetHonorStoredKills", &LuaPlayer::SetHonorStoredKills }, { "SetRankPoints", &LuaPlayer::SetRankPoints }, { "SetHonorLastWeekStandingPos", &LuaPlayer::SetHonorLastWeekStandingPos }, #else { "SetKnownTitle", &LuaPlayer::SetKnownTitle }, { "UnsetKnownTitle", &LuaPlayer::UnsetKnownTitle }, - { "SetHonorStoredKills", nullptr, METHOD_REG_NONE }, - { "SetRankPoints", nullptr, METHOD_REG_NONE }, - { "SetHonorLastWeekStandingPos", nullptr, METHOD_REG_NONE }, + { "SetHonorStoredKills", METHOD_REG_NONE }, + { "SetRankPoints", METHOD_REG_NONE }, + { "SetHonorLastWeekStandingPos", METHOD_REG_NONE }, #endif #if defined(TBC) || defined(WOTLK) { "SetArenaPoints", &LuaPlayer::SetArenaPoints }, { "SetHonorPoints", &LuaPlayer::SetHonorPoints }, #else - { "SetArenaPoints", nullptr, METHOD_REG_NONE }, - { "SetHonorPoints", nullptr, METHOD_REG_NONE }, + { "SetArenaPoints", METHOD_REG_NONE }, + { "SetHonorPoints", METHOD_REG_NONE }, #endif // Boolean @@ -3825,10 +3825,10 @@ namespace LuaPlayer { "CanFly", &LuaPlayer::CanFly }, { "IsFlying", &LuaPlayer::IsFlying }, #else - { "HasTitle", nullptr, METHOD_REG_NONE }, - { "IsInArenaTeam", nullptr, METHOD_REG_NONE }, - { "InArena", nullptr, METHOD_REG_NONE }, - { "CanFly", nullptr, METHOD_REG_NONE }, + { "HasTitle", METHOD_REG_NONE }, + { "IsInArenaTeam", METHOD_REG_NONE }, + { "InArena", METHOD_REG_NONE }, + { "CanFly", METHOD_REG_NONE }, { "IsFlying",nullptr, METHOD_REG_NONE }, #endif #if (!defined(TBC) && !defined(CLASSIC)) @@ -3836,9 +3836,9 @@ namespace LuaPlayer { "HasTalent", &LuaPlayer::HasTalent }, { "CanTitanGrip", &LuaPlayer::CanTitanGrip }, #else - { "HasAchieved", nullptr, METHOD_REG_NONE }, - { "HasTalent", nullptr, METHOD_REG_NONE }, - { "CanTitanGrip", nullptr, METHOD_REG_NONE }, + { "HasAchieved", METHOD_REG_NONE }, + { "HasTalent", METHOD_REG_NONE }, + { "CanTitanGrip", METHOD_REG_NONE }, #endif // Gossip @@ -3924,11 +3924,11 @@ namespace LuaPlayer { "UpdateHonor", &LuaPlayer::UpdateHonor }, { "ResetHonor", &LuaPlayer::ResetHonor }, { "ClearHonorInfo", &LuaPlayer::ClearHonorInfo }, - { "RemoveArenaSpellCooldowns", nullptr, METHOD_REG_NONE }, + { "RemoveArenaSpellCooldowns", METHOD_REG_NONE }, #else - { "UpdateHonor", nullptr, METHOD_REG_NONE }, - { "ResetHonor", nullptr, METHOD_REG_NONE }, - { "ClearHonorInfo", nullptr, METHOD_REG_NONE }, + { "UpdateHonor", METHOD_REG_NONE }, + { "ResetHonor", METHOD_REG_NONE }, + { "ClearHonorInfo", METHOD_REG_NONE }, { "RemoveArenaSpellCooldowns", &LuaPlayer::RemoveArenaSpellCooldowns }, #endif #if (!defined(TBC) && !defined(CLASSIC)) @@ -3936,49 +3936,47 @@ namespace LuaPlayer { "ResetAchievements", &LuaPlayer::ResetAchievements }, { "SendMovieStart", &LuaPlayer::SendMovieStart }, #else - { "ResetPetTalents", nullptr, METHOD_REG_NONE }, - { "ResetAchievements", nullptr, METHOD_REG_NONE }, - { "SendMovieStart", nullptr, METHOD_REG_NONE }, + { "ResetPetTalents", METHOD_REG_NONE }, + { "ResetAchievements", METHOD_REG_NONE }, + { "SendMovieStart", METHOD_REG_NONE }, #endif #if defined(TBC) || defined(WOTLK) { "ModifyHonorPoints", &LuaPlayer::ModifyHonorPoints }, { "ModifyArenaPoints", &LuaPlayer::ModifyArenaPoints }, #else - { "ModifyHonorPoints", nullptr, METHOD_REG_NONE }, - { "ModifyArenaPoints", nullptr, METHOD_REG_NONE }, + { "ModifyHonorPoints", METHOD_REG_NONE }, + { "ModifyArenaPoints", METHOD_REG_NONE }, #endif // Not implemented methods - { "GetChampioningFaction", nullptr, METHOD_REG_NONE }, // not implemented - { "GetRecruiterId", nullptr, METHOD_REG_NONE }, // not implemented - { "SetMovement", nullptr, METHOD_REG_NONE }, // not implemented - { "SetFFA", nullptr, METHOD_REG_NONE }, // not implemented - { "IsImmuneToEnvironmentalDamage", nullptr, METHOD_REG_NONE }, // not implemented - { "InRandomLfgDungeon", nullptr, METHOD_REG_NONE }, // not implemented - { "HasPendingBind", nullptr, METHOD_REG_NONE }, // not implemented - { "CanFlyInZone", nullptr, METHOD_REG_NONE }, // not implemented - { "IsNeverVisible", nullptr, METHOD_REG_NONE }, // not implemented, - { "IsUsingLfg", nullptr, METHOD_REG_NONE }, // not implemented, - { "HasReceivedQuestReward", nullptr, METHOD_REG_NONE }, // not implemented, - { "IsOutdoorPvPActive", nullptr, METHOD_REG_NONE }, // not implemented, - { "IsARecruiter", nullptr, METHOD_REG_NONE }, // not implemented, - { "RemovePet", nullptr, METHOD_REG_NONE }, // not implemented - { "SummonPet", nullptr, METHOD_REG_NONE }, // not implemented - { "RemoveActiveQuest", nullptr, METHOD_REG_NONE }, // not implemented - { "RemoveRewardedQuest", nullptr, METHOD_REG_NONE }, // not implemented - { "KilledPlayerCredit", nullptr, METHOD_REG_NONE }, // not implemented - { "KillGOCredit", nullptr, METHOD_REG_NONE }, // not implemented - { "GainSpellComboPoints", nullptr, METHOD_REG_NONE }, // not implemented - { "AddTalent", nullptr, METHOD_REG_NONE }, // not implemented - { "BindToInstance", nullptr, METHOD_REG_NONE }, // not implemented - { "SetAchievement", nullptr, METHOD_REG_NONE }, // not implemented - { "GetMailCount", nullptr, METHOD_REG_NONE }, // not implemented - { "GetXP", nullptr, METHOD_REG_NONE }, // not implemented - { "GetXPForNextLevel", nullptr, METHOD_REG_NONE }, // not implemented - { "CanCompleteRepeatableQuest", nullptr, METHOD_REG_NONE }, // not implemented - { "CanRewardQuest", nullptr, METHOD_REG_NONE }, // not implemented - - { NULL, NULL } + { "GetChampioningFaction", METHOD_REG_NONE }, // not implemented + { "GetRecruiterId", METHOD_REG_NONE }, // not implemented + { "SetMovement", METHOD_REG_NONE }, // not implemented + { "SetFFA", METHOD_REG_NONE }, // not implemented + { "IsImmuneToEnvironmentalDamage", METHOD_REG_NONE }, // not implemented + { "InRandomLfgDungeon", METHOD_REG_NONE }, // not implemented + { "HasPendingBind", METHOD_REG_NONE }, // not implemented + { "CanFlyInZone", METHOD_REG_NONE }, // not implemented + { "IsNeverVisible", METHOD_REG_NONE }, // not implemented, + { "IsUsingLfg", METHOD_REG_NONE }, // not implemented, + { "HasReceivedQuestReward", METHOD_REG_NONE }, // not implemented, + { "IsOutdoorPvPActive", METHOD_REG_NONE }, // not implemented, + { "IsARecruiter", METHOD_REG_NONE }, // not implemented, + { "RemovePet", METHOD_REG_NONE }, // not implemented + { "SummonPet", METHOD_REG_NONE }, // not implemented + { "RemoveActiveQuest", METHOD_REG_NONE }, // not implemented + { "RemoveRewardedQuest", METHOD_REG_NONE }, // not implemented + { "KilledPlayerCredit", METHOD_REG_NONE }, // not implemented + { "KillGOCredit", METHOD_REG_NONE }, // not implemented + { "GainSpellComboPoints", METHOD_REG_NONE }, // not implemented + { "AddTalent", METHOD_REG_NONE }, // not implemented + { "BindToInstance", METHOD_REG_NONE }, // not implemented + { "SetAchievement", METHOD_REG_NONE }, // not implemented + { "GetMailCount", METHOD_REG_NONE }, // not implemented + { "GetXP", METHOD_REG_NONE }, // not implemented + { "GetXPForNextLevel", METHOD_REG_NONE }, // not implemented + { "CanCompleteRepeatableQuest", METHOD_REG_NONE }, // not implemented + { "CanRewardQuest", METHOD_REG_NONE } // not implemented }; }; #endif diff --git a/methods/Mangos/QuestMethods.h b/methods/Mangos/QuestMethods.h index 3fa05cae67..d257a8c081 100644 --- a/methods/Mangos/QuestMethods.h +++ b/methods/Mangos/QuestMethods.h @@ -189,13 +189,11 @@ namespace LuaQuest #ifndef CLASSIC { "IsDaily", &LuaQuest::IsDaily }, #else - { "IsDaily", nullptr, METHOD_REG_NONE }, + { "IsDaily", METHOD_REG_NONE }, #endif // Not implemented methods - { "GetMaxLevel", nullptr, METHOD_REG_NONE }, // not implemented - - { NULL, NULL, METHOD_REG_NONE } + { "GetMaxLevel", METHOD_REG_NONE } // not implemented }; }; #endif diff --git a/methods/Mangos/SpellMethods.h b/methods/Mangos/SpellMethods.h index d6c1983d9a..e6f9809c6f 100644 --- a/methods/Mangos/SpellMethods.h +++ b/methods/Mangos/SpellMethods.h @@ -188,9 +188,7 @@ namespace LuaSpell // Other { "Cancel", &LuaSpell::Cancel }, { "Cast", &LuaSpell::Cast }, - { "Finish", &LuaSpell::Finish }, - - { NULL, NULL, METHOD_REG_NONE } + { "Finish", &LuaSpell::Finish } }; }; #endif diff --git a/methods/Mangos/UnitMethods.h b/methods/Mangos/UnitMethods.h index 2485d17bb7..5e2cb18a3c 100644 --- a/methods/Mangos/UnitMethods.h +++ b/methods/Mangos/UnitMethods.h @@ -2464,8 +2464,8 @@ namespace LuaUnit { "GetVehicleKit", &LuaUnit::GetVehicleKit }, { "GetCritterGUID", &LuaUnit::GetCritterGUID }, #else - { "GetVehicleKit", nullptr, METHOD_REG_NONE }, - { "GetCritterGUID", nullptr, METHOD_REG_NONE }, + { "GetVehicleKit", METHOD_REG_NONE }, + { "GetCritterGUID", METHOD_REG_NONE }, #endif // Setters @@ -2500,9 +2500,9 @@ namespace LuaUnit { "SetSanctuary", &LuaUnit::SetSanctuary }, { "SetCritterGUID", &LuaUnit::SetCritterGUID }, #else - { "SetFFA", nullptr, METHOD_REG_NONE }, - { "SetSanctuary", nullptr, METHOD_REG_NONE }, - { "SetCritterGUID", nullptr, METHOD_REG_NONE }, + { "SetFFA", METHOD_REG_NONE }, + { "SetSanctuary", METHOD_REG_NONE }, + { "SetCritterGUID", METHOD_REG_NONE }, #endif // Boolean @@ -2547,7 +2547,7 @@ namespace LuaUnit #if !defined(CLASSIC) { "IsOnVehicle", &LuaUnit::IsOnVehicle }, #else - { "IsOnVehicle", nullptr, METHOD_REG_NONE }, + { "IsOnVehicle", METHOD_REG_NONE }, #endif // Other @@ -2594,31 +2594,29 @@ namespace LuaUnit #if !defined(CLASSIC) { "RemoveArenaAuras", &LuaUnit::RemoveArenaAuras }, #else - { "RemoveArenaAuras", nullptr, METHOD_REG_NONE }, + { "RemoveArenaAuras", METHOD_REG_NONE }, #endif #if (!defined(TBC) && !defined(CLASSIC)) { "MoveJump", &LuaUnit::MoveJump }, #else - { "MoveJump", nullptr, METHOD_REG_NONE }, + { "MoveJump", METHOD_REG_NONE }, #endif // Not implemented mehtods - { "GetVehicle", nullptr, METHOD_REG_NONE }, // not implemented - { "SetStunned", nullptr, METHOD_REG_NONE }, // not implemented - { "SetCanFly", nullptr, METHOD_REG_NONE }, // not implemented - { "SetVisible", nullptr, METHOD_REG_NONE }, // not implemented - { "IsVisible", nullptr, METHOD_REG_NONE }, // not implemented, - { "IsMoving", nullptr, METHOD_REG_NONE }, // not implemented - { "IsFlying", nullptr, METHOD_REG_NONE }, // not implemented - { "RestoreDisplayId", nullptr, METHOD_REG_NONE }, // not implemented - { "RestoreFaction", nullptr, METHOD_REG_NONE }, // not implemented - { "RemoveBindSightAuras", nullptr, METHOD_REG_NONE }, // not implemented - { "RemoveCharmAuras", nullptr, METHOD_REG_NONE }, // not implemented - { "DisableMelee", nullptr, METHOD_REG_NONE }, // not implemented - { "SummonGuardian", nullptr, METHOD_REG_NONE }, // not implemented - { "SetImmuneTo", nullptr, METHOD_REG_NONE }, // not implemented - - { NULL, NULL } + { "GetVehicle", METHOD_REG_NONE }, // not implemented + { "SetStunned", METHOD_REG_NONE }, // not implemented + { "SetCanFly", METHOD_REG_NONE }, // not implemented + { "SetVisible", METHOD_REG_NONE }, // not implemented + { "IsVisible", METHOD_REG_NONE }, // not implemented, + { "IsMoving", METHOD_REG_NONE }, // not implemented + { "IsFlying", METHOD_REG_NONE }, // not implemented + { "RestoreDisplayId", METHOD_REG_NONE }, // not implemented + { "RestoreFaction", METHOD_REG_NONE }, // not implemented + { "RemoveBindSightAuras", METHOD_REG_NONE }, // not implemented + { "RemoveCharmAuras", METHOD_REG_NONE }, // not implemented + { "DisableMelee", METHOD_REG_NONE }, // not implemented + { "SummonGuardian", METHOD_REG_NONE }, // not implemented + { "SetImmuneTo", METHOD_REG_NONE } // not implemented }; }; #endif diff --git a/methods/Mangos/VehicleMethods.h b/methods/Mangos/VehicleMethods.h index b630ceac2a..93356fc2ea 100644 --- a/methods/Mangos/VehicleMethods.h +++ b/methods/Mangos/VehicleMethods.h @@ -105,9 +105,7 @@ namespace LuaVehicle // Other { "AddPassenger", &LuaVehicle::AddPassenger }, - { "RemovePassenger", &LuaVehicle::RemovePassenger }, - - { NULL, NULL, METHOD_REG_NONE } + { "RemovePassenger", &LuaVehicle::RemovePassenger } }; } diff --git a/methods/Mangos/WorldObjectMethods.h b/methods/Mangos/WorldObjectMethods.h index 935340a885..b3a4987318 100644 --- a/methods/Mangos/WorldObjectMethods.h +++ b/methods/Mangos/WorldObjectMethods.h @@ -1133,8 +1133,8 @@ namespace LuaWorldObject { "GetPhaseMask", &LuaWorldObject::GetPhaseMask }, { "SetPhaseMask", &LuaWorldObject::SetPhaseMask }, #else - { "GetPhaseMask", nullptr, METHOD_REG_NONE }, - { "SetPhaseMask", nullptr, METHOD_REG_NONE }, + { "GetPhaseMask", METHOD_REG_NONE }, + { "SetPhaseMask", METHOD_REG_NONE }, #endif { "GetInstanceId", &LuaWorldObject::GetInstanceId }, { "GetAreaId", &LuaWorldObject::GetAreaId }, @@ -1183,9 +1183,7 @@ namespace LuaWorldObject { "PlayMusic", &LuaWorldObject::PlayMusic }, { "PlayDirectSound", &LuaWorldObject::PlayDirectSound }, { "PlayDistanceSound", &LuaWorldObject::PlayDistanceSound }, - { "Data", &LuaWorldObject::Data }, - - { NULL, NULL, METHOD_REG_NONE } + { "Data", &LuaWorldObject::Data } }; }; #endif diff --git a/methods/Mangos/WorldPacketMethods.h b/methods/Mangos/WorldPacketMethods.h index 1468a04cf4..52b1a223fe 100644 --- a/methods/Mangos/WorldPacketMethods.h +++ b/methods/Mangos/WorldPacketMethods.h @@ -338,9 +338,7 @@ namespace LuaPacket { "WriteGUID", &LuaPacket::WriteGUID }, { "WriteString", &LuaPacket::WriteString }, { "WriteFloat", &LuaPacket::WriteFloat }, - { "WriteDouble", &LuaPacket::WriteDouble }, - - { NULL, NULL } + { "WriteDouble", &LuaPacket::WriteDouble } }; }; diff --git a/methods/TrinityCore/AuraMethods.h b/methods/TrinityCore/AuraMethods.h index c94245afea..b60a1d9f69 100644 --- a/methods/TrinityCore/AuraMethods.h +++ b/methods/TrinityCore/AuraMethods.h @@ -186,9 +186,7 @@ namespace LuaAura { "SetStackAmount", &LuaAura::SetStackAmount }, // Other - { "Remove", &LuaAura::Remove }, - - { NULL, NULL, METHOD_REG_NONE } + { "Remove", &LuaAura::Remove } }; }; #endif diff --git a/methods/TrinityCore/BattleGroundMethods.h b/methods/TrinityCore/BattleGroundMethods.h index 830a33b17a..c2de74d00f 100644 --- a/methods/TrinityCore/BattleGroundMethods.h +++ b/methods/TrinityCore/BattleGroundMethods.h @@ -241,9 +241,7 @@ namespace LuaBattleGround { "GetMaxPlayersPerTeam", &LuaBattleGround::GetMaxPlayersPerTeam }, { "GetMinPlayersPerTeam", &LuaBattleGround::GetMinPlayersPerTeam }, { "GetWinner", &LuaBattleGround::GetWinner }, - { "GetStatus", &LuaBattleGround::GetStatus }, - - { NULL, NULL, METHOD_REG_NONE } + { "GetStatus", &LuaBattleGround::GetStatus } }; }; #endif diff --git a/methods/TrinityCore/CorpseMethods.h b/methods/TrinityCore/CorpseMethods.h index f2d9dbe4de..d55b5b7e6b 100644 --- a/methods/TrinityCore/CorpseMethods.h +++ b/methods/TrinityCore/CorpseMethods.h @@ -83,9 +83,7 @@ namespace LuaCorpse // Other { "ResetGhostTime", &LuaCorpse::ResetGhostTime }, - { "SaveToDB", &LuaCorpse::SaveToDB }, - - { NULL, NULL, METHOD_REG_NONE } + { "SaveToDB", &LuaCorpse::SaveToDB } }; }; #endif diff --git a/methods/TrinityCore/CreatureMethods.h b/methods/TrinityCore/CreatureMethods.h index e25c1328f3..004601e1fc 100644 --- a/methods/TrinityCore/CreatureMethods.h +++ b/methods/TrinityCore/CreatureMethods.h @@ -1509,9 +1509,7 @@ namespace LuaCreature { "ResetAllThreat", &LuaCreature::ResetAllThreat }, { "FixateTarget", &LuaCreature::FixateTarget }, { "ClearFixate", &LuaCreature::ClearFixate }, - { "RemoveFromWorld", &LuaCreature::RemoveFromWorld }, - - { NULL, NULL, METHOD_REG_NONE } + { "RemoveFromWorld", &LuaCreature::RemoveFromWorld } }; }; #endif diff --git a/methods/TrinityCore/ElunaQueryMethods.h b/methods/TrinityCore/ElunaQueryMethods.h index 1e95c0fad6..f27ceb3af7 100644 --- a/methods/TrinityCore/ElunaQueryMethods.h +++ b/methods/TrinityCore/ElunaQueryMethods.h @@ -350,9 +350,7 @@ namespace LuaQuery // Boolean { "NextRow", &LuaQuery::NextRow }, - { "IsNull", &LuaQuery::IsNull }, - - { NULL, NULL, METHOD_REG_NONE } + { "IsNull", &LuaQuery::IsNull } }; }; #undef RESULT diff --git a/methods/TrinityCore/GameObjectMethods.h b/methods/TrinityCore/GameObjectMethods.h index 1838abf8e9..ceb1313deb 100644 --- a/methods/TrinityCore/GameObjectMethods.h +++ b/methods/TrinityCore/GameObjectMethods.h @@ -337,9 +337,7 @@ namespace LuaGameObject { "UseDoorOrButton", &LuaGameObject::UseDoorOrButton }, { "Despawn", &LuaGameObject::Despawn }, { "Respawn", &LuaGameObject::Respawn }, - { "SaveToDB", &LuaGameObject::SaveToDB }, - - { NULL, NULL, METHOD_REG_NONE } + { "SaveToDB", &LuaGameObject::SaveToDB } }; }; #endif diff --git a/methods/TrinityCore/GlobalMethods.h b/methods/TrinityCore/GlobalMethods.h index 528a5145d2..73a315eefe 100644 --- a/methods/TrinityCore/GlobalMethods.h +++ b/methods/TrinityCore/GlobalMethods.h @@ -3108,7 +3108,7 @@ namespace LuaGlobalFunctions return 0; } - ElunaGlobal::ElunaRegister GlobalMethods[] = + ElunaRegister<> GlobalMethods[] = { // Hooks { "RegisterPacketEvent", &LuaGlobalFunctions::RegisterPacketEvent }, @@ -3224,9 +3224,7 @@ namespace LuaGlobalFunctions { "CreateInt64", &LuaGlobalFunctions::CreateLongLong }, { "CreateUint64", &LuaGlobalFunctions::CreateULongLong }, { "StartGameEvent", &LuaGlobalFunctions::StartGameEvent }, - { "StopGameEvent", &LuaGlobalFunctions::StopGameEvent }, - - { NULL, NULL, METHOD_REG_NONE } + { "StopGameEvent", &LuaGlobalFunctions::StopGameEvent } }; } #endif diff --git a/methods/TrinityCore/GroupMethods.h b/methods/TrinityCore/GroupMethods.h index 1bd46773a0..0e7bd9a6d6 100644 --- a/methods/TrinityCore/GroupMethods.h +++ b/methods/TrinityCore/GroupMethods.h @@ -485,9 +485,7 @@ namespace LuaGroup // Other { "SendPacket", &LuaGroup::SendPacket }, { "ConvertToLFG", &LuaGroup::ConvertToLFG, METHOD_REG_WORLD }, // World state method only in multistate - { "ConvertToRaid", &LuaGroup::ConvertToRaid, METHOD_REG_WORLD }, // World state method only in multistate - - { NULL, NULL, METHOD_REG_NONE } + { "ConvertToRaid", &LuaGroup::ConvertToRaid, METHOD_REG_WORLD } // World state method only in multistate }; }; diff --git a/methods/TrinityCore/GuildMethods.h b/methods/TrinityCore/GuildMethods.h index 4cc6acc63b..ef7ed1f77e 100644 --- a/methods/TrinityCore/GuildMethods.h +++ b/methods/TrinityCore/GuildMethods.h @@ -279,9 +279,7 @@ namespace LuaGuild { "SendPacketToRanked", &LuaGuild::SendPacketToRanked }, { "Disband", &LuaGuild::Disband, METHOD_REG_WORLD }, // World state method only in multistate { "AddMember", &LuaGuild::AddMember, METHOD_REG_WORLD }, // World state method only in multistate - { "DeleteMember", &LuaGuild::DeleteMember, METHOD_REG_WORLD }, // World state method only in multistate - - { NULL, NULL, METHOD_REG_NONE } + { "DeleteMember", &LuaGuild::DeleteMember, METHOD_REG_WORLD } // World state method only in multistate }; }; #endif diff --git a/methods/TrinityCore/ItemMethods.h b/methods/TrinityCore/ItemMethods.h index fdd8f0a162..2f25630f34 100644 --- a/methods/TrinityCore/ItemMethods.h +++ b/methods/TrinityCore/ItemMethods.h @@ -840,9 +840,7 @@ namespace LuaItem { "ClearEnchantment", &LuaItem::ClearEnchantment }, // Other - { "SaveToDB", &LuaItem::SaveToDB }, - - { NULL, NULL, METHOD_REG_NONE } + { "SaveToDB", &LuaItem::SaveToDB } }; }; #endif diff --git a/methods/TrinityCore/MapMethods.h b/methods/TrinityCore/MapMethods.h index 50601014f4..f94994a399 100644 --- a/methods/TrinityCore/MapMethods.h +++ b/methods/TrinityCore/MapMethods.h @@ -380,9 +380,7 @@ namespace LuaMap // Other { "SaveInstanceData", &LuaMap::SaveInstanceData }, - { "Data", &LuaMap::Data }, - - { NULL, NULL, METHOD_REG_NONE } + { "Data", &LuaMap::Data } }; }; #endif diff --git a/methods/TrinityCore/ObjectMethods.h b/methods/TrinityCore/ObjectMethods.h index b33e963045..629a0e736b 100644 --- a/methods/TrinityCore/ObjectMethods.h +++ b/methods/TrinityCore/ObjectMethods.h @@ -490,9 +490,7 @@ namespace LuaObject { "ToCreature", &LuaObject::ToCreature }, { "ToPlayer", &LuaObject::ToPlayer }, { "ToCorpse", &LuaObject::ToCorpse }, - { "RemoveFlag", &LuaObject::RemoveFlag }, - - { NULL, NULL, METHOD_REG_NONE } + { "RemoveFlag", &LuaObject::RemoveFlag } }; }; #endif diff --git a/methods/TrinityCore/PlayerMethods.h b/methods/TrinityCore/PlayerMethods.h index 120314e65b..9e4cb5d5ba 100644 --- a/methods/TrinityCore/PlayerMethods.h +++ b/methods/TrinityCore/PlayerMethods.h @@ -3973,22 +3973,20 @@ namespace LuaPlayer { "SendMovieStart", &LuaPlayer::SendMovieStart }, // Not implemented methods - { "GetHonorStoredKills", nullptr, METHOD_REG_NONE }, // classic only - { "GetRankPoints", nullptr, METHOD_REG_NONE }, // classic only - { "GetHonorLastWeekStandingPos", nullptr, METHOD_REG_NONE }, // classic only + { "GetHonorStoredKills", METHOD_REG_NONE }, // classic only + { "GetRankPoints", METHOD_REG_NONE }, // classic only + { "GetHonorLastWeekStandingPos", METHOD_REG_NONE }, // classic only - { "SetHonorStoredKills", nullptr, METHOD_REG_NONE }, // classic only - { "SetRankPoints", nullptr, METHOD_REG_NONE }, // classic only - { "SetHonorLastWeekStandingPos", nullptr, METHOD_REG_NONE }, // classic only + { "SetHonorStoredKills", METHOD_REG_NONE }, // classic only + { "SetRankPoints", METHOD_REG_NONE }, // classic only + { "SetHonorLastWeekStandingPos", METHOD_REG_NONE }, // classic only - { "CanFlyInZone", nullptr, METHOD_REG_NONE }, // not implemented + { "CanFlyInZone", METHOD_REG_NONE }, // not implemented - { "UpdateHonor", nullptr, METHOD_REG_NONE }, // classic only - { "ResetHonor", nullptr, METHOD_REG_NONE }, // classic only - { "ClearHonorInfo", nullptr, METHOD_REG_NONE }, // classic only - { "GainSpellComboPoints", nullptr, METHOD_REG_NONE }, // not implemented - - { NULL, NULL, METHOD_REG_NONE } + { "UpdateHonor", METHOD_REG_NONE }, // classic only + { "ResetHonor", METHOD_REG_NONE }, // classic only + { "ClearHonorInfo", METHOD_REG_NONE }, // classic only + { "GainSpellComboPoints", METHOD_REG_NONE } // not implemented }; }; #endif diff --git a/methods/TrinityCore/QuestMethods.h b/methods/TrinityCore/QuestMethods.h index 38a05a2991..135acc42a5 100644 --- a/methods/TrinityCore/QuestMethods.h +++ b/methods/TrinityCore/QuestMethods.h @@ -196,9 +196,7 @@ namespace LuaQuest // Boolean { "HasFlag", &LuaQuest::HasFlag }, { "IsDaily", &LuaQuest::IsDaily }, - { "IsRepeatable", &LuaQuest::IsRepeatable }, - - { NULL, NULL, METHOD_REG_NONE } + { "IsRepeatable", &LuaQuest::IsRepeatable } }; }; #endif diff --git a/methods/TrinityCore/SpellMethods.h b/methods/TrinityCore/SpellMethods.h index 30c4a89161..f868d88adb 100644 --- a/methods/TrinityCore/SpellMethods.h +++ b/methods/TrinityCore/SpellMethods.h @@ -190,9 +190,7 @@ namespace LuaSpell // Other { "Cancel", &LuaSpell::Cancel }, { "Cast", &LuaSpell::Cast }, - { "Finish", &LuaSpell::Finish }, - - { NULL, NULL, METHOD_REG_NONE } + { "Finish", &LuaSpell::Finish } }; }; #endif diff --git a/methods/TrinityCore/UnitMethods.h b/methods/TrinityCore/UnitMethods.h index 14a54edc0b..379887a9d6 100644 --- a/methods/TrinityCore/UnitMethods.h +++ b/methods/TrinityCore/UnitMethods.h @@ -2719,9 +2719,7 @@ namespace LuaUnit { "DealHeal", &LuaUnit::DealHeal }, // Not implemented methods - { "SummonGuardian", nullptr, METHOD_REG_NONE }, // not implemented - - { NULL, NULL, METHOD_REG_NONE } + { "SummonGuardian", METHOD_REG_NONE } // not implemented }; }; #endif diff --git a/methods/TrinityCore/VehicleMethods.h b/methods/TrinityCore/VehicleMethods.h index cf27fedf9a..7b8ab0cc62 100644 --- a/methods/TrinityCore/VehicleMethods.h +++ b/methods/TrinityCore/VehicleMethods.h @@ -101,9 +101,7 @@ namespace LuaVehicle // Other { "AddPassenger", &LuaVehicle::AddPassenger }, - { "RemovePassenger", &LuaVehicle::RemovePassenger }, - - { NULL, NULL, METHOD_REG_NONE } + { "RemovePassenger", &LuaVehicle::RemovePassenger } }; } diff --git a/methods/TrinityCore/WorldObjectMethods.h b/methods/TrinityCore/WorldObjectMethods.h index d7274a73a5..885dd1e447 100644 --- a/methods/TrinityCore/WorldObjectMethods.h +++ b/methods/TrinityCore/WorldObjectMethods.h @@ -1185,9 +1185,7 @@ namespace LuaWorldObject { "PlayMusic", &LuaWorldObject::PlayMusic }, { "PlayDirectSound", &LuaWorldObject::PlayDirectSound }, { "PlayDistanceSound", &LuaWorldObject::PlayDistanceSound }, - { "Data", &LuaWorldObject::Data }, - - { NULL, NULL, METHOD_REG_NONE } + { "Data", &LuaWorldObject::Data } }; }; #endif diff --git a/methods/TrinityCore/WorldPacketMethods.h b/methods/TrinityCore/WorldPacketMethods.h index 86d3bbdb3f..52b1a223fe 100644 --- a/methods/TrinityCore/WorldPacketMethods.h +++ b/methods/TrinityCore/WorldPacketMethods.h @@ -338,9 +338,7 @@ namespace LuaPacket { "WriteGUID", &LuaPacket::WriteGUID }, { "WriteString", &LuaPacket::WriteString }, { "WriteFloat", &LuaPacket::WriteFloat }, - { "WriteDouble", &LuaPacket::WriteDouble }, - - { NULL, NULL, METHOD_REG_NONE } + { "WriteDouble", &LuaPacket::WriteDouble } }; }; diff --git a/methods/VMangos/AuraMethods.h b/methods/VMangos/AuraMethods.h index a25b085112..df2569eef9 100644 --- a/methods/VMangos/AuraMethods.h +++ b/methods/VMangos/AuraMethods.h @@ -186,9 +186,7 @@ namespace LuaAura { "SetStackAmount", &LuaAura::SetStackAmount }, // Other - { "Remove", &LuaAura::Remove }, - - { NULL, NULL, METHOD_REG_NONE } + { "Remove", &LuaAura::Remove } }; }; #endif diff --git a/methods/VMangos/BattleGroundMethods.h b/methods/VMangos/BattleGroundMethods.h index 0a459e2b70..9442fc277a 100644 --- a/methods/VMangos/BattleGroundMethods.h +++ b/methods/VMangos/BattleGroundMethods.h @@ -241,9 +241,7 @@ namespace LuaBattleGround { "GetMaxPlayersPerTeam", &LuaBattleGround::GetMaxPlayersPerTeam }, { "GetMinPlayersPerTeam", &LuaBattleGround::GetMinPlayersPerTeam }, { "GetWinner", &LuaBattleGround::GetWinner }, - { "GetStatus", &LuaBattleGround::GetStatus }, - - { NULL, NULL, METHOD_REG_NONE } + { "GetStatus", &LuaBattleGround::GetStatus } }; }; #endif diff --git a/methods/VMangos/CorpseMethods.h b/methods/VMangos/CorpseMethods.h index b4f4a94793..e263d04a0b 100644 --- a/methods/VMangos/CorpseMethods.h +++ b/methods/VMangos/CorpseMethods.h @@ -83,9 +83,7 @@ namespace LuaCorpse // Other { "ResetGhostTime", &LuaCorpse::ResetGhostTime }, - { "SaveToDB", &LuaCorpse::SaveToDB }, - - { NULL, NULL, METHOD_REG_NONE } + { "SaveToDB", &LuaCorpse::SaveToDB } }; }; #endif diff --git a/methods/VMangos/CreatureMethods.h b/methods/VMangos/CreatureMethods.h index 62967637f4..ee2fc6d70e 100644 --- a/methods/VMangos/CreatureMethods.h +++ b/methods/VMangos/CreatureMethods.h @@ -1201,22 +1201,20 @@ namespace LuaCreature { "UpdateEntry", &LuaCreature::UpdateEntry }, // Not implemented methods - { "GetWaypointPath", nullptr, METHOD_REG_NONE }, // not implemented - { "GetLootMode", nullptr, METHOD_REG_NONE }, // not implemented - { "SetRegeneratingHealth", nullptr, METHOD_REG_NONE }, // not implemented - { "SetLootMode", nullptr, METHOD_REG_NONE }, // not implemented - { "SetReactState", nullptr, METHOD_REG_NONE }, // not implemented - { "IsDungeonBoss", nullptr, METHOD_REG_NONE }, // not implemented - { "IsTrigger", nullptr, METHOD_REG_NONE }, // not implemented - { "CanStartAttack", nullptr, METHOD_REG_NONE }, // not implemented - { "IsDamageEnoughForLootingAndReward", nullptr, METHOD_REG_NONE }, // not implemented - { "HasLootMode", nullptr, METHOD_REG_NONE }, // not implemented - { "AddLootMode", nullptr, METHOD_REG_NONE }, // not implemented - { "ResetLootMode", nullptr, METHOD_REG_NONE }, // not implemented - { "RemoveLootMode", nullptr, METHOD_REG_NONE }, // not implemented - { "RemoveFromWorld", nullptr, METHOD_REG_NONE }, // not implemented - - { NULL, NULL } + { "GetWaypointPath", METHOD_REG_NONE }, // not implemented + { "GetLootMode", METHOD_REG_NONE }, // not implemented + { "SetRegeneratingHealth", METHOD_REG_NONE }, // not implemented + { "SetLootMode", METHOD_REG_NONE }, // not implemented + { "SetReactState", METHOD_REG_NONE }, // not implemented + { "IsDungeonBoss", METHOD_REG_NONE }, // not implemented + { "IsTrigger", METHOD_REG_NONE }, // not implemented + { "CanStartAttack", METHOD_REG_NONE }, // not implemented + { "IsDamageEnoughForLootingAndReward", METHOD_REG_NONE }, // not implemented + { "HasLootMode", METHOD_REG_NONE }, // not implemented + { "AddLootMode", METHOD_REG_NONE }, // not implemented + { "ResetLootMode", METHOD_REG_NONE }, // not implemented + { "RemoveLootMode", METHOD_REG_NONE }, // not implemented + { "RemoveFromWorld", METHOD_REG_NONE } // not implemented }; }; #endif diff --git a/methods/VMangos/ElunaQueryMethods.h b/methods/VMangos/ElunaQueryMethods.h index 3ab85a70ec..cdf30a43bb 100644 --- a/methods/VMangos/ElunaQueryMethods.h +++ b/methods/VMangos/ElunaQueryMethods.h @@ -333,9 +333,7 @@ namespace LuaQuery // Boolean { "NextRow", &LuaQuery::NextRow }, - { "IsNull", &LuaQuery::IsNull }, - - { NULL, NULL, METHOD_REG_NONE } + { "IsNull", &LuaQuery::IsNull } }; }; #undef RESULT diff --git a/methods/VMangos/GameObjectMethods.h b/methods/VMangos/GameObjectMethods.h index f4d58e42c2..7c95c068d3 100644 --- a/methods/VMangos/GameObjectMethods.h +++ b/methods/VMangos/GameObjectMethods.h @@ -330,9 +330,7 @@ namespace LuaGameObject { "SaveToDB", &LuaGameObject::SaveToDB }, // Not implemented methods - { "IsDestructible", nullptr, METHOD_REG_NONE }, // Not implemented - - { NULL, NULL, METHOD_REG_NONE } + { "IsDestructible", METHOD_REG_NONE } // Not implemented }; }; #endif diff --git a/methods/VMangos/GlobalMethods.h b/methods/VMangos/GlobalMethods.h index a575aeb696..365e7833f9 100644 --- a/methods/VMangos/GlobalMethods.h +++ b/methods/VMangos/GlobalMethods.h @@ -2872,7 +2872,7 @@ namespace LuaGlobalFunctions return 0; } - ElunaGlobal::ElunaRegister GlobalMethods[] = + ElunaRegister<> GlobalMethods[] = { // Hooks { "RegisterPacketEvent", &LuaGlobalFunctions::RegisterPacketEvent }, @@ -2980,9 +2980,7 @@ namespace LuaGlobalFunctions { "CreateInt64", &LuaGlobalFunctions::CreateLongLong }, { "CreateUint64", &LuaGlobalFunctions::CreateULongLong }, { "StartGameEvent", &LuaGlobalFunctions::StartGameEvent }, - { "StopGameEvent", &LuaGlobalFunctions::StopGameEvent }, - - { NULL, NULL, METHOD_REG_NONE } + { "StopGameEvent", &LuaGlobalFunctions::StopGameEvent } }; } #endif diff --git a/methods/VMangos/GroupMethods.h b/methods/VMangos/GroupMethods.h index 4ed139f551..b3b6baaa66 100644 --- a/methods/VMangos/GroupMethods.h +++ b/methods/VMangos/GroupMethods.h @@ -383,13 +383,11 @@ namespace LuaGroup { "ConvertToRaid", &LuaGroup::ConvertToRaid, METHOD_REG_WORLD }, // World state method only in multistate // Not implemented methods - { "IsLFGGroup", nullptr, METHOD_REG_NONE }, // not implemented - { "IsBFGroup", nullptr, METHOD_REG_NONE }, // not implemented - { "ConvertToLFG", nullptr, METHOD_REG_NONE }, // not implemented - { "GetMemberFlags", nullptr, METHOD_REG_NONE }, // not implemented - { "SetMemberFlag", nullptr, METHOD_REG_NONE }, // not implemented - - { NULL, NULL, METHOD_REG_NONE } + { "IsLFGGroup", METHOD_REG_NONE }, // not implemented + { "IsBFGroup", METHOD_REG_NONE }, // not implemented + { "ConvertToLFG", METHOD_REG_NONE }, // not implemented + { "GetMemberFlags", METHOD_REG_NONE }, // not implemented + { "SetMemberFlag", METHOD_REG_NONE } // not implemented }; }; diff --git a/methods/VMangos/GuildMethods.h b/methods/VMangos/GuildMethods.h index 05cd108931..72124b1d5d 100644 --- a/methods/VMangos/GuildMethods.h +++ b/methods/VMangos/GuildMethods.h @@ -244,9 +244,7 @@ namespace LuaGuild { "AddMember", &LuaGuild::AddMember, METHOD_REG_WORLD }, // World state method only in multistate { "DeleteMember", &LuaGuild::DeleteMember, METHOD_REG_WORLD }, // World state method only in multistate - { "SetBankTabText", nullptr, METHOD_REG_NONE }, // not implemented - - { NULL, NULL, METHOD_REG_NONE } + { "SetBankTabText", METHOD_REG_NONE } // not implemented }; }; #endif diff --git a/methods/VMangos/ItemMethods.h b/methods/VMangos/ItemMethods.h index b4b6ad71a1..4b2b76d986 100644 --- a/methods/VMangos/ItemMethods.h +++ b/methods/VMangos/ItemMethods.h @@ -713,17 +713,15 @@ namespace LuaItem { "SaveToDB", &LuaItem::SaveToDB }, // Not implemented methods - { "GetRandomSuffix", nullptr, METHOD_REG_NONE }, // not implemented - { "GetStatsCount", nullptr, METHOD_REG_NONE }, // not implemented - { "GetFlags2", nullptr, METHOD_REG_NONE }, // not avaliable in Classic/TBC - { "IsPotion", nullptr, METHOD_REG_NONE }, // not implemented in VMANGOS - { "IsRefundExpired", nullptr, METHOD_REG_NONE }, // not implemented - { "IsCurrencyToken", nullptr, METHOD_REG_NONE }, // not implemented - { "IsBoundAccountWide", nullptr, METHOD_REG_NONE }, // not implemented - { "IsWeaponVellum", nullptr, METHOD_REG_NONE }, // not implemented - { "IsArmorVellum", nullptr, METHOD_REG_NONE }, // not implemented - - { NULL, NULL, METHOD_REG_NONE } + { "GetRandomSuffix", METHOD_REG_NONE }, // not implemented + { "GetStatsCount", METHOD_REG_NONE }, // not implemented + { "GetFlags2", METHOD_REG_NONE }, // not avaliable in Classic/TBC + { "IsPotion", METHOD_REG_NONE }, // not implemented in VMANGOS + { "IsRefundExpired", METHOD_REG_NONE }, // not implemented + { "IsCurrencyToken", METHOD_REG_NONE }, // not implemented + { "IsBoundAccountWide", METHOD_REG_NONE }, // not implemented + { "IsWeaponVellum", METHOD_REG_NONE }, // not implemented + { "IsArmorVellum", METHOD_REG_NONE } // not implemented }; }; #endif diff --git a/methods/VMangos/MapMethods.h b/methods/VMangos/MapMethods.h index d1d54822fd..d88a00ced3 100644 --- a/methods/VMangos/MapMethods.h +++ b/methods/VMangos/MapMethods.h @@ -323,10 +323,8 @@ namespace LuaMap // Other { "SaveInstanceData", &LuaMap::SaveInstanceData }, - { "IsArena", nullptr, METHOD_REG_NONE }, - { "IsHeroic", nullptr, METHOD_REG_NONE }, - - { NULL, NULL, METHOD_REG_NONE } + { "IsArena", METHOD_REG_NONE }, + { "IsHeroic", METHOD_REG_NONE } }; }; #endif diff --git a/methods/VMangos/ObjectMethods.h b/methods/VMangos/ObjectMethods.h index 6dd0f54c2b..0c66249232 100644 --- a/methods/VMangos/ObjectMethods.h +++ b/methods/VMangos/ObjectMethods.h @@ -490,9 +490,7 @@ namespace LuaObject { "ToCreature", &LuaObject::ToCreature }, { "ToPlayer", &LuaObject::ToPlayer }, { "ToCorpse", &LuaObject::ToCorpse }, - { "RemoveFlag", &LuaObject::RemoveFlag }, - - { NULL, NULL, METHOD_REG_NONE } + { "RemoveFlag", &LuaObject::RemoveFlag } }; }; #endif diff --git a/methods/VMangos/PlayerMethods.h b/methods/VMangos/PlayerMethods.h index 7b0c08b9bf..98fab50fac 100644 --- a/methods/VMangos/PlayerMethods.h +++ b/methods/VMangos/PlayerMethods.h @@ -4366,37 +4366,35 @@ namespace LuaPlayer #endif // Not implemented methods - { "GetChampioningFaction", nullptr, METHOD_REG_NONE }, // not implemented - { "GetRecruiterId", nullptr, METHOD_REG_NONE }, // not implemented - { "GetMailItem", nullptr, METHOD_REG_NONE }, //not implemented in VMaNGOS - { "SetMovement", nullptr, METHOD_REG_NONE }, // not implemented - { "SetFFA", nullptr, METHOD_REG_NONE }, // not implemented - { "IsImmuneToEnvironmentalDamage", nullptr, METHOD_REG_NONE }, // not implemented - { "InRandomLfgDungeon", nullptr, METHOD_REG_NONE }, // not implemented - { "HasPendingBind", nullptr, METHOD_REG_NONE }, // not implemented - { "CanFlyInZone", nullptr, METHOD_REG_NONE }, // not implemented - { "IsNeverVisible", nullptr, METHOD_REG_NONE }, // not implemented, - { "IsUsingLfg", nullptr, METHOD_REG_NONE }, // not implemented, - { "HasReceivedQuestReward", nullptr, METHOD_REG_NONE }, // not implemented, - { "IsOutdoorPvPActive", nullptr, METHOD_REG_NONE }, // not implemented, - { "IsARecruiter", nullptr, METHOD_REG_NONE }, // not implemented, - { "RemovePet", nullptr, METHOD_REG_NONE }, // not implemented - { "SummonPet", nullptr, METHOD_REG_NONE }, // not implemented - { "RemoveActiveQuest", nullptr, METHOD_REG_NONE }, // not implemented - { "RemoveRewardedQuest", nullptr, METHOD_REG_NONE }, // not implemented - { "KilledPlayerCredit", nullptr, METHOD_REG_NONE }, // not implemented - { "KillGOCredit", nullptr, METHOD_REG_NONE }, // not implemented - { "GainSpellComboPoints", nullptr, METHOD_REG_NONE }, // not implemented - { "AddTalent", nullptr, METHOD_REG_NONE }, // not implemented - { "BindToInstance", nullptr, METHOD_REG_NONE }, // not implemented - { "SetAchievement", nullptr, METHOD_REG_NONE }, // not implemented - { "GetMailCount", nullptr, METHOD_REG_NONE }, // not implemented - { "GetXP", nullptr, METHOD_REG_NONE }, // not implemented - { "GetXPForNextLevel", nullptr, METHOD_REG_NONE }, // not implemented - { "CanCompleteRepeatableQuest", nullptr, METHOD_REG_NONE }, // not implemented - { "CanRewardQuest", nullptr, METHOD_REG_NONE }, // not implemented - - { NULL, NULL, METHOD_REG_NONE } + { "GetChampioningFaction", METHOD_REG_NONE }, // not implemented + { "GetRecruiterId", METHOD_REG_NONE }, // not implemented + { "GetMailItem", METHOD_REG_NONE }, //not implemented in VMaNGOS + { "SetMovement", METHOD_REG_NONE }, // not implemented + { "SetFFA", METHOD_REG_NONE }, // not implemented + { "IsImmuneToEnvironmentalDamage", METHOD_REG_NONE }, // not implemented + { "InRandomLfgDungeon", METHOD_REG_NONE }, // not implemented + { "HasPendingBind", METHOD_REG_NONE }, // not implemented + { "CanFlyInZone", METHOD_REG_NONE }, // not implemented + { "IsNeverVisible", METHOD_REG_NONE }, // not implemented, + { "IsUsingLfg", METHOD_REG_NONE }, // not implemented, + { "HasReceivedQuestReward", METHOD_REG_NONE }, // not implemented, + { "IsOutdoorPvPActive", METHOD_REG_NONE }, // not implemented, + { "IsARecruiter", METHOD_REG_NONE }, // not implemented, + { "RemovePet", METHOD_REG_NONE }, // not implemented + { "SummonPet", METHOD_REG_NONE }, // not implemented + { "RemoveActiveQuest", METHOD_REG_NONE }, // not implemented + { "RemoveRewardedQuest", METHOD_REG_NONE }, // not implemented + { "KilledPlayerCredit", METHOD_REG_NONE }, // not implemented + { "KillGOCredit", METHOD_REG_NONE }, // not implemented + { "GainSpellComboPoints", METHOD_REG_NONE }, // not implemented + { "AddTalent", METHOD_REG_NONE }, // not implemented + { "BindToInstance", METHOD_REG_NONE }, // not implemented + { "SetAchievement", METHOD_REG_NONE }, // not implemented + { "GetMailCount", METHOD_REG_NONE }, // not implemented + { "GetXP", METHOD_REG_NONE }, // not implemented + { "GetXPForNextLevel", METHOD_REG_NONE }, // not implemented + { "CanCompleteRepeatableQuest", METHOD_REG_NONE }, // not implemented + { "CanRewardQuest", METHOD_REG_NONE } // not implemented }; }; #endif diff --git a/methods/VMangos/QuestMethods.h b/methods/VMangos/QuestMethods.h index a71c9f6713..c55d9d9afe 100644 --- a/methods/VMangos/QuestMethods.h +++ b/methods/VMangos/QuestMethods.h @@ -204,9 +204,7 @@ namespace LuaQuest #endif // Not implemented methods - { "GetMaxLevel", nullptr, METHOD_REG_NONE }, // not implemented - - { NULL, NULL, METHOD_REG_NONE } + { "GetMaxLevel", METHOD_REG_NONE } // not implemented }; }; #endif diff --git a/methods/VMangos/SpellMethods.h b/methods/VMangos/SpellMethods.h index c709ebfa29..1178816103 100644 --- a/methods/VMangos/SpellMethods.h +++ b/methods/VMangos/SpellMethods.h @@ -210,9 +210,7 @@ namespace LuaSpell // Other { "Cancel", &LuaSpell::Cancel }, { "Cast", &LuaSpell::Cast }, - { "Finish", &LuaSpell::Finish }, - - { NULL, NULL, METHOD_REG_NONE } + { "Finish", &LuaSpell::Finish } }; }; #endif diff --git a/methods/VMangos/UnitMethods.h b/methods/VMangos/UnitMethods.h index 1c30786d05..feffa1f650 100644 --- a/methods/VMangos/UnitMethods.h +++ b/methods/VMangos/UnitMethods.h @@ -3145,22 +3145,20 @@ namespace LuaUnit #endif // Not implemented mehtods - { "GetVehicle", nullptr, METHOD_REG_NONE }, // not implemented - { "SetStunned", nullptr, METHOD_REG_NONE }, // not implemented - { "SetCanFly", nullptr, METHOD_REG_NONE }, // not implemented - { "SetVisible", nullptr, METHOD_REG_NONE }, // not implemented - { "IsVisible", nullptr, METHOD_REG_NONE }, // not implemented, - { "IsMoving", nullptr, METHOD_REG_NONE }, // not implemented - { "IsFlying", nullptr, METHOD_REG_NONE }, // not implemented - { "RestoreDisplayId", nullptr, METHOD_REG_NONE }, // not implemented - { "RestoreFaction", nullptr, METHOD_REG_NONE }, // not implemented - { "RemoveBindSightAuras", nullptr, METHOD_REG_NONE }, // not implemented - { "RemoveCharmAuras", nullptr, METHOD_REG_NONE }, // not implemented - { "DisableMelee", nullptr, METHOD_REG_NONE }, // not implemented - { "SummonGuardian", nullptr, METHOD_REG_NONE }, // not implemented - { "SetImmuneTo", nullptr, METHOD_REG_NONE }, // not implemented - - { NULL, NULL, METHOD_REG_NONE } + { "GetVehicle", METHOD_REG_NONE }, // not implemented + { "SetStunned", METHOD_REG_NONE }, // not implemented + { "SetCanFly", METHOD_REG_NONE }, // not implemented + { "SetVisible", METHOD_REG_NONE }, // not implemented + { "IsVisible", METHOD_REG_NONE }, // not implemented, + { "IsMoving", METHOD_REG_NONE }, // not implemented + { "IsFlying", METHOD_REG_NONE }, // not implemented + { "RestoreDisplayId", METHOD_REG_NONE }, // not implemented + { "RestoreFaction", METHOD_REG_NONE }, // not implemented + { "RemoveBindSightAuras", METHOD_REG_NONE }, // not implemented + { "RemoveCharmAuras", METHOD_REG_NONE }, // not implemented + { "DisableMelee", METHOD_REG_NONE }, // not implemented + { "SummonGuardian", METHOD_REG_NONE }, // not implemented + { "SetImmuneTo", METHOD_REG_NONE } // not implemented }; }; #endif diff --git a/methods/VMangos/VehicleMethods.h b/methods/VMangos/VehicleMethods.h index 55870b283f..9751c06496 100644 --- a/methods/VMangos/VehicleMethods.h +++ b/methods/VMangos/VehicleMethods.h @@ -117,9 +117,7 @@ namespace LuaVehicle // Other { "AddPassenger", &LuaVehicle::AddPassenger }, - { "RemovePassenger", &LuaVehicle::RemovePassenger }, - - { NULL, NULL } + { "RemovePassenger", &LuaVehicle::RemovePassenger } }; } diff --git a/methods/VMangos/WorldObjectMethods.h b/methods/VMangos/WorldObjectMethods.h index 2a503a6d3f..1617c9d453 100644 --- a/methods/VMangos/WorldObjectMethods.h +++ b/methods/VMangos/WorldObjectMethods.h @@ -1223,9 +1223,7 @@ namespace LuaWorldObject { "RemoveEvents", &LuaWorldObject::RemoveEvents }, { "PlayMusic", &LuaWorldObject::PlayMusic }, { "PlayDirectSound", &LuaWorldObject::PlayDirectSound }, - { "PlayDistanceSound", &LuaWorldObject::PlayDistanceSound }, - - { NULL, NULL, METHOD_REG_NONE } + { "PlayDistanceSound", &LuaWorldObject::PlayDistanceSound } }; }; #endif diff --git a/methods/VMangos/WorldPacketMethods.h b/methods/VMangos/WorldPacketMethods.h index 50b2e4a9f7..c0c009a460 100644 --- a/methods/VMangos/WorldPacketMethods.h +++ b/methods/VMangos/WorldPacketMethods.h @@ -337,9 +337,7 @@ namespace LuaPacket { "WriteGUID", &LuaPacket::WriteGUID }, { "WriteString", &LuaPacket::WriteString }, { "WriteFloat", &LuaPacket::WriteFloat }, - { "WriteDouble", &LuaPacket::WriteDouble }, - - { NULL, NULL, METHOD_REG_NONE } + { "WriteDouble", &LuaPacket::WriteDouble } }; };