From ff9b75019294a8f0d1e837e3db1672c6bee7335a Mon Sep 17 00:00:00 2001 From: Foereaper Date: Mon, 5 Aug 2024 18:27:56 +0200 Subject: [PATCH 01/13] ElunaTemplate refactor Merge the ElunaGlobal and the ElunaTemplate classes --- ElunaTemplate.h | 159 ++++++++++------------ LuaFunctions.cpp | 2 +- methods/TrinityCore/AuraMethods.h | 2 +- methods/TrinityCore/BattleGroundMethods.h | 2 +- methods/TrinityCore/CorpseMethods.h | 2 +- methods/TrinityCore/CreatureMethods.h | 2 +- methods/TrinityCore/ElunaQueryMethods.h | 2 +- methods/TrinityCore/GameObjectMethods.h | 2 +- methods/TrinityCore/GlobalMethods.h | 4 +- methods/TrinityCore/GroupMethods.h | 2 +- methods/TrinityCore/GuildMethods.h | 2 +- methods/TrinityCore/ItemMethods.h | 2 +- methods/TrinityCore/MapMethods.h | 2 +- methods/TrinityCore/ObjectMethods.h | 2 +- methods/TrinityCore/PlayerMethods.h | 2 +- methods/TrinityCore/QuestMethods.h | 2 +- methods/TrinityCore/SpellMethods.h | 2 +- methods/TrinityCore/UnitMethods.h | 2 +- methods/TrinityCore/VehicleMethods.h | 2 +- methods/TrinityCore/WorldObjectMethods.h | 2 +- methods/TrinityCore/WorldPacketMethods.h | 2 +- 21 files changed, 93 insertions(+), 108 deletions(-) diff --git a/ElunaTemplate.h b/ElunaTemplate.h index 0443e3a733..667b7e952c 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,31 @@ 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*); + std::variant mfunc; MethodRegisterState regState = METHOD_REG_ALL; + + // 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, std::nullptr_t, MethodRegisterState state = METHOD_REG_NONE) + : name(name), mfunc(std::monostate{}), regState(state) {} + + // constructor for empty entry (last entry of method table) + ElunaRegister(const char* name = nullptr, MethodRegisterState state = METHOD_REG_NONE) + : name(name), mfunc(std::monostate{}), regState(state) {} }; -template +template class ElunaTemplate { public: @@ -339,17 +281,35 @@ class ElunaTemplate lua_pop(E->L, 1); } - template + template static void SetMethods(Eluna* E, ElunaRegister* methodTable) { 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 + bool isGlobal = false; + const auto& firstMethod = methodTable[0]; + std::visit([&isGlobal](auto&& func) + { + using FuncType = std::decay_t; + if constexpr (std::is_same_v) + isGlobal = true; + }, firstMethod.mfunc); + + if (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) @@ -461,13 +421,38 @@ class ElunaTemplate { ElunaRegister* l = static_cast*>(lua_touserdata(L, lua_upvalueindex(1))); Eluna* E = static_cast(lua_touserdata(L, lua_upvalueindex(2))); + T* obj; - T* obj = E->CHECKOBJ(1); // get self - if (!obj) - return 0; + // determine if the method table functions are global or non-global + bool isGlobal = false; + std::visit([&](auto&& func) + { + using FuncType = std::decay_t; + if constexpr (std::is_same_v) + isGlobal = true; + }, l->mfunc); + + // we only check self if the method is not a global + if (!isGlobal) + { + obj = E->CHECKOBJ(1); + if (!obj) + return 0; + } int top = lua_gettop(L); - int expected = l->mfunc(E, obj); + + int expected = 0; + std::visit([&](auto&& func) + { + using FuncType = std::decay_t; + if constexpr (std::is_same_v) // global method + expected = func(E); + else if constexpr (std::is_same_v) // non-global method + expected = func(E, obj); + + }, l->mfunc); + int args = lua_gettop(L) - top; if (args < 0 || args > expected) { 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/TrinityCore/AuraMethods.h b/methods/TrinityCore/AuraMethods.h index c94245afea..cd1468c10c 100644 --- a/methods/TrinityCore/AuraMethods.h +++ b/methods/TrinityCore/AuraMethods.h @@ -188,7 +188,7 @@ namespace LuaAura // Other { "Remove", &LuaAura::Remove }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/TrinityCore/BattleGroundMethods.h b/methods/TrinityCore/BattleGroundMethods.h index 830a33b17a..517acf2c3f 100644 --- a/methods/TrinityCore/BattleGroundMethods.h +++ b/methods/TrinityCore/BattleGroundMethods.h @@ -243,7 +243,7 @@ namespace LuaBattleGround { "GetWinner", &LuaBattleGround::GetWinner }, { "GetStatus", &LuaBattleGround::GetStatus }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/TrinityCore/CorpseMethods.h b/methods/TrinityCore/CorpseMethods.h index f2d9dbe4de..16f55b492a 100644 --- a/methods/TrinityCore/CorpseMethods.h +++ b/methods/TrinityCore/CorpseMethods.h @@ -85,7 +85,7 @@ namespace LuaCorpse { "ResetGhostTime", &LuaCorpse::ResetGhostTime }, { "SaveToDB", &LuaCorpse::SaveToDB }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/TrinityCore/CreatureMethods.h b/methods/TrinityCore/CreatureMethods.h index e25c1328f3..81d0dd81ce 100644 --- a/methods/TrinityCore/CreatureMethods.h +++ b/methods/TrinityCore/CreatureMethods.h @@ -1511,7 +1511,7 @@ namespace LuaCreature { "ClearFixate", &LuaCreature::ClearFixate }, { "RemoveFromWorld", &LuaCreature::RemoveFromWorld }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/TrinityCore/ElunaQueryMethods.h b/methods/TrinityCore/ElunaQueryMethods.h index 1e95c0fad6..6248543312 100644 --- a/methods/TrinityCore/ElunaQueryMethods.h +++ b/methods/TrinityCore/ElunaQueryMethods.h @@ -352,7 +352,7 @@ namespace LuaQuery { "NextRow", &LuaQuery::NextRow }, { "IsNull", &LuaQuery::IsNull }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #undef RESULT diff --git a/methods/TrinityCore/GameObjectMethods.h b/methods/TrinityCore/GameObjectMethods.h index 1838abf8e9..6ec3f2412f 100644 --- a/methods/TrinityCore/GameObjectMethods.h +++ b/methods/TrinityCore/GameObjectMethods.h @@ -339,7 +339,7 @@ namespace LuaGameObject { "Respawn", &LuaGameObject::Respawn }, { "SaveToDB", &LuaGameObject::SaveToDB }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/TrinityCore/GlobalMethods.h b/methods/TrinityCore/GlobalMethods.h index 528a5145d2..dd36d288f8 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 }, @@ -3226,7 +3226,7 @@ namespace LuaGlobalFunctions { "StartGameEvent", &LuaGlobalFunctions::StartGameEvent }, { "StopGameEvent", &LuaGlobalFunctions::StopGameEvent }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; } #endif diff --git a/methods/TrinityCore/GroupMethods.h b/methods/TrinityCore/GroupMethods.h index 1bd46773a0..1f1a756c78 100644 --- a/methods/TrinityCore/GroupMethods.h +++ b/methods/TrinityCore/GroupMethods.h @@ -487,7 +487,7 @@ namespace LuaGroup { "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 } + { nullptr, METHOD_REG_NONE } }; }; diff --git a/methods/TrinityCore/GuildMethods.h b/methods/TrinityCore/GuildMethods.h index 4cc6acc63b..65ab6397db 100644 --- a/methods/TrinityCore/GuildMethods.h +++ b/methods/TrinityCore/GuildMethods.h @@ -281,7 +281,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 - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/TrinityCore/ItemMethods.h b/methods/TrinityCore/ItemMethods.h index fdd8f0a162..77a2084232 100644 --- a/methods/TrinityCore/ItemMethods.h +++ b/methods/TrinityCore/ItemMethods.h @@ -842,7 +842,7 @@ namespace LuaItem // Other { "SaveToDB", &LuaItem::SaveToDB }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/TrinityCore/MapMethods.h b/methods/TrinityCore/MapMethods.h index 50601014f4..e99ee63755 100644 --- a/methods/TrinityCore/MapMethods.h +++ b/methods/TrinityCore/MapMethods.h @@ -382,7 +382,7 @@ namespace LuaMap { "SaveInstanceData", &LuaMap::SaveInstanceData }, { "Data", &LuaMap::Data }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/TrinityCore/ObjectMethods.h b/methods/TrinityCore/ObjectMethods.h index b33e963045..ef9e0b56ac 100644 --- a/methods/TrinityCore/ObjectMethods.h +++ b/methods/TrinityCore/ObjectMethods.h @@ -492,7 +492,7 @@ namespace LuaObject { "ToCorpse", &LuaObject::ToCorpse }, { "RemoveFlag", &LuaObject::RemoveFlag }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/TrinityCore/PlayerMethods.h b/methods/TrinityCore/PlayerMethods.h index 120314e65b..c0c9afa41c 100644 --- a/methods/TrinityCore/PlayerMethods.h +++ b/methods/TrinityCore/PlayerMethods.h @@ -3988,7 +3988,7 @@ namespace LuaPlayer { "ClearHonorInfo", nullptr, METHOD_REG_NONE }, // classic only { "GainSpellComboPoints", nullptr, METHOD_REG_NONE }, // not implemented - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/TrinityCore/QuestMethods.h b/methods/TrinityCore/QuestMethods.h index 38a05a2991..4912cc24ac 100644 --- a/methods/TrinityCore/QuestMethods.h +++ b/methods/TrinityCore/QuestMethods.h @@ -198,7 +198,7 @@ namespace LuaQuest { "IsDaily", &LuaQuest::IsDaily }, { "IsRepeatable", &LuaQuest::IsRepeatable }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/TrinityCore/SpellMethods.h b/methods/TrinityCore/SpellMethods.h index 30c4a89161..803c8ba43e 100644 --- a/methods/TrinityCore/SpellMethods.h +++ b/methods/TrinityCore/SpellMethods.h @@ -192,7 +192,7 @@ namespace LuaSpell { "Cast", &LuaSpell::Cast }, { "Finish", &LuaSpell::Finish }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/TrinityCore/UnitMethods.h b/methods/TrinityCore/UnitMethods.h index 14a54edc0b..c99ca71335 100644 --- a/methods/TrinityCore/UnitMethods.h +++ b/methods/TrinityCore/UnitMethods.h @@ -2721,7 +2721,7 @@ namespace LuaUnit // Not implemented methods { "SummonGuardian", nullptr, METHOD_REG_NONE }, // not implemented - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/TrinityCore/VehicleMethods.h b/methods/TrinityCore/VehicleMethods.h index cf27fedf9a..6353f8bdbc 100644 --- a/methods/TrinityCore/VehicleMethods.h +++ b/methods/TrinityCore/VehicleMethods.h @@ -103,7 +103,7 @@ namespace LuaVehicle { "AddPassenger", &LuaVehicle::AddPassenger }, { "RemovePassenger", &LuaVehicle::RemovePassenger }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; } diff --git a/methods/TrinityCore/WorldObjectMethods.h b/methods/TrinityCore/WorldObjectMethods.h index d7274a73a5..13c53db9ab 100644 --- a/methods/TrinityCore/WorldObjectMethods.h +++ b/methods/TrinityCore/WorldObjectMethods.h @@ -1187,7 +1187,7 @@ namespace LuaWorldObject { "PlayDistanceSound", &LuaWorldObject::PlayDistanceSound }, { "Data", &LuaWorldObject::Data }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/TrinityCore/WorldPacketMethods.h b/methods/TrinityCore/WorldPacketMethods.h index 86d3bbdb3f..755576ad28 100644 --- a/methods/TrinityCore/WorldPacketMethods.h +++ b/methods/TrinityCore/WorldPacketMethods.h @@ -340,7 +340,7 @@ namespace LuaPacket { "WriteFloat", &LuaPacket::WriteFloat }, { "WriteDouble", &LuaPacket::WriteDouble }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; From 36f13fb8df2cd82b2320bb1c0c5c1dad8f50790b Mon Sep 17 00:00:00 2001 From: Foereaper Date: Mon, 5 Aug 2024 18:36:39 +0200 Subject: [PATCH 02/13] Clean up the remaining method headers --- methods/CMangos/AuraMethods.h | 2 +- methods/CMangos/BattleGroundMethods.h | 2 +- methods/CMangos/CorpseMethods.h | 2 +- methods/CMangos/CreatureMethods.h | 2 +- methods/CMangos/ElunaQueryMethods.h | 2 +- methods/CMangos/GameObjectMethods.h | 2 +- methods/CMangos/GlobalMethods.h | 4 ++-- methods/CMangos/GroupMethods.h | 2 +- methods/CMangos/GuildMethods.h | 2 +- methods/CMangos/ItemMethods.h | 2 +- methods/CMangos/MapMethods.h | 2 +- methods/CMangos/ObjectMethods.h | 2 +- methods/CMangos/PlayerMethods.h | 2 +- methods/CMangos/QuestMethods.h | 2 +- methods/CMangos/SpellMethods.h | 2 +- methods/CMangos/UnitMethods.h | 2 +- methods/CMangos/VehicleMethods.h | 2 +- methods/CMangos/WorldObjectMethods.h | 2 +- methods/CMangos/WorldPacketMethods.h | 2 +- methods/Mangos/AuraMethods.h | 2 +- methods/Mangos/BattleGroundMethods.h | 2 +- methods/Mangos/CorpseMethods.h | 2 +- methods/Mangos/CreatureMethods.h | 2 +- methods/Mangos/ElunaQueryMethods.h | 2 +- methods/Mangos/GameObjectMethods.h | 2 +- methods/Mangos/GlobalMethods.h | 4 ++-- methods/Mangos/GroupMethods.h | 2 +- methods/Mangos/GuildMethods.h | 2 +- methods/Mangos/ItemMethods.h | 2 +- methods/Mangos/MapMethods.h | 2 +- methods/Mangos/ObjectMethods.h | 2 +- methods/Mangos/PlayerMethods.h | 2 +- methods/Mangos/QuestMethods.h | 2 +- methods/Mangos/SpellMethods.h | 2 +- methods/Mangos/UnitMethods.h | 2 +- methods/Mangos/VehicleMethods.h | 2 +- methods/Mangos/WorldObjectMethods.h | 2 +- methods/Mangos/WorldPacketMethods.h | 2 +- methods/VMangos/AuraMethods.h | 2 +- methods/VMangos/BattleGroundMethods.h | 2 +- methods/VMangos/CorpseMethods.h | 2 +- methods/VMangos/CreatureMethods.h | 2 +- methods/VMangos/ElunaQueryMethods.h | 2 +- methods/VMangos/GameObjectMethods.h | 2 +- methods/VMangos/GlobalMethods.h | 4 ++-- methods/VMangos/GroupMethods.h | 2 +- methods/VMangos/GuildMethods.h | 2 +- methods/VMangos/ItemMethods.h | 2 +- methods/VMangos/MapMethods.h | 2 +- methods/VMangos/ObjectMethods.h | 2 +- methods/VMangos/PlayerMethods.h | 2 +- methods/VMangos/QuestMethods.h | 2 +- methods/VMangos/SpellMethods.h | 2 +- methods/VMangos/UnitMethods.h | 2 +- methods/VMangos/VehicleMethods.h | 2 +- methods/VMangos/WorldObjectMethods.h | 2 +- methods/VMangos/WorldPacketMethods.h | 2 +- 57 files changed, 60 insertions(+), 60 deletions(-) diff --git a/methods/CMangos/AuraMethods.h b/methods/CMangos/AuraMethods.h index e3a289e4d3..9831732a77 100644 --- a/methods/CMangos/AuraMethods.h +++ b/methods/CMangos/AuraMethods.h @@ -200,7 +200,7 @@ namespace LuaAura // Other { "Remove", &LuaAura::Remove }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/CMangos/BattleGroundMethods.h b/methods/CMangos/BattleGroundMethods.h index a4373d5441..425a5b5919 100644 --- a/methods/CMangos/BattleGroundMethods.h +++ b/methods/CMangos/BattleGroundMethods.h @@ -247,7 +247,7 @@ namespace LuaBattleGround { "GetWinner", &LuaBattleGround::GetWinner }, { "GetStatus", &LuaBattleGround::GetStatus }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/CMangos/CorpseMethods.h b/methods/CMangos/CorpseMethods.h index b4f4a94793..61b86a93df 100644 --- a/methods/CMangos/CorpseMethods.h +++ b/methods/CMangos/CorpseMethods.h @@ -85,7 +85,7 @@ namespace LuaCorpse { "ResetGhostTime", &LuaCorpse::ResetGhostTime }, { "SaveToDB", &LuaCorpse::SaveToDB }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/CMangos/CreatureMethods.h b/methods/CMangos/CreatureMethods.h index 4f4d4dcf4b..f572b5825f 100644 --- a/methods/CMangos/CreatureMethods.h +++ b/methods/CMangos/CreatureMethods.h @@ -1310,7 +1310,7 @@ namespace LuaCreature { "FixateTarget", nullptr, METHOD_REG_NONE }, // TC/Acore { "ClearFixate", nullptr, METHOD_REG_NONE }, // TC/Acore - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/CMangos/ElunaQueryMethods.h b/methods/CMangos/ElunaQueryMethods.h index 3ab85a70ec..c3daad11a3 100644 --- a/methods/CMangos/ElunaQueryMethods.h +++ b/methods/CMangos/ElunaQueryMethods.h @@ -335,7 +335,7 @@ namespace LuaQuery { "NextRow", &LuaQuery::NextRow }, { "IsNull", &LuaQuery::IsNull }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #undef RESULT diff --git a/methods/CMangos/GameObjectMethods.h b/methods/CMangos/GameObjectMethods.h index 201f28d73d..4fbcabb56f 100644 --- a/methods/CMangos/GameObjectMethods.h +++ b/methods/CMangos/GameObjectMethods.h @@ -334,7 +334,7 @@ namespace LuaGameObject // Not implemented methods { "IsDestructible", nullptr, METHOD_REG_NONE }, // Not implemented - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/CMangos/GlobalMethods.h b/methods/CMangos/GlobalMethods.h index 9f3974a07b..86d88c8d93 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 }, @@ -3297,7 +3297,7 @@ namespace LuaGlobalFunctions { "StartGameEvent", &LuaGlobalFunctions::StartGameEvent }, { "StopGameEvent", &LuaGlobalFunctions::StopGameEvent }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; } #endif diff --git a/methods/CMangos/GroupMethods.h b/methods/CMangos/GroupMethods.h index c0b5df41a3..ce1b7be68e 100644 --- a/methods/CMangos/GroupMethods.h +++ b/methods/CMangos/GroupMethods.h @@ -418,7 +418,7 @@ namespace LuaGroup { "GetMemberFlags", nullptr, METHOD_REG_NONE }, // not implemented { "SetMemberFlag", nullptr, METHOD_REG_NONE }, // not implemented - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; diff --git a/methods/CMangos/GuildMethods.h b/methods/CMangos/GuildMethods.h index 2338cc1735..58a022e030 100644 --- a/methods/CMangos/GuildMethods.h +++ b/methods/CMangos/GuildMethods.h @@ -271,7 +271,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 - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/CMangos/ItemMethods.h b/methods/CMangos/ItemMethods.h index 3e94d1e3c8..085a7f7234 100644 --- a/methods/CMangos/ItemMethods.h +++ b/methods/CMangos/ItemMethods.h @@ -860,7 +860,7 @@ namespace LuaItem // Not implemented methods { "IsRefundExpired", nullptr, METHOD_REG_NONE }, // not implemented - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/CMangos/MapMethods.h b/methods/CMangos/MapMethods.h index a24049db54..7b0261ce3d 100644 --- a/methods/CMangos/MapMethods.h +++ b/methods/CMangos/MapMethods.h @@ -365,7 +365,7 @@ namespace LuaMap { "SaveInstanceData", &LuaMap::SaveInstanceData }, { "Data", &LuaMap::Data }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/CMangos/ObjectMethods.h b/methods/CMangos/ObjectMethods.h index 7dec65cc78..9996c45d52 100644 --- a/methods/CMangos/ObjectMethods.h +++ b/methods/CMangos/ObjectMethods.h @@ -492,7 +492,7 @@ namespace LuaObject { "ToCorpse", &LuaObject::ToCorpse }, { "RemoveFlag", &LuaObject::RemoveFlag }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/CMangos/PlayerMethods.h b/methods/CMangos/PlayerMethods.h index eec0344685..56ad9bf3b9 100644 --- a/methods/CMangos/PlayerMethods.h +++ b/methods/CMangos/PlayerMethods.h @@ -4061,7 +4061,7 @@ namespace LuaPlayer { "GetXP", nullptr, METHOD_REG_NONE }, // not implemented { "GetXPForNextLevel", nullptr, METHOD_REG_NONE }, // not implemented - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/CMangos/QuestMethods.h b/methods/CMangos/QuestMethods.h index 4f2d2cc7e1..339b532cc0 100644 --- a/methods/CMangos/QuestMethods.h +++ b/methods/CMangos/QuestMethods.h @@ -195,7 +195,7 @@ namespace LuaQuest // Not implemented methods { "GetMaxLevel", nullptr, METHOD_REG_NONE }, // not implemented - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/CMangos/SpellMethods.h b/methods/CMangos/SpellMethods.h index 25eb87f8a0..628de33d12 100644 --- a/methods/CMangos/SpellMethods.h +++ b/methods/CMangos/SpellMethods.h @@ -188,7 +188,7 @@ namespace LuaSpell { "Cast", &LuaSpell::Cast }, { "Finish", &LuaSpell::Finish }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/CMangos/UnitMethods.h b/methods/CMangos/UnitMethods.h index c6ee6bddaa..a9d41bdbef 100644 --- a/methods/CMangos/UnitMethods.h +++ b/methods/CMangos/UnitMethods.h @@ -2611,7 +2611,7 @@ namespace LuaUnit { "DisableMelee", nullptr, METHOD_REG_NONE }, // not implemented { "SummonGuardian", nullptr, METHOD_REG_NONE }, // not implemented - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/CMangos/VehicleMethods.h b/methods/CMangos/VehicleMethods.h index d82756e6ce..56e3f17c48 100644 --- a/methods/CMangos/VehicleMethods.h +++ b/methods/CMangos/VehicleMethods.h @@ -106,7 +106,7 @@ namespace LuaVehicle { "AddPassenger", &LuaVehicle::AddPassenger }, { "RemovePassenger", &LuaVehicle::RemovePassenger }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; } diff --git a/methods/CMangos/WorldObjectMethods.h b/methods/CMangos/WorldObjectMethods.h index b62491ee4a..07394f245c 100644 --- a/methods/CMangos/WorldObjectMethods.h +++ b/methods/CMangos/WorldObjectMethods.h @@ -1187,7 +1187,7 @@ namespace LuaWorldObject { "PlayDistanceSound", &LuaWorldObject::PlayDistanceSound }, { "Data", &LuaWorldObject::Data }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/CMangos/WorldPacketMethods.h b/methods/CMangos/WorldPacketMethods.h index 803c3f1f29..c7f4127eb2 100644 --- a/methods/CMangos/WorldPacketMethods.h +++ b/methods/CMangos/WorldPacketMethods.h @@ -343,7 +343,7 @@ namespace LuaPacket { "WriteFloat", &LuaPacket::WriteFloat }, { "WriteDouble", &LuaPacket::WriteDouble }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; diff --git a/methods/Mangos/AuraMethods.h b/methods/Mangos/AuraMethods.h index 6e45a0e473..1de9d57b48 100644 --- a/methods/Mangos/AuraMethods.h +++ b/methods/Mangos/AuraMethods.h @@ -200,7 +200,7 @@ namespace LuaAura // Other { "Remove", &LuaAura::Remove }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/Mangos/BattleGroundMethods.h b/methods/Mangos/BattleGroundMethods.h index d1bc8c049f..f6747157d5 100644 --- a/methods/Mangos/BattleGroundMethods.h +++ b/methods/Mangos/BattleGroundMethods.h @@ -245,7 +245,7 @@ namespace LuaBattleGround { "GetWinner", &LuaBattleGround::GetWinner }, { "GetStatus", &LuaBattleGround::GetStatus }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/Mangos/CorpseMethods.h b/methods/Mangos/CorpseMethods.h index b4f4a94793..61b86a93df 100644 --- a/methods/Mangos/CorpseMethods.h +++ b/methods/Mangos/CorpseMethods.h @@ -85,7 +85,7 @@ namespace LuaCorpse { "ResetGhostTime", &LuaCorpse::ResetGhostTime }, { "SaveToDB", &LuaCorpse::SaveToDB }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/Mangos/CreatureMethods.h b/methods/Mangos/CreatureMethods.h index 56c2973a4c..beb844328a 100644 --- a/methods/Mangos/CreatureMethods.h +++ b/methods/Mangos/CreatureMethods.h @@ -1208,7 +1208,7 @@ namespace LuaCreature { "RemoveFromWorld", nullptr, METHOD_REG_NONE }, // not implemented { "GetRank", nullptr, METHOD_REG_NONE }, // not implemented - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/Mangos/ElunaQueryMethods.h b/methods/Mangos/ElunaQueryMethods.h index 87ae0e5119..67e5c5802a 100644 --- a/methods/Mangos/ElunaQueryMethods.h +++ b/methods/Mangos/ElunaQueryMethods.h @@ -337,7 +337,7 @@ namespace LuaQuery { "NextRow", &LuaQuery::NextRow }, { "IsNull", &LuaQuery::IsNull }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #undef RESULT diff --git a/methods/Mangos/GameObjectMethods.h b/methods/Mangos/GameObjectMethods.h index 503095a113..b2ba53b09e 100644 --- a/methods/Mangos/GameObjectMethods.h +++ b/methods/Mangos/GameObjectMethods.h @@ -339,7 +339,7 @@ namespace LuaGameObject // Not implemented methods { "IsDestructible", nullptr, METHOD_REG_NONE }, // Not implemented - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/Mangos/GlobalMethods.h b/methods/Mangos/GlobalMethods.h index 6271b66ba3..13a92696e5 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 }, @@ -3041,7 +3041,7 @@ namespace LuaGlobalFunctions { "CharDBQueryAsync", nullptr, METHOD_REG_NONE }, { "AuthDBQueryAsync", nullptr, METHOD_REG_NONE }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; } #endif diff --git a/methods/Mangos/GroupMethods.h b/methods/Mangos/GroupMethods.h index 86e25d0f94..d945427ff0 100644 --- a/methods/Mangos/GroupMethods.h +++ b/methods/Mangos/GroupMethods.h @@ -413,7 +413,7 @@ namespace LuaGroup { "GetMemberFlags", nullptr, METHOD_REG_NONE }, // not implemented { "SetMemberFlag", nullptr, METHOD_REG_NONE }, // not implemented - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; diff --git a/methods/Mangos/GuildMethods.h b/methods/Mangos/GuildMethods.h index 39c0421d83..7203931ddc 100644 --- a/methods/Mangos/GuildMethods.h +++ b/methods/Mangos/GuildMethods.h @@ -261,7 +261,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 - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/Mangos/ItemMethods.h b/methods/Mangos/ItemMethods.h index 5ec717d948..d844a4a9c2 100644 --- a/methods/Mangos/ItemMethods.h +++ b/methods/Mangos/ItemMethods.h @@ -869,7 +869,7 @@ namespace LuaItem // Not implemented methods { "IsRefundExpired", nullptr, METHOD_REG_NONE }, // not implemented - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/Mangos/MapMethods.h b/methods/Mangos/MapMethods.h index b463e32a18..7ee65cf724 100644 --- a/methods/Mangos/MapMethods.h +++ b/methods/Mangos/MapMethods.h @@ -366,7 +366,7 @@ namespace LuaMap { "SaveInstanceData", &LuaMap::SaveInstanceData }, { "Data", &LuaMap::Data }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/Mangos/ObjectMethods.h b/methods/Mangos/ObjectMethods.h index 7dec65cc78..9996c45d52 100644 --- a/methods/Mangos/ObjectMethods.h +++ b/methods/Mangos/ObjectMethods.h @@ -492,7 +492,7 @@ namespace LuaObject { "ToCorpse", &LuaObject::ToCorpse }, { "RemoveFlag", &LuaObject::RemoveFlag }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/Mangos/PlayerMethods.h b/methods/Mangos/PlayerMethods.h index 2280baaebe..c4de25d825 100644 --- a/methods/Mangos/PlayerMethods.h +++ b/methods/Mangos/PlayerMethods.h @@ -3978,7 +3978,7 @@ namespace LuaPlayer { "CanCompleteRepeatableQuest", nullptr, METHOD_REG_NONE }, // not implemented { "CanRewardQuest", nullptr, METHOD_REG_NONE }, // not implemented - { NULL, NULL } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/Mangos/QuestMethods.h b/methods/Mangos/QuestMethods.h index 3fa05cae67..34ebcb4668 100644 --- a/methods/Mangos/QuestMethods.h +++ b/methods/Mangos/QuestMethods.h @@ -195,7 +195,7 @@ namespace LuaQuest // Not implemented methods { "GetMaxLevel", nullptr, METHOD_REG_NONE }, // not implemented - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/Mangos/SpellMethods.h b/methods/Mangos/SpellMethods.h index d6c1983d9a..ce3a4d9dfd 100644 --- a/methods/Mangos/SpellMethods.h +++ b/methods/Mangos/SpellMethods.h @@ -190,7 +190,7 @@ namespace LuaSpell { "Cast", &LuaSpell::Cast }, { "Finish", &LuaSpell::Finish }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/Mangos/UnitMethods.h b/methods/Mangos/UnitMethods.h index 2485d17bb7..3c058ecebf 100644 --- a/methods/Mangos/UnitMethods.h +++ b/methods/Mangos/UnitMethods.h @@ -2618,7 +2618,7 @@ namespace LuaUnit { "SummonGuardian", nullptr, METHOD_REG_NONE }, // not implemented { "SetImmuneTo", nullptr, METHOD_REG_NONE }, // not implemented - { NULL, NULL } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/Mangos/VehicleMethods.h b/methods/Mangos/VehicleMethods.h index b630ceac2a..e74278083c 100644 --- a/methods/Mangos/VehicleMethods.h +++ b/methods/Mangos/VehicleMethods.h @@ -107,7 +107,7 @@ namespace LuaVehicle { "AddPassenger", &LuaVehicle::AddPassenger }, { "RemovePassenger", &LuaVehicle::RemovePassenger }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; } diff --git a/methods/Mangos/WorldObjectMethods.h b/methods/Mangos/WorldObjectMethods.h index 935340a885..848ce7536c 100644 --- a/methods/Mangos/WorldObjectMethods.h +++ b/methods/Mangos/WorldObjectMethods.h @@ -1185,7 +1185,7 @@ namespace LuaWorldObject { "PlayDistanceSound", &LuaWorldObject::PlayDistanceSound }, { "Data", &LuaWorldObject::Data }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/Mangos/WorldPacketMethods.h b/methods/Mangos/WorldPacketMethods.h index 1468a04cf4..755576ad28 100644 --- a/methods/Mangos/WorldPacketMethods.h +++ b/methods/Mangos/WorldPacketMethods.h @@ -340,7 +340,7 @@ namespace LuaPacket { "WriteFloat", &LuaPacket::WriteFloat }, { "WriteDouble", &LuaPacket::WriteDouble }, - { NULL, NULL } + { nullptr, METHOD_REG_NONE } }; }; diff --git a/methods/VMangos/AuraMethods.h b/methods/VMangos/AuraMethods.h index a25b085112..b8efca2fa4 100644 --- a/methods/VMangos/AuraMethods.h +++ b/methods/VMangos/AuraMethods.h @@ -188,7 +188,7 @@ namespace LuaAura // Other { "Remove", &LuaAura::Remove }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/VMangos/BattleGroundMethods.h b/methods/VMangos/BattleGroundMethods.h index 0a459e2b70..09dc82198f 100644 --- a/methods/VMangos/BattleGroundMethods.h +++ b/methods/VMangos/BattleGroundMethods.h @@ -243,7 +243,7 @@ namespace LuaBattleGround { "GetWinner", &LuaBattleGround::GetWinner }, { "GetStatus", &LuaBattleGround::GetStatus }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/VMangos/CorpseMethods.h b/methods/VMangos/CorpseMethods.h index b4f4a94793..61b86a93df 100644 --- a/methods/VMangos/CorpseMethods.h +++ b/methods/VMangos/CorpseMethods.h @@ -85,7 +85,7 @@ namespace LuaCorpse { "ResetGhostTime", &LuaCorpse::ResetGhostTime }, { "SaveToDB", &LuaCorpse::SaveToDB }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/VMangos/CreatureMethods.h b/methods/VMangos/CreatureMethods.h index 62967637f4..c6c5d910a7 100644 --- a/methods/VMangos/CreatureMethods.h +++ b/methods/VMangos/CreatureMethods.h @@ -1216,7 +1216,7 @@ namespace LuaCreature { "RemoveLootMode", nullptr, METHOD_REG_NONE }, // not implemented { "RemoveFromWorld", nullptr, METHOD_REG_NONE }, // not implemented - { NULL, NULL } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/VMangos/ElunaQueryMethods.h b/methods/VMangos/ElunaQueryMethods.h index 3ab85a70ec..c3daad11a3 100644 --- a/methods/VMangos/ElunaQueryMethods.h +++ b/methods/VMangos/ElunaQueryMethods.h @@ -335,7 +335,7 @@ namespace LuaQuery { "NextRow", &LuaQuery::NextRow }, { "IsNull", &LuaQuery::IsNull }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #undef RESULT diff --git a/methods/VMangos/GameObjectMethods.h b/methods/VMangos/GameObjectMethods.h index f4d58e42c2..2c88d2567a 100644 --- a/methods/VMangos/GameObjectMethods.h +++ b/methods/VMangos/GameObjectMethods.h @@ -332,7 +332,7 @@ namespace LuaGameObject // Not implemented methods { "IsDestructible", nullptr, METHOD_REG_NONE }, // Not implemented - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/VMangos/GlobalMethods.h b/methods/VMangos/GlobalMethods.h index a575aeb696..1420a8bc73 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 }, @@ -2982,7 +2982,7 @@ namespace LuaGlobalFunctions { "StartGameEvent", &LuaGlobalFunctions::StartGameEvent }, { "StopGameEvent", &LuaGlobalFunctions::StopGameEvent }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; } #endif diff --git a/methods/VMangos/GroupMethods.h b/methods/VMangos/GroupMethods.h index 4ed139f551..7c7560aa6f 100644 --- a/methods/VMangos/GroupMethods.h +++ b/methods/VMangos/GroupMethods.h @@ -389,7 +389,7 @@ namespace LuaGroup { "GetMemberFlags", nullptr, METHOD_REG_NONE }, // not implemented { "SetMemberFlag", nullptr, METHOD_REG_NONE }, // not implemented - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; diff --git a/methods/VMangos/GuildMethods.h b/methods/VMangos/GuildMethods.h index 05cd108931..44a35cb380 100644 --- a/methods/VMangos/GuildMethods.h +++ b/methods/VMangos/GuildMethods.h @@ -246,7 +246,7 @@ namespace LuaGuild { "SetBankTabText", nullptr, METHOD_REG_NONE }, // not implemented - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/VMangos/ItemMethods.h b/methods/VMangos/ItemMethods.h index b4b6ad71a1..d8acb82c7c 100644 --- a/methods/VMangos/ItemMethods.h +++ b/methods/VMangos/ItemMethods.h @@ -723,7 +723,7 @@ namespace LuaItem { "IsWeaponVellum", nullptr, METHOD_REG_NONE }, // not implemented { "IsArmorVellum", nullptr, METHOD_REG_NONE }, // not implemented - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/VMangos/MapMethods.h b/methods/VMangos/MapMethods.h index d1d54822fd..5788149578 100644 --- a/methods/VMangos/MapMethods.h +++ b/methods/VMangos/MapMethods.h @@ -326,7 +326,7 @@ namespace LuaMap { "IsArena", nullptr, METHOD_REG_NONE }, { "IsHeroic", nullptr, METHOD_REG_NONE }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/VMangos/ObjectMethods.h b/methods/VMangos/ObjectMethods.h index 6dd0f54c2b..f390b49a79 100644 --- a/methods/VMangos/ObjectMethods.h +++ b/methods/VMangos/ObjectMethods.h @@ -492,7 +492,7 @@ namespace LuaObject { "ToCorpse", &LuaObject::ToCorpse }, { "RemoveFlag", &LuaObject::RemoveFlag }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/VMangos/PlayerMethods.h b/methods/VMangos/PlayerMethods.h index 7b0c08b9bf..c261de4898 100644 --- a/methods/VMangos/PlayerMethods.h +++ b/methods/VMangos/PlayerMethods.h @@ -4396,7 +4396,7 @@ namespace LuaPlayer { "CanCompleteRepeatableQuest", nullptr, METHOD_REG_NONE }, // not implemented { "CanRewardQuest", nullptr, METHOD_REG_NONE }, // not implemented - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/VMangos/QuestMethods.h b/methods/VMangos/QuestMethods.h index a71c9f6713..007b33f4f4 100644 --- a/methods/VMangos/QuestMethods.h +++ b/methods/VMangos/QuestMethods.h @@ -206,7 +206,7 @@ namespace LuaQuest // Not implemented methods { "GetMaxLevel", nullptr, METHOD_REG_NONE }, // not implemented - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/VMangos/SpellMethods.h b/methods/VMangos/SpellMethods.h index c709ebfa29..e85846c79c 100644 --- a/methods/VMangos/SpellMethods.h +++ b/methods/VMangos/SpellMethods.h @@ -212,7 +212,7 @@ namespace LuaSpell { "Cast", &LuaSpell::Cast }, { "Finish", &LuaSpell::Finish }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/VMangos/UnitMethods.h b/methods/VMangos/UnitMethods.h index 1c30786d05..6ee3cf2490 100644 --- a/methods/VMangos/UnitMethods.h +++ b/methods/VMangos/UnitMethods.h @@ -3160,7 +3160,7 @@ namespace LuaUnit { "SummonGuardian", nullptr, METHOD_REG_NONE }, // not implemented { "SetImmuneTo", nullptr, METHOD_REG_NONE }, // not implemented - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/VMangos/VehicleMethods.h b/methods/VMangos/VehicleMethods.h index 55870b283f..5c6015a76a 100644 --- a/methods/VMangos/VehicleMethods.h +++ b/methods/VMangos/VehicleMethods.h @@ -119,7 +119,7 @@ namespace LuaVehicle { "AddPassenger", &LuaVehicle::AddPassenger }, { "RemovePassenger", &LuaVehicle::RemovePassenger }, - { NULL, NULL } + { nullptr, METHOD_REG_NONE } }; } diff --git a/methods/VMangos/WorldObjectMethods.h b/methods/VMangos/WorldObjectMethods.h index 2a503a6d3f..bdebc05c01 100644 --- a/methods/VMangos/WorldObjectMethods.h +++ b/methods/VMangos/WorldObjectMethods.h @@ -1225,7 +1225,7 @@ namespace LuaWorldObject { "PlayDirectSound", &LuaWorldObject::PlayDirectSound }, { "PlayDistanceSound", &LuaWorldObject::PlayDistanceSound }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; #endif diff --git a/methods/VMangos/WorldPacketMethods.h b/methods/VMangos/WorldPacketMethods.h index 50b2e4a9f7..b609a77904 100644 --- a/methods/VMangos/WorldPacketMethods.h +++ b/methods/VMangos/WorldPacketMethods.h @@ -339,7 +339,7 @@ namespace LuaPacket { "WriteFloat", &LuaPacket::WriteFloat }, { "WriteDouble", &LuaPacket::WriteDouble }, - { NULL, NULL, METHOD_REG_NONE } + { nullptr, METHOD_REG_NONE } }; }; From a318fd7e41f5823e96c277b023031f24ccedd333 Mon Sep 17 00:00:00 2001 From: Foereaper Date: Mon, 5 Aug 2024 18:58:00 +0200 Subject: [PATCH 03/13] Remove unnecessary ElunaTemplate constructor --- ElunaTemplate.h | 4 - methods/CMangos/CreatureMethods.h | 42 +++++----- methods/CMangos/GameObjectMethods.h | 2 +- methods/CMangos/GroupMethods.h | 10 +-- methods/CMangos/GuildMethods.h | 4 +- methods/CMangos/ItemMethods.h | 16 ++-- methods/CMangos/MapMethods.h | 4 +- methods/CMangos/PlayerMethods.h | 114 +++++++++++++------------- methods/CMangos/QuestMethods.h | 4 +- methods/CMangos/UnitMethods.h | 42 +++++----- methods/CMangos/WorldObjectMethods.h | 4 +- methods/Mangos/CreatureMethods.h | 30 +++---- methods/Mangos/GameObjectMethods.h | 2 +- methods/Mangos/GlobalMethods.h | 8 +- methods/Mangos/GroupMethods.h | 10 +-- methods/Mangos/ItemMethods.h | 16 ++-- methods/Mangos/MapMethods.h | 4 +- methods/Mangos/PlayerMethods.h | 118 +++++++++++++-------------- methods/Mangos/QuestMethods.h | 4 +- methods/Mangos/UnitMethods.h | 44 +++++----- methods/Mangos/WorldObjectMethods.h | 4 +- methods/TrinityCore/PlayerMethods.h | 22 ++--- methods/TrinityCore/UnitMethods.h | 2 +- methods/VMangos/CreatureMethods.h | 28 +++---- methods/VMangos/GameObjectMethods.h | 2 +- methods/VMangos/GroupMethods.h | 10 +-- methods/VMangos/GuildMethods.h | 2 +- methods/VMangos/ItemMethods.h | 18 ++-- methods/VMangos/MapMethods.h | 4 +- methods/VMangos/PlayerMethods.h | 58 ++++++------- methods/VMangos/QuestMethods.h | 2 +- methods/VMangos/UnitMethods.h | 28 +++---- 32 files changed, 329 insertions(+), 333 deletions(-) diff --git a/ElunaTemplate.h b/ElunaTemplate.h index 667b7e952c..7081348b3e 100644 --- a/ElunaTemplate.h +++ b/ElunaTemplate.h @@ -168,10 +168,6 @@ struct ElunaRegister : name(name), mfunc(func), regState(state) {} // constructor for nullptr functions and METHOD_REG_NONE (unimplemented methods) - ElunaRegister(const char* name, std::nullptr_t, MethodRegisterState state = METHOD_REG_NONE) - : name(name), mfunc(std::monostate{}), regState(state) {} - - // constructor for empty entry (last entry of method table) ElunaRegister(const char* name = nullptr, MethodRegisterState state = METHOD_REG_NONE) : name(name), mfunc(std::monostate{}), regState(state) {} }; diff --git a/methods/CMangos/CreatureMethods.h b/methods/CMangos/CreatureMethods.h index f572b5825f..46fbddcdfd 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,24 +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 + { "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 { nullptr, METHOD_REG_NONE } }; diff --git a/methods/CMangos/GameObjectMethods.h b/methods/CMangos/GameObjectMethods.h index 4fbcabb56f..1d813e0af3 100644 --- a/methods/CMangos/GameObjectMethods.h +++ b/methods/CMangos/GameObjectMethods.h @@ -332,7 +332,7 @@ namespace LuaGameObject { "SaveToDB", &LuaGameObject::SaveToDB }, // Not implemented methods - { "IsDestructible", nullptr, METHOD_REG_NONE }, // Not implemented + { "IsDestructible", METHOD_REG_NONE }, // Not implemented { nullptr, METHOD_REG_NONE } }; diff --git a/methods/CMangos/GroupMethods.h b/methods/CMangos/GroupMethods.h index ce1b7be68e..3bb6ab50f3 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,10 +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 + { "IsBFGroup", METHOD_REG_NONE }, // not implemented + { "ConvertToLFG", METHOD_REG_NONE }, // not implemented + { "GetMemberFlags", METHOD_REG_NONE }, // not implemented + { "SetMemberFlag", METHOD_REG_NONE }, // not implemented { nullptr, METHOD_REG_NONE } }; diff --git a/methods/CMangos/GuildMethods.h b/methods/CMangos/GuildMethods.h index 58a022e030..fbfe804582 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 diff --git a/methods/CMangos/ItemMethods.h b/methods/CMangos/ItemMethods.h index 085a7f7234..9bc61c2c05 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,22 +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 + { "IsRefundExpired", METHOD_REG_NONE }, // not implemented { nullptr, METHOD_REG_NONE } }; diff --git a/methods/CMangos/MapMethods.h b/methods/CMangos/MapMethods.h index 7b0261ce3d..7504732783 100644 --- a/methods/CMangos/MapMethods.h +++ b/methods/CMangos/MapMethods.h @@ -357,8 +357,8 @@ 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 diff --git a/methods/CMangos/PlayerMethods.h b/methods/CMangos/PlayerMethods.h index 56ad9bf3b9..c964439070 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,54 +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 + { "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 { nullptr, METHOD_REG_NONE } }; diff --git a/methods/CMangos/QuestMethods.h b/methods/CMangos/QuestMethods.h index 339b532cc0..929484b40b 100644 --- a/methods/CMangos/QuestMethods.h +++ b/methods/CMangos/QuestMethods.h @@ -188,12 +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 + { "GetMaxLevel", METHOD_REG_NONE }, // not implemented { nullptr, METHOD_REG_NONE } }; diff --git a/methods/CMangos/UnitMethods.h b/methods/CMangos/UnitMethods.h index a9d41bdbef..d0445dc9f9 100644 --- a/methods/CMangos/UnitMethods.h +++ b/methods/CMangos/UnitMethods.h @@ -2586,30 +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 + { "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 { nullptr, METHOD_REG_NONE } }; diff --git a/methods/CMangos/WorldObjectMethods.h b/methods/CMangos/WorldObjectMethods.h index 07394f245c..00f85139c2 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 diff --git a/methods/Mangos/CreatureMethods.h b/methods/Mangos/CreatureMethods.h index beb844328a..0b7b3aa884 100644 --- a/methods/Mangos/CreatureMethods.h +++ b/methods/Mangos/CreatureMethods.h @@ -1192,21 +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 + { "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 { nullptr, METHOD_REG_NONE } }; diff --git a/methods/Mangos/GameObjectMethods.h b/methods/Mangos/GameObjectMethods.h index b2ba53b09e..4c6396f19a 100644 --- a/methods/Mangos/GameObjectMethods.h +++ b/methods/Mangos/GameObjectMethods.h @@ -337,7 +337,7 @@ namespace LuaGameObject { "SaveToDB", &LuaGameObject::SaveToDB }, // Not implemented methods - { "IsDestructible", nullptr, METHOD_REG_NONE }, // Not implemented + { "IsDestructible", METHOD_REG_NONE }, // Not implemented { nullptr, METHOD_REG_NONE } }; diff --git a/methods/Mangos/GlobalMethods.h b/methods/Mangos/GlobalMethods.h index 13a92696e5..5040219888 100644 --- a/methods/Mangos/GlobalMethods.h +++ b/methods/Mangos/GlobalMethods.h @@ -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,9 +3037,9 @@ namespace LuaGlobalFunctions { "StopGameEvent", &LuaGlobalFunctions::StopGameEvent }, // unimplemented - { "WorldDBQueryAsync", nullptr, METHOD_REG_NONE }, - { "CharDBQueryAsync", nullptr, METHOD_REG_NONE }, - { "AuthDBQueryAsync", nullptr, METHOD_REG_NONE }, + { "WorldDBQueryAsync", METHOD_REG_NONE }, + { "CharDBQueryAsync", METHOD_REG_NONE }, + { "AuthDBQueryAsync", METHOD_REG_NONE }, { nullptr, METHOD_REG_NONE } }; diff --git a/methods/Mangos/GroupMethods.h b/methods/Mangos/GroupMethods.h index d945427ff0..7b56708629 100644 --- a/methods/Mangos/GroupMethods.h +++ b/methods/Mangos/GroupMethods.h @@ -401,17 +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 + { "IsBFGroup", METHOD_REG_NONE }, // not implemented + { "ConvertToLFG", METHOD_REG_NONE }, // not implemented + { "GetMemberFlags", METHOD_REG_NONE }, // not implemented + { "SetMemberFlag", METHOD_REG_NONE }, // not implemented { nullptr, METHOD_REG_NONE } }; diff --git a/methods/Mangos/ItemMethods.h b/methods/Mangos/ItemMethods.h index d844a4a9c2..50deb635a2 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,26 +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 + { "IsRefundExpired", METHOD_REG_NONE }, // not implemented { nullptr, METHOD_REG_NONE } }; diff --git a/methods/Mangos/MapMethods.h b/methods/Mangos/MapMethods.h index 7ee65cf724..33e2ecce06 100644 --- a/methods/Mangos/MapMethods.h +++ b/methods/Mangos/MapMethods.h @@ -359,8 +359,8 @@ 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 }, diff --git a/methods/Mangos/PlayerMethods.h b/methods/Mangos/PlayerMethods.h index c4de25d825..bd16089691 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,47 +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 + { "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 { nullptr, METHOD_REG_NONE } }; diff --git a/methods/Mangos/QuestMethods.h b/methods/Mangos/QuestMethods.h index 34ebcb4668..1a10c85c07 100644 --- a/methods/Mangos/QuestMethods.h +++ b/methods/Mangos/QuestMethods.h @@ -189,11 +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 + { "GetMaxLevel", METHOD_REG_NONE }, // not implemented { nullptr, METHOD_REG_NONE } }; diff --git a/methods/Mangos/UnitMethods.h b/methods/Mangos/UnitMethods.h index 3c058ecebf..a62959f3f6 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,29 +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 + { "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 { nullptr, METHOD_REG_NONE } }; diff --git a/methods/Mangos/WorldObjectMethods.h b/methods/Mangos/WorldObjectMethods.h index 848ce7536c..782ede857d 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 }, diff --git a/methods/TrinityCore/PlayerMethods.h b/methods/TrinityCore/PlayerMethods.h index c0c9afa41c..8f083c8cd2 100644 --- a/methods/TrinityCore/PlayerMethods.h +++ b/methods/TrinityCore/PlayerMethods.h @@ -3973,20 +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 + { "UpdateHonor", METHOD_REG_NONE }, // classic only + { "ResetHonor", METHOD_REG_NONE }, // classic only + { "ClearHonorInfo", METHOD_REG_NONE }, // classic only + { "GainSpellComboPoints", METHOD_REG_NONE }, // not implemented { nullptr, METHOD_REG_NONE } }; diff --git a/methods/TrinityCore/UnitMethods.h b/methods/TrinityCore/UnitMethods.h index c99ca71335..0079fec7a6 100644 --- a/methods/TrinityCore/UnitMethods.h +++ b/methods/TrinityCore/UnitMethods.h @@ -2719,7 +2719,7 @@ namespace LuaUnit { "DealHeal", &LuaUnit::DealHeal }, // Not implemented methods - { "SummonGuardian", nullptr, METHOD_REG_NONE }, // not implemented + { "SummonGuardian", METHOD_REG_NONE }, // not implemented { nullptr, METHOD_REG_NONE } }; diff --git a/methods/VMangos/CreatureMethods.h b/methods/VMangos/CreatureMethods.h index c6c5d910a7..c08c29851e 100644 --- a/methods/VMangos/CreatureMethods.h +++ b/methods/VMangos/CreatureMethods.h @@ -1201,20 +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 + { "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 { nullptr, METHOD_REG_NONE } }; diff --git a/methods/VMangos/GameObjectMethods.h b/methods/VMangos/GameObjectMethods.h index 2c88d2567a..99f581d032 100644 --- a/methods/VMangos/GameObjectMethods.h +++ b/methods/VMangos/GameObjectMethods.h @@ -330,7 +330,7 @@ namespace LuaGameObject { "SaveToDB", &LuaGameObject::SaveToDB }, // Not implemented methods - { "IsDestructible", nullptr, METHOD_REG_NONE }, // Not implemented + { "IsDestructible", METHOD_REG_NONE }, // Not implemented { nullptr, METHOD_REG_NONE } }; diff --git a/methods/VMangos/GroupMethods.h b/methods/VMangos/GroupMethods.h index 7c7560aa6f..2c9ddd8a95 100644 --- a/methods/VMangos/GroupMethods.h +++ b/methods/VMangos/GroupMethods.h @@ -383,11 +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 + { "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 { nullptr, METHOD_REG_NONE } }; diff --git a/methods/VMangos/GuildMethods.h b/methods/VMangos/GuildMethods.h index 44a35cb380..792c951bd1 100644 --- a/methods/VMangos/GuildMethods.h +++ b/methods/VMangos/GuildMethods.h @@ -244,7 +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 + { "SetBankTabText", METHOD_REG_NONE }, // not implemented { nullptr, METHOD_REG_NONE } }; diff --git a/methods/VMangos/ItemMethods.h b/methods/VMangos/ItemMethods.h index d8acb82c7c..fde3a4353b 100644 --- a/methods/VMangos/ItemMethods.h +++ b/methods/VMangos/ItemMethods.h @@ -713,15 +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 + { "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 { nullptr, METHOD_REG_NONE } }; diff --git a/methods/VMangos/MapMethods.h b/methods/VMangos/MapMethods.h index 5788149578..78242c621b 100644 --- a/methods/VMangos/MapMethods.h +++ b/methods/VMangos/MapMethods.h @@ -323,8 +323,8 @@ namespace LuaMap // Other { "SaveInstanceData", &LuaMap::SaveInstanceData }, - { "IsArena", nullptr, METHOD_REG_NONE }, - { "IsHeroic", nullptr, METHOD_REG_NONE }, + { "IsArena", METHOD_REG_NONE }, + { "IsHeroic", METHOD_REG_NONE }, { nullptr, METHOD_REG_NONE } }; diff --git a/methods/VMangos/PlayerMethods.h b/methods/VMangos/PlayerMethods.h index c261de4898..dcd7622a8b 100644 --- a/methods/VMangos/PlayerMethods.h +++ b/methods/VMangos/PlayerMethods.h @@ -4366,35 +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 + { "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 { nullptr, METHOD_REG_NONE } }; diff --git a/methods/VMangos/QuestMethods.h b/methods/VMangos/QuestMethods.h index 007b33f4f4..e73445c57e 100644 --- a/methods/VMangos/QuestMethods.h +++ b/methods/VMangos/QuestMethods.h @@ -204,7 +204,7 @@ namespace LuaQuest #endif // Not implemented methods - { "GetMaxLevel", nullptr, METHOD_REG_NONE }, // not implemented + { "GetMaxLevel", METHOD_REG_NONE }, // not implemented { nullptr, METHOD_REG_NONE } }; diff --git a/methods/VMangos/UnitMethods.h b/methods/VMangos/UnitMethods.h index 6ee3cf2490..61fb234206 100644 --- a/methods/VMangos/UnitMethods.h +++ b/methods/VMangos/UnitMethods.h @@ -3145,20 +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 + { "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 { nullptr, METHOD_REG_NONE } }; From 5065a65a53277242f509f36e28aed85ccf376064 Mon Sep 17 00:00:00 2001 From: Foereaper Date: Mon, 5 Aug 2024 20:21:29 +0200 Subject: [PATCH 04/13] Remove unnecessary default assignment --- ElunaTemplate.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ElunaTemplate.h b/ElunaTemplate.h index 7081348b3e..46bf58dfa5 100644 --- a/ElunaTemplate.h +++ b/ElunaTemplate.h @@ -157,7 +157,7 @@ struct ElunaRegister { const char* name; std::variant mfunc; - MethodRegisterState regState = METHOD_REG_ALL; + MethodRegisterState regState; // constructor for non-globals (with T*) ElunaRegister(const char* name, int(*func)(Eluna*, T*), MethodRegisterState state = METHOD_REG_ALL) From 0e736f1ae9109e1f091aa0da2b3b4935117843e8 Mon Sep 17 00:00:00 2001 From: Foereaper Date: Mon, 5 Aug 2024 20:22:24 +0200 Subject: [PATCH 05/13] Remove accidental double space --- ElunaTemplate.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ElunaTemplate.h b/ElunaTemplate.h index 46bf58dfa5..09b2613574 100644 --- a/ElunaTemplate.h +++ b/ElunaTemplate.h @@ -198,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); From a2bee45c467c5a60edbaee6f8442f2e615925bff Mon Sep 17 00:00:00 2001 From: Foereaper Date: Mon, 5 Aug 2024 22:41:27 +0200 Subject: [PATCH 06/13] Rewrite thunk to not use lambdas --- ElunaTemplate.h | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/ElunaTemplate.h b/ElunaTemplate.h index 09b2613574..9ebab5f18f 100644 --- a/ElunaTemplate.h +++ b/ElunaTemplate.h @@ -417,19 +417,13 @@ class ElunaTemplate { ElunaRegister* l = static_cast*>(lua_touserdata(L, lua_upvalueindex(1))); Eluna* E = static_cast(lua_touserdata(L, lua_upvalueindex(2))); - T* obj; // determine if the method table functions are global or non-global - bool isGlobal = false; - std::visit([&](auto&& func) - { - using FuncType = std::decay_t; - if constexpr (std::is_same_v) - isGlobal = true; - }, l->mfunc); + constexpr bool isGlobal = std::is_same_v; // we only check self if the method is not a global - if (!isGlobal) + T* obj; + if constexpr (!isGlobal) { obj = E->CHECKOBJ(1); if (!obj) @@ -439,15 +433,18 @@ class ElunaTemplate int top = lua_gettop(L); int expected = 0; - std::visit([&](auto&& func) + if constexpr (isGlobal) { - using FuncType = std::decay_t; - if constexpr (std::is_same_v) // global method - expected = func(E); - else if constexpr (std::is_same_v) // non-global method - expected = func(E, obj); - - }, l->mfunc); + auto func = std::get_if(&l->mfunc); + if (func) + expected = (*func)(E); + } + else + { + auto func = std::get_if(&l->mfunc); + if (func) + expected = (*func)(E, obj); + } int args = lua_gettop(L) - top; if (args < 0 || args > expected) From df442f368f1d8b65998b7173ef0a6c46b8602f3a Mon Sep 17 00:00:00 2001 From: Foereaper Date: Mon, 5 Aug 2024 22:47:08 +0200 Subject: [PATCH 07/13] Replace lambda in SetMethods with holds_alternative --- ElunaTemplate.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/ElunaTemplate.h b/ElunaTemplate.h index 9ebab5f18f..9cb447e4ff 100644 --- a/ElunaTemplate.h +++ b/ElunaTemplate.h @@ -284,14 +284,8 @@ class ElunaTemplate ASSERT(methodTable); // determine if the method table functions are global or non-global - bool isGlobal = false; const auto& firstMethod = methodTable[0]; - std::visit([&isGlobal](auto&& func) - { - using FuncType = std::decay_t; - if constexpr (std::is_same_v) - isGlobal = true; - }, firstMethod.mfunc); + bool isGlobal = std::holds_alternative(firstMethod.mfunc); if (isGlobal) { From 7dce466f98de39c43c41030c85d6606b8d0c8772 Mon Sep 17 00:00:00 2001 From: Foereaper Date: Mon, 5 Aug 2024 23:58:15 +0200 Subject: [PATCH 08/13] Change from variant to conditional type for registered functions --- ElunaTemplate.h | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/ElunaTemplate.h b/ElunaTemplate.h index 9cb447e4ff..730f1ccf35 100644 --- a/ElunaTemplate.h +++ b/ElunaTemplate.h @@ -156,7 +156,7 @@ template struct ElunaRegister { const char* name; - std::variant mfunc; + typename std::conditional, int(*)(Eluna*), int(*)(Eluna*, T*)>::type mfunc; MethodRegisterState regState; // constructor for non-globals (with T*) @@ -169,7 +169,7 @@ struct ElunaRegister // constructor for nullptr functions and METHOD_REG_NONE (unimplemented methods) ElunaRegister(const char* name = nullptr, MethodRegisterState state = METHOD_REG_NONE) - : name(name), mfunc(std::monostate{}), regState(state) {} + : name(name), mfunc(nullptr), regState(state) {} }; template @@ -277,17 +277,16 @@ class ElunaTemplate lua_pop(E->L, 1); } - template + template static void SetMethods(Eluna* E, ElunaRegister* methodTable) { ASSERT(E); ASSERT(methodTable); // determine if the method table functions are global or non-global - const auto& firstMethod = methodTable[0]; - bool isGlobal = std::holds_alternative(firstMethod.mfunc); + constexpr bool isGlobal = std::is_same_v; - if (isGlobal) + if constexpr (isGlobal) { lua_pushglobaltable(E->L); } @@ -428,17 +427,9 @@ class ElunaTemplate int expected = 0; if constexpr (isGlobal) - { - auto func = std::get_if(&l->mfunc); - if (func) - expected = (*func)(E); - } + expected = l->mfunc(E); // global method else - { - auto func = std::get_if(&l->mfunc); - if (func) - expected = (*func)(E, obj); - } + expected = l->mfunc(E, obj); // non-global method int args = lua_gettop(L) - top; if (args < 0 || args > expected) From d67386448d9ef3452f2f3abd25e5bdfd222b14a7 Mon Sep 17 00:00:00 2001 From: Foereaper Date: Tue, 6 Aug 2024 00:30:24 +0200 Subject: [PATCH 09/13] Use the correct template variable --- ElunaTemplate.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ElunaTemplate.h b/ElunaTemplate.h index 730f1ccf35..0eb0d1fd67 100644 --- a/ElunaTemplate.h +++ b/ElunaTemplate.h @@ -284,7 +284,7 @@ class ElunaTemplate ASSERT(methodTable); // determine if the method table functions are global or non-global - constexpr bool isGlobal = std::is_same_v; + constexpr bool isGlobal = std::is_same_v; if constexpr (isGlobal) { From 509f6ac2bff0343cf5a31c8082672a9650773f38 Mon Sep 17 00:00:00 2001 From: Foereaper Date: Tue, 6 Aug 2024 16:44:30 +0200 Subject: [PATCH 10/13] Replace method table loop and remove empty end of array entries --- ElunaTemplate.h | 22 ++++++++++++---------- methods/CMangos/AuraMethods.h | 4 +--- methods/CMangos/BattleGroundMethods.h | 4 +--- methods/CMangos/CorpseMethods.h | 4 +--- methods/CMangos/CreatureMethods.h | 4 +--- methods/CMangos/ElunaQueryMethods.h | 4 +--- methods/CMangos/GameObjectMethods.h | 4 +--- methods/CMangos/GlobalMethods.h | 4 +--- methods/CMangos/GroupMethods.h | 4 +--- methods/CMangos/GuildMethods.h | 4 +--- methods/CMangos/ItemMethods.h | 4 +--- methods/CMangos/MapMethods.h | 4 +--- methods/CMangos/ObjectMethods.h | 4 +--- methods/CMangos/PlayerMethods.h | 4 +--- methods/CMangos/QuestMethods.h | 4 +--- methods/CMangos/SpellMethods.h | 4 +--- methods/CMangos/UnitMethods.h | 4 +--- methods/CMangos/VehicleMethods.h | 4 +--- methods/CMangos/WorldObjectMethods.h | 4 +--- methods/CMangos/WorldPacketMethods.h | 4 +--- methods/Mangos/AuraMethods.h | 4 +--- methods/Mangos/BattleGroundMethods.h | 4 +--- methods/Mangos/CorpseMethods.h | 4 +--- methods/Mangos/CreatureMethods.h | 4 +--- methods/Mangos/ElunaQueryMethods.h | 4 +--- methods/Mangos/GameObjectMethods.h | 4 +--- methods/Mangos/GlobalMethods.h | 4 +--- methods/Mangos/GroupMethods.h | 4 +--- methods/Mangos/GuildMethods.h | 4 +--- methods/Mangos/ItemMethods.h | 4 +--- methods/Mangos/MapMethods.h | 4 +--- methods/Mangos/ObjectMethods.h | 4 +--- methods/Mangos/PlayerMethods.h | 4 +--- methods/Mangos/QuestMethods.h | 4 +--- methods/Mangos/SpellMethods.h | 4 +--- methods/Mangos/UnitMethods.h | 4 +--- methods/Mangos/VehicleMethods.h | 4 +--- methods/Mangos/WorldObjectMethods.h | 4 +--- 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 | 4 +--- 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 | 4 +--- 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 | 4 +--- methods/VMangos/ElunaQueryMethods.h | 4 +--- methods/VMangos/GameObjectMethods.h | 4 +--- methods/VMangos/GlobalMethods.h | 4 +--- methods/VMangos/GroupMethods.h | 6 ++---- methods/VMangos/GuildMethods.h | 4 +--- methods/VMangos/ItemMethods.h | 4 +--- methods/VMangos/MapMethods.h | 4 +--- methods/VMangos/ObjectMethods.h | 4 +--- methods/VMangos/PlayerMethods.h | 4 +--- methods/VMangos/QuestMethods.h | 4 +--- methods/VMangos/SpellMethods.h | 4 +--- methods/VMangos/UnitMethods.h | 4 +--- methods/VMangos/VehicleMethods.h | 4 +--- methods/VMangos/WorldObjectMethods.h | 4 +--- methods/VMangos/WorldPacketMethods.h | 4 +--- 77 files changed, 89 insertions(+), 239 deletions(-) diff --git a/ElunaTemplate.h b/ElunaTemplate.h index 0eb0d1fd67..7d49dfc387 100644 --- a/ElunaTemplate.h +++ b/ElunaTemplate.h @@ -168,7 +168,7 @@ struct ElunaRegister : name(name), mfunc(func), regState(state) {} // constructor for nullptr functions and METHOD_REG_NONE (unimplemented methods) - ElunaRegister(const char* name = nullptr, MethodRegisterState state = METHOD_REG_NONE) + ElunaRegister(const char* name, MethodRegisterState state = METHOD_REG_NONE) : name(name), mfunc(nullptr), regState(state) {} }; @@ -277,8 +277,8 @@ 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(methodTable); @@ -301,13 +301,15 @@ class ElunaTemplate } // load all core-specific methods - for (; methodTable && methodTable->name; ++methodTable) + for (int 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_rawset(E->L, -3); @@ -315,11 +317,11 @@ class ElunaTemplate } // 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_rawset(E->L, -3); @@ -328,7 +330,7 @@ class ElunaTemplate } // 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) diff --git a/methods/CMangos/AuraMethods.h b/methods/CMangos/AuraMethods.h index 9831732a77..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 }, - - { nullptr, METHOD_REG_NONE } + { "Remove", &LuaAura::Remove } }; }; #endif diff --git a/methods/CMangos/BattleGroundMethods.h b/methods/CMangos/BattleGroundMethods.h index 425a5b5919..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 }, - - { nullptr, METHOD_REG_NONE } + { "GetStatus", &LuaBattleGround::GetStatus } }; }; #endif diff --git a/methods/CMangos/CorpseMethods.h b/methods/CMangos/CorpseMethods.h index 61b86a93df..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 }, - - { nullptr, METHOD_REG_NONE } + { "SaveToDB", &LuaCorpse::SaveToDB } }; }; #endif diff --git a/methods/CMangos/CreatureMethods.h b/methods/CMangos/CreatureMethods.h index 46fbddcdfd..f96db232e5 100644 --- a/methods/CMangos/CreatureMethods.h +++ b/methods/CMangos/CreatureMethods.h @@ -1308,9 +1308,7 @@ namespace LuaCreature { "ClearThreat", METHOD_REG_NONE }, // TC/Acore { "ResetAllThreat", METHOD_REG_NONE }, // TC/Acore { "FixateTarget", METHOD_REG_NONE }, // TC/Acore - { "ClearFixate", METHOD_REG_NONE }, // TC/Acore - - { nullptr, METHOD_REG_NONE } + { "ClearFixate", METHOD_REG_NONE } // TC/Acore }; }; #endif diff --git a/methods/CMangos/ElunaQueryMethods.h b/methods/CMangos/ElunaQueryMethods.h index c3daad11a3..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 }, - - { nullptr, METHOD_REG_NONE } + { "IsNull", &LuaQuery::IsNull } }; }; #undef RESULT diff --git a/methods/CMangos/GameObjectMethods.h b/methods/CMangos/GameObjectMethods.h index 1d813e0af3..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", METHOD_REG_NONE }, // Not implemented - - { nullptr, METHOD_REG_NONE } + { "IsDestructible", METHOD_REG_NONE } // Not implemented }; }; #endif diff --git a/methods/CMangos/GlobalMethods.h b/methods/CMangos/GlobalMethods.h index 86d88c8d93..10785a1fb9 100644 --- a/methods/CMangos/GlobalMethods.h +++ b/methods/CMangos/GlobalMethods.h @@ -3295,9 +3295,7 @@ namespace LuaGlobalFunctions { "CreateInt64", &LuaGlobalFunctions::CreateLongLong }, { "CreateUint64", &LuaGlobalFunctions::CreateULongLong }, { "StartGameEvent", &LuaGlobalFunctions::StartGameEvent }, - { "StopGameEvent", &LuaGlobalFunctions::StopGameEvent }, - - { nullptr, METHOD_REG_NONE } + { "StopGameEvent", &LuaGlobalFunctions::StopGameEvent } }; } #endif diff --git a/methods/CMangos/GroupMethods.h b/methods/CMangos/GroupMethods.h index 3bb6ab50f3..088cf6ca92 100644 --- a/methods/CMangos/GroupMethods.h +++ b/methods/CMangos/GroupMethods.h @@ -416,9 +416,7 @@ namespace LuaGroup { "IsBFGroup", METHOD_REG_NONE }, // not implemented { "ConvertToLFG", METHOD_REG_NONE }, // not implemented { "GetMemberFlags", METHOD_REG_NONE }, // not implemented - { "SetMemberFlag", METHOD_REG_NONE }, // not implemented - - { nullptr, METHOD_REG_NONE } + { "SetMemberFlag", METHOD_REG_NONE } // not implemented }; }; diff --git a/methods/CMangos/GuildMethods.h b/methods/CMangos/GuildMethods.h index fbfe804582..757ae5ca26 100644 --- a/methods/CMangos/GuildMethods.h +++ b/methods/CMangos/GuildMethods.h @@ -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 - - { nullptr, 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 9bc61c2c05..1f771ac066 100644 --- a/methods/CMangos/ItemMethods.h +++ b/methods/CMangos/ItemMethods.h @@ -858,9 +858,7 @@ namespace LuaItem { "SaveToDB", &LuaItem::SaveToDB }, // Not implemented methods - { "IsRefundExpired", METHOD_REG_NONE }, // not implemented - - { nullptr, METHOD_REG_NONE } + { "IsRefundExpired", METHOD_REG_NONE } // not implemented }; }; #endif diff --git a/methods/CMangos/MapMethods.h b/methods/CMangos/MapMethods.h index 7504732783..1ab68e7a5a 100644 --- a/methods/CMangos/MapMethods.h +++ b/methods/CMangos/MapMethods.h @@ -363,9 +363,7 @@ namespace LuaMap // Other { "SaveInstanceData", &LuaMap::SaveInstanceData }, - { "Data", &LuaMap::Data }, - - { nullptr, METHOD_REG_NONE } + { "Data", &LuaMap::Data } }; }; #endif diff --git a/methods/CMangos/ObjectMethods.h b/methods/CMangos/ObjectMethods.h index 9996c45d52..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 }, - - { nullptr, METHOD_REG_NONE } + { "RemoveFlag", &LuaObject::RemoveFlag } }; }; #endif diff --git a/methods/CMangos/PlayerMethods.h b/methods/CMangos/PlayerMethods.h index c964439070..602c424837 100644 --- a/methods/CMangos/PlayerMethods.h +++ b/methods/CMangos/PlayerMethods.h @@ -4059,9 +4059,7 @@ namespace LuaPlayer { "ResetHonor", METHOD_REG_NONE }, // classic only { "ClearHonorInfo", METHOD_REG_NONE }, // classic only { "GetXP", METHOD_REG_NONE }, // not implemented - { "GetXPForNextLevel", METHOD_REG_NONE }, // not implemented - - { nullptr, METHOD_REG_NONE } + { "GetXPForNextLevel", METHOD_REG_NONE } // not implemented }; }; #endif diff --git a/methods/CMangos/QuestMethods.h b/methods/CMangos/QuestMethods.h index 929484b40b..8977e2f64d 100644 --- a/methods/CMangos/QuestMethods.h +++ b/methods/CMangos/QuestMethods.h @@ -193,9 +193,7 @@ namespace LuaQuest { "IsRepeatable", &LuaQuest::IsRepeatable }, // Not implemented methods - { "GetMaxLevel", METHOD_REG_NONE }, // not implemented - - { nullptr, METHOD_REG_NONE } + { "GetMaxLevel", METHOD_REG_NONE } // not implemented }; }; #endif diff --git a/methods/CMangos/SpellMethods.h b/methods/CMangos/SpellMethods.h index 628de33d12..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 }, - - { nullptr, METHOD_REG_NONE } + { "Finish", &LuaSpell::Finish } }; }; #endif diff --git a/methods/CMangos/UnitMethods.h b/methods/CMangos/UnitMethods.h index d0445dc9f9..68cab3fa85 100644 --- a/methods/CMangos/UnitMethods.h +++ b/methods/CMangos/UnitMethods.h @@ -2609,9 +2609,7 @@ namespace LuaUnit { "RemoveBindSightAuras", METHOD_REG_NONE }, // not implemented { "RemoveCharmAuras", METHOD_REG_NONE }, // not implemented { "DisableMelee", METHOD_REG_NONE }, // not implemented - { "SummonGuardian", METHOD_REG_NONE }, // not implemented - - { nullptr, METHOD_REG_NONE } + { "SummonGuardian", METHOD_REG_NONE } // not implemented }; }; #endif diff --git a/methods/CMangos/VehicleMethods.h b/methods/CMangos/VehicleMethods.h index 56e3f17c48..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 }, - - { nullptr, METHOD_REG_NONE } + { "RemovePassenger", &LuaVehicle::RemovePassenger } }; } diff --git a/methods/CMangos/WorldObjectMethods.h b/methods/CMangos/WorldObjectMethods.h index 00f85139c2..d937dee798 100644 --- a/methods/CMangos/WorldObjectMethods.h +++ b/methods/CMangos/WorldObjectMethods.h @@ -1185,9 +1185,7 @@ namespace LuaWorldObject { "PlayMusic", &LuaWorldObject::PlayMusic }, { "PlayDirectSound", &LuaWorldObject::PlayDirectSound }, { "PlayDistanceSound", &LuaWorldObject::PlayDistanceSound }, - { "Data", &LuaWorldObject::Data }, - - { nullptr, METHOD_REG_NONE } + { "Data", &LuaWorldObject::Data } }; }; #endif diff --git a/methods/CMangos/WorldPacketMethods.h b/methods/CMangos/WorldPacketMethods.h index c7f4127eb2..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 }, - - { nullptr, METHOD_REG_NONE } + { "WriteDouble", &LuaPacket::WriteDouble } }; }; diff --git a/methods/Mangos/AuraMethods.h b/methods/Mangos/AuraMethods.h index 1de9d57b48..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 }, - - { nullptr, METHOD_REG_NONE } + { "Remove", &LuaAura::Remove } }; }; #endif diff --git a/methods/Mangos/BattleGroundMethods.h b/methods/Mangos/BattleGroundMethods.h index f6747157d5..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 }, - - { nullptr, METHOD_REG_NONE } + { "GetStatus", &LuaBattleGround::GetStatus } }; }; #endif diff --git a/methods/Mangos/CorpseMethods.h b/methods/Mangos/CorpseMethods.h index 61b86a93df..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 }, - - { nullptr, METHOD_REG_NONE } + { "SaveToDB", &LuaCorpse::SaveToDB } }; }; #endif diff --git a/methods/Mangos/CreatureMethods.h b/methods/Mangos/CreatureMethods.h index 0b7b3aa884..16c122d75f 100644 --- a/methods/Mangos/CreatureMethods.h +++ b/methods/Mangos/CreatureMethods.h @@ -1206,9 +1206,7 @@ namespace LuaCreature { "ResetLootMode", METHOD_REG_NONE }, // not implemented { "RemoveLootMode", METHOD_REG_NONE }, // not implemented { "RemoveFromWorld", METHOD_REG_NONE }, // not implemented - { "GetRank", METHOD_REG_NONE }, // not implemented - - { nullptr, METHOD_REG_NONE } + { "GetRank", METHOD_REG_NONE } // not implemented }; }; #endif diff --git a/methods/Mangos/ElunaQueryMethods.h b/methods/Mangos/ElunaQueryMethods.h index 67e5c5802a..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 }, - - { nullptr, METHOD_REG_NONE } + { "IsNull", &LuaQuery::IsNull } }; }; #undef RESULT diff --git a/methods/Mangos/GameObjectMethods.h b/methods/Mangos/GameObjectMethods.h index 4c6396f19a..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", METHOD_REG_NONE }, // Not implemented - - { nullptr, METHOD_REG_NONE } + { "IsDestructible", METHOD_REG_NONE } // Not implemented }; }; #endif diff --git a/methods/Mangos/GlobalMethods.h b/methods/Mangos/GlobalMethods.h index 5040219888..61b5e52501 100644 --- a/methods/Mangos/GlobalMethods.h +++ b/methods/Mangos/GlobalMethods.h @@ -3039,9 +3039,7 @@ namespace LuaGlobalFunctions // unimplemented { "WorldDBQueryAsync", METHOD_REG_NONE }, { "CharDBQueryAsync", METHOD_REG_NONE }, - { "AuthDBQueryAsync", METHOD_REG_NONE }, - - { nullptr, METHOD_REG_NONE } + { "AuthDBQueryAsync", METHOD_REG_NONE } }; } #endif diff --git a/methods/Mangos/GroupMethods.h b/methods/Mangos/GroupMethods.h index 7b56708629..9b9037fe19 100644 --- a/methods/Mangos/GroupMethods.h +++ b/methods/Mangos/GroupMethods.h @@ -411,9 +411,7 @@ namespace LuaGroup { "IsBFGroup", METHOD_REG_NONE }, // not implemented { "ConvertToLFG", METHOD_REG_NONE }, // not implemented { "GetMemberFlags", METHOD_REG_NONE }, // not implemented - { "SetMemberFlag", METHOD_REG_NONE }, // not implemented - - { nullptr, METHOD_REG_NONE } + { "SetMemberFlag", METHOD_REG_NONE } // not implemented }; }; diff --git a/methods/Mangos/GuildMethods.h b/methods/Mangos/GuildMethods.h index 7203931ddc..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 - - { nullptr, 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 50deb635a2..14ed2fa581 100644 --- a/methods/Mangos/ItemMethods.h +++ b/methods/Mangos/ItemMethods.h @@ -867,9 +867,7 @@ namespace LuaItem { "SaveToDB", &LuaItem::SaveToDB }, // Not implemented methods - { "IsRefundExpired", METHOD_REG_NONE }, // not implemented - - { nullptr, METHOD_REG_NONE } + { "IsRefundExpired", METHOD_REG_NONE } // not implemented }; }; #endif diff --git a/methods/Mangos/MapMethods.h b/methods/Mangos/MapMethods.h index 33e2ecce06..5bef07e290 100644 --- a/methods/Mangos/MapMethods.h +++ b/methods/Mangos/MapMethods.h @@ -364,9 +364,7 @@ namespace LuaMap #endif // Other { "SaveInstanceData", &LuaMap::SaveInstanceData }, - { "Data", &LuaMap::Data }, - - { nullptr, METHOD_REG_NONE } + { "Data", &LuaMap::Data } }; }; #endif diff --git a/methods/Mangos/ObjectMethods.h b/methods/Mangos/ObjectMethods.h index 9996c45d52..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 }, - - { nullptr, METHOD_REG_NONE } + { "RemoveFlag", &LuaObject::RemoveFlag } }; }; #endif diff --git a/methods/Mangos/PlayerMethods.h b/methods/Mangos/PlayerMethods.h index bd16089691..09a12f9499 100644 --- a/methods/Mangos/PlayerMethods.h +++ b/methods/Mangos/PlayerMethods.h @@ -3976,9 +3976,7 @@ namespace LuaPlayer { "GetXP", METHOD_REG_NONE }, // not implemented { "GetXPForNextLevel", METHOD_REG_NONE }, // not implemented { "CanCompleteRepeatableQuest", METHOD_REG_NONE }, // not implemented - { "CanRewardQuest", METHOD_REG_NONE }, // not implemented - - { nullptr, METHOD_REG_NONE } + { "CanRewardQuest", METHOD_REG_NONE } // not implemented }; }; #endif diff --git a/methods/Mangos/QuestMethods.h b/methods/Mangos/QuestMethods.h index 1a10c85c07..d257a8c081 100644 --- a/methods/Mangos/QuestMethods.h +++ b/methods/Mangos/QuestMethods.h @@ -193,9 +193,7 @@ namespace LuaQuest #endif // Not implemented methods - { "GetMaxLevel", METHOD_REG_NONE }, // not implemented - - { nullptr, METHOD_REG_NONE } + { "GetMaxLevel", METHOD_REG_NONE } // not implemented }; }; #endif diff --git a/methods/Mangos/SpellMethods.h b/methods/Mangos/SpellMethods.h index ce3a4d9dfd..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 }, - - { nullptr, METHOD_REG_NONE } + { "Finish", &LuaSpell::Finish } }; }; #endif diff --git a/methods/Mangos/UnitMethods.h b/methods/Mangos/UnitMethods.h index a62959f3f6..5e2cb18a3c 100644 --- a/methods/Mangos/UnitMethods.h +++ b/methods/Mangos/UnitMethods.h @@ -2616,9 +2616,7 @@ namespace LuaUnit { "RemoveCharmAuras", METHOD_REG_NONE }, // not implemented { "DisableMelee", METHOD_REG_NONE }, // not implemented { "SummonGuardian", METHOD_REG_NONE }, // not implemented - { "SetImmuneTo", METHOD_REG_NONE }, // not implemented - - { nullptr, METHOD_REG_NONE } + { "SetImmuneTo", METHOD_REG_NONE } // not implemented }; }; #endif diff --git a/methods/Mangos/VehicleMethods.h b/methods/Mangos/VehicleMethods.h index e74278083c..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 }, - - { nullptr, METHOD_REG_NONE } + { "RemovePassenger", &LuaVehicle::RemovePassenger } }; } diff --git a/methods/Mangos/WorldObjectMethods.h b/methods/Mangos/WorldObjectMethods.h index 782ede857d..b3a4987318 100644 --- a/methods/Mangos/WorldObjectMethods.h +++ b/methods/Mangos/WorldObjectMethods.h @@ -1183,9 +1183,7 @@ namespace LuaWorldObject { "PlayMusic", &LuaWorldObject::PlayMusic }, { "PlayDirectSound", &LuaWorldObject::PlayDirectSound }, { "PlayDistanceSound", &LuaWorldObject::PlayDistanceSound }, - { "Data", &LuaWorldObject::Data }, - - { nullptr, METHOD_REG_NONE } + { "Data", &LuaWorldObject::Data } }; }; #endif diff --git a/methods/Mangos/WorldPacketMethods.h b/methods/Mangos/WorldPacketMethods.h index 755576ad28..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 }, - - { nullptr, METHOD_REG_NONE } + { "WriteDouble", &LuaPacket::WriteDouble } }; }; diff --git a/methods/TrinityCore/AuraMethods.h b/methods/TrinityCore/AuraMethods.h index cd1468c10c..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 }, - - { nullptr, METHOD_REG_NONE } + { "Remove", &LuaAura::Remove } }; }; #endif diff --git a/methods/TrinityCore/BattleGroundMethods.h b/methods/TrinityCore/BattleGroundMethods.h index 517acf2c3f..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 }, - - { nullptr, METHOD_REG_NONE } + { "GetStatus", &LuaBattleGround::GetStatus } }; }; #endif diff --git a/methods/TrinityCore/CorpseMethods.h b/methods/TrinityCore/CorpseMethods.h index 16f55b492a..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 }, - - { nullptr, METHOD_REG_NONE } + { "SaveToDB", &LuaCorpse::SaveToDB } }; }; #endif diff --git a/methods/TrinityCore/CreatureMethods.h b/methods/TrinityCore/CreatureMethods.h index 81d0dd81ce..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 }, - - { nullptr, METHOD_REG_NONE } + { "RemoveFromWorld", &LuaCreature::RemoveFromWorld } }; }; #endif diff --git a/methods/TrinityCore/ElunaQueryMethods.h b/methods/TrinityCore/ElunaQueryMethods.h index 6248543312..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 }, - - { nullptr, METHOD_REG_NONE } + { "IsNull", &LuaQuery::IsNull } }; }; #undef RESULT diff --git a/methods/TrinityCore/GameObjectMethods.h b/methods/TrinityCore/GameObjectMethods.h index 6ec3f2412f..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 }, - - { nullptr, METHOD_REG_NONE } + { "SaveToDB", &LuaGameObject::SaveToDB } }; }; #endif diff --git a/methods/TrinityCore/GlobalMethods.h b/methods/TrinityCore/GlobalMethods.h index dd36d288f8..73a315eefe 100644 --- a/methods/TrinityCore/GlobalMethods.h +++ b/methods/TrinityCore/GlobalMethods.h @@ -3224,9 +3224,7 @@ namespace LuaGlobalFunctions { "CreateInt64", &LuaGlobalFunctions::CreateLongLong }, { "CreateUint64", &LuaGlobalFunctions::CreateULongLong }, { "StartGameEvent", &LuaGlobalFunctions::StartGameEvent }, - { "StopGameEvent", &LuaGlobalFunctions::StopGameEvent }, - - { nullptr, METHOD_REG_NONE } + { "StopGameEvent", &LuaGlobalFunctions::StopGameEvent } }; } #endif diff --git a/methods/TrinityCore/GroupMethods.h b/methods/TrinityCore/GroupMethods.h index 1f1a756c78..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 - - { nullptr, 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 65ab6397db..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 - - { nullptr, 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 77a2084232..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 }, - - { nullptr, METHOD_REG_NONE } + { "SaveToDB", &LuaItem::SaveToDB } }; }; #endif diff --git a/methods/TrinityCore/MapMethods.h b/methods/TrinityCore/MapMethods.h index e99ee63755..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 }, - - { nullptr, METHOD_REG_NONE } + { "Data", &LuaMap::Data } }; }; #endif diff --git a/methods/TrinityCore/ObjectMethods.h b/methods/TrinityCore/ObjectMethods.h index ef9e0b56ac..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 }, - - { nullptr, METHOD_REG_NONE } + { "RemoveFlag", &LuaObject::RemoveFlag } }; }; #endif diff --git a/methods/TrinityCore/PlayerMethods.h b/methods/TrinityCore/PlayerMethods.h index 8f083c8cd2..9e4cb5d5ba 100644 --- a/methods/TrinityCore/PlayerMethods.h +++ b/methods/TrinityCore/PlayerMethods.h @@ -3986,9 +3986,7 @@ namespace LuaPlayer { "UpdateHonor", METHOD_REG_NONE }, // classic only { "ResetHonor", METHOD_REG_NONE }, // classic only { "ClearHonorInfo", METHOD_REG_NONE }, // classic only - { "GainSpellComboPoints", METHOD_REG_NONE }, // not implemented - - { nullptr, METHOD_REG_NONE } + { "GainSpellComboPoints", METHOD_REG_NONE } // not implemented }; }; #endif diff --git a/methods/TrinityCore/QuestMethods.h b/methods/TrinityCore/QuestMethods.h index 4912cc24ac..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 }, - - { nullptr, METHOD_REG_NONE } + { "IsRepeatable", &LuaQuest::IsRepeatable } }; }; #endif diff --git a/methods/TrinityCore/SpellMethods.h b/methods/TrinityCore/SpellMethods.h index 803c8ba43e..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 }, - - { nullptr, METHOD_REG_NONE } + { "Finish", &LuaSpell::Finish } }; }; #endif diff --git a/methods/TrinityCore/UnitMethods.h b/methods/TrinityCore/UnitMethods.h index 0079fec7a6..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", METHOD_REG_NONE }, // not implemented - - { nullptr, METHOD_REG_NONE } + { "SummonGuardian", METHOD_REG_NONE } // not implemented }; }; #endif diff --git a/methods/TrinityCore/VehicleMethods.h b/methods/TrinityCore/VehicleMethods.h index 6353f8bdbc..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 }, - - { nullptr, METHOD_REG_NONE } + { "RemovePassenger", &LuaVehicle::RemovePassenger } }; } diff --git a/methods/TrinityCore/WorldObjectMethods.h b/methods/TrinityCore/WorldObjectMethods.h index 13c53db9ab..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 }, - - { nullptr, METHOD_REG_NONE } + { "Data", &LuaWorldObject::Data } }; }; #endif diff --git a/methods/TrinityCore/WorldPacketMethods.h b/methods/TrinityCore/WorldPacketMethods.h index 755576ad28..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 }, - - { nullptr, METHOD_REG_NONE } + { "WriteDouble", &LuaPacket::WriteDouble } }; }; diff --git a/methods/VMangos/AuraMethods.h b/methods/VMangos/AuraMethods.h index b8efca2fa4..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 }, - - { nullptr, METHOD_REG_NONE } + { "Remove", &LuaAura::Remove } }; }; #endif diff --git a/methods/VMangos/BattleGroundMethods.h b/methods/VMangos/BattleGroundMethods.h index 09dc82198f..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 }, - - { nullptr, METHOD_REG_NONE } + { "GetStatus", &LuaBattleGround::GetStatus } }; }; #endif diff --git a/methods/VMangos/CorpseMethods.h b/methods/VMangos/CorpseMethods.h index 61b86a93df..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 }, - - { nullptr, METHOD_REG_NONE } + { "SaveToDB", &LuaCorpse::SaveToDB } }; }; #endif diff --git a/methods/VMangos/CreatureMethods.h b/methods/VMangos/CreatureMethods.h index c08c29851e..ee2fc6d70e 100644 --- a/methods/VMangos/CreatureMethods.h +++ b/methods/VMangos/CreatureMethods.h @@ -1214,9 +1214,7 @@ namespace LuaCreature { "AddLootMode", METHOD_REG_NONE }, // not implemented { "ResetLootMode", METHOD_REG_NONE }, // not implemented { "RemoveLootMode", METHOD_REG_NONE }, // not implemented - { "RemoveFromWorld", METHOD_REG_NONE }, // not implemented - - { nullptr, METHOD_REG_NONE } + { "RemoveFromWorld", METHOD_REG_NONE } // not implemented }; }; #endif diff --git a/methods/VMangos/ElunaQueryMethods.h b/methods/VMangos/ElunaQueryMethods.h index c3daad11a3..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 }, - - { nullptr, METHOD_REG_NONE } + { "IsNull", &LuaQuery::IsNull } }; }; #undef RESULT diff --git a/methods/VMangos/GameObjectMethods.h b/methods/VMangos/GameObjectMethods.h index 99f581d032..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", METHOD_REG_NONE }, // Not implemented - - { nullptr, METHOD_REG_NONE } + { "IsDestructible", METHOD_REG_NONE } // Not implemented }; }; #endif diff --git a/methods/VMangos/GlobalMethods.h b/methods/VMangos/GlobalMethods.h index 1420a8bc73..365e7833f9 100644 --- a/methods/VMangos/GlobalMethods.h +++ b/methods/VMangos/GlobalMethods.h @@ -2980,9 +2980,7 @@ namespace LuaGlobalFunctions { "CreateInt64", &LuaGlobalFunctions::CreateLongLong }, { "CreateUint64", &LuaGlobalFunctions::CreateULongLong }, { "StartGameEvent", &LuaGlobalFunctions::StartGameEvent }, - { "StopGameEvent", &LuaGlobalFunctions::StopGameEvent }, - - { nullptr, METHOD_REG_NONE } + { "StopGameEvent", &LuaGlobalFunctions::StopGameEvent } }; } #endif diff --git a/methods/VMangos/GroupMethods.h b/methods/VMangos/GroupMethods.h index 2c9ddd8a95..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", METHOD_REG_NONE }, // not implemented + { "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 - - { nullptr, METHOD_REG_NONE } + { "SetMemberFlag", METHOD_REG_NONE } // not implemented }; }; diff --git a/methods/VMangos/GuildMethods.h b/methods/VMangos/GuildMethods.h index 792c951bd1..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", METHOD_REG_NONE }, // not implemented - - { nullptr, METHOD_REG_NONE } + { "SetBankTabText", METHOD_REG_NONE } // not implemented }; }; #endif diff --git a/methods/VMangos/ItemMethods.h b/methods/VMangos/ItemMethods.h index fde3a4353b..4b2b76d986 100644 --- a/methods/VMangos/ItemMethods.h +++ b/methods/VMangos/ItemMethods.h @@ -721,9 +721,7 @@ namespace LuaItem { "IsCurrencyToken", METHOD_REG_NONE }, // not implemented { "IsBoundAccountWide", METHOD_REG_NONE }, // not implemented { "IsWeaponVellum", METHOD_REG_NONE }, // not implemented - { "IsArmorVellum", METHOD_REG_NONE }, // not implemented - - { nullptr, METHOD_REG_NONE } + { "IsArmorVellum", METHOD_REG_NONE } // not implemented }; }; #endif diff --git a/methods/VMangos/MapMethods.h b/methods/VMangos/MapMethods.h index 78242c621b..d88a00ced3 100644 --- a/methods/VMangos/MapMethods.h +++ b/methods/VMangos/MapMethods.h @@ -324,9 +324,7 @@ namespace LuaMap { "SaveInstanceData", &LuaMap::SaveInstanceData }, { "IsArena", METHOD_REG_NONE }, - { "IsHeroic", METHOD_REG_NONE }, - - { nullptr, METHOD_REG_NONE } + { "IsHeroic", METHOD_REG_NONE } }; }; #endif diff --git a/methods/VMangos/ObjectMethods.h b/methods/VMangos/ObjectMethods.h index f390b49a79..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 }, - - { nullptr, METHOD_REG_NONE } + { "RemoveFlag", &LuaObject::RemoveFlag } }; }; #endif diff --git a/methods/VMangos/PlayerMethods.h b/methods/VMangos/PlayerMethods.h index dcd7622a8b..98fab50fac 100644 --- a/methods/VMangos/PlayerMethods.h +++ b/methods/VMangos/PlayerMethods.h @@ -4394,9 +4394,7 @@ namespace LuaPlayer { "GetXP", METHOD_REG_NONE }, // not implemented { "GetXPForNextLevel", METHOD_REG_NONE }, // not implemented { "CanCompleteRepeatableQuest", METHOD_REG_NONE }, // not implemented - { "CanRewardQuest", METHOD_REG_NONE }, // not implemented - - { nullptr, METHOD_REG_NONE } + { "CanRewardQuest", METHOD_REG_NONE } // not implemented }; }; #endif diff --git a/methods/VMangos/QuestMethods.h b/methods/VMangos/QuestMethods.h index e73445c57e..c55d9d9afe 100644 --- a/methods/VMangos/QuestMethods.h +++ b/methods/VMangos/QuestMethods.h @@ -204,9 +204,7 @@ namespace LuaQuest #endif // Not implemented methods - { "GetMaxLevel", METHOD_REG_NONE }, // not implemented - - { nullptr, METHOD_REG_NONE } + { "GetMaxLevel", METHOD_REG_NONE } // not implemented }; }; #endif diff --git a/methods/VMangos/SpellMethods.h b/methods/VMangos/SpellMethods.h index e85846c79c..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 }, - - { nullptr, METHOD_REG_NONE } + { "Finish", &LuaSpell::Finish } }; }; #endif diff --git a/methods/VMangos/UnitMethods.h b/methods/VMangos/UnitMethods.h index 61fb234206..feffa1f650 100644 --- a/methods/VMangos/UnitMethods.h +++ b/methods/VMangos/UnitMethods.h @@ -3158,9 +3158,7 @@ namespace LuaUnit { "RemoveCharmAuras", METHOD_REG_NONE }, // not implemented { "DisableMelee", METHOD_REG_NONE }, // not implemented { "SummonGuardian", METHOD_REG_NONE }, // not implemented - { "SetImmuneTo", METHOD_REG_NONE }, // not implemented - - { nullptr, METHOD_REG_NONE } + { "SetImmuneTo", METHOD_REG_NONE } // not implemented }; }; #endif diff --git a/methods/VMangos/VehicleMethods.h b/methods/VMangos/VehicleMethods.h index 5c6015a76a..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 }, - - { nullptr, METHOD_REG_NONE } + { "RemovePassenger", &LuaVehicle::RemovePassenger } }; } diff --git a/methods/VMangos/WorldObjectMethods.h b/methods/VMangos/WorldObjectMethods.h index bdebc05c01..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 }, - - { nullptr, METHOD_REG_NONE } + { "PlayDistanceSound", &LuaWorldObject::PlayDistanceSound } }; }; #endif diff --git a/methods/VMangos/WorldPacketMethods.h b/methods/VMangos/WorldPacketMethods.h index b609a77904..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 }, - - { nullptr, METHOD_REG_NONE } + { "WriteDouble", &LuaPacket::WriteDouble } }; }; From d514f9df7900f6e14e50193887b21765338a8f8e Mon Sep 17 00:00:00 2001 From: Foereaper Date: Tue, 6 Aug 2024 17:11:57 +0200 Subject: [PATCH 11/13] Add method names to output for wrong state and not implemented errors --- ElunaTemplate.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ElunaTemplate.h b/ElunaTemplate.h index 7d49dfc387..32b79cffd5 100644 --- a/ElunaTemplate.h +++ b/ElunaTemplate.h @@ -311,7 +311,8 @@ class ElunaTemplate // if the method should not be registered, push a closure to error output function 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; } @@ -323,7 +324,8 @@ class ElunaTemplate 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; } @@ -481,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; From 2eefece9b04510a6c7ddec63ddccaa5cd7e36cf3 Mon Sep 17 00:00:00 2001 From: Foereaper Date: Tue, 6 Aug 2024 17:34:16 +0200 Subject: [PATCH 12/13] Fix iterator type --- ElunaTemplate.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ElunaTemplate.h b/ElunaTemplate.h index 32b79cffd5..6a19eb560c 100644 --- a/ElunaTemplate.h +++ b/ElunaTemplate.h @@ -301,7 +301,7 @@ class ElunaTemplate } // load all core-specific methods - for (int i = 0; i < N; i++) + for (std::size_t i = 0; i < N; i++) { const auto& method = methodTable + i; From 31a5310b9d0d4ae69e21275d4feba988a48d224c Mon Sep 17 00:00:00 2001 From: Foereaper Date: Wed, 7 Aug 2024 16:17:56 +0200 Subject: [PATCH 13/13] Use helper function to retrieve Eluna object in thunk --- ElunaTemplate.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/ElunaTemplate.h b/ElunaTemplate.h index 6a19eb560c..e6feb32816 100644 --- a/ElunaTemplate.h +++ b/ElunaTemplate.h @@ -320,23 +320,23 @@ class ElunaTemplate // 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() && method->regState != METHOD_REG_ALL) { + int32 mapId = E->GetBoundMapId(); + // if the method should not be registered, push a closure to error output function - if ((E->GetBoundMapId() == -1 && method->regState == METHOD_REG_MAP) || - (E->GetBoundMapId() != -1 && method->regState == METHOD_REG_WORLD)) + if ((mapId == -1 && method->regState == METHOD_REG_MAP) || + (mapId != -1 && method->regState == METHOD_REG_WORLD)) { lua_pushstring(E->L, method->name); - lua_pushcclosure(E->L, MethodWrongState, 1); + lua_pushinteger(E->L, mapId); + lua_pushcclosure(E->L, MethodWrongState, 2); lua_rawset(E->L, -3); continue; } } - // push method table and Eluna object pointers as light user data + // push a closure to the thunk with the method pointer as light user data 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) - lua_pushcclosure(E->L, thunk, 2); + lua_pushcclosure(E->L, thunk, 1); lua_rawset(E->L, -3); } @@ -413,7 +413,7 @@ class ElunaTemplate 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))); + Eluna* E = Eluna::GetEluna(L); // determine if the method table functions are global or non-global constexpr bool isGlobal = std::is_same_v; @@ -483,7 +483,7 @@ 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 method '%s' that does not exist for state: %d", lua_tostring(L, lua_upvalueindex(1)), Eluna::GetEluna(L)->GetBoundMapId()); 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)), lua_tointeger(L, lua_upvalueindex(2))); 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; } };