From 0f92a1e2495dcb7b00c79ad3b722f8dbaf236d03 Mon Sep 17 00:00:00 2001 From: Foereaper Date: Tue, 16 Jan 2024 00:27:42 +0100 Subject: [PATCH] Clean up some unintended tab changes --- LuaEngine.cpp | 528 +++++++++++++++++++++++++------------------------- LuaEngine.h | 60 +++--- 2 files changed, 294 insertions(+), 294 deletions(-) diff --git a/LuaEngine.cpp b/LuaEngine.cpp index 95c62d9a98..2abbc0a65f 100644 --- a/LuaEngine.cpp +++ b/LuaEngine.cpp @@ -75,33 +75,33 @@ void Eluna::_ReloadEluna() } Eluna::Eluna(int32 mapId) : - event_level(0), - push_counter(0), - enabled(false), - boundMapId(mapId), - - L(NULL), - eventMgr(NULL), - - ServerEventBindings(NULL), - PlayerEventBindings(NULL), - GuildEventBindings(NULL), - GroupEventBindings(NULL), - VehicleEventBindings(NULL), - BGEventBindings(NULL), - - PacketEventBindings(NULL), - CreatureEventBindings(NULL), - CreatureGossipBindings(NULL), - GameObjectEventBindings(NULL), - GameObjectGossipBindings(NULL), - ItemEventBindings(NULL), - ItemGossipBindings(NULL), - PlayerGossipBindings(NULL), - MapEventBindings(NULL), - InstanceEventBindings(NULL), - - CreatureUniqueBindings(NULL) +event_level(0), +push_counter(0), +enabled(false), +boundMapId(mapId), + +L(NULL), +eventMgr(NULL), + +ServerEventBindings(NULL), +PlayerEventBindings(NULL), +GuildEventBindings(NULL), +GroupEventBindings(NULL), +VehicleEventBindings(NULL), +BGEventBindings(NULL), + +PacketEventBindings(NULL), +CreatureEventBindings(NULL), +CreatureGossipBindings(NULL), +GameObjectEventBindings(NULL), +GameObjectGossipBindings(NULL), +ItemEventBindings(NULL), +ItemGossipBindings(NULL), +PlayerGossipBindings(NULL), +MapEventBindings(NULL), +InstanceEventBindings(NULL), + +CreatureUniqueBindings(NULL) { OpenLua(); eventMgr = new EventMgr(this); @@ -167,25 +167,25 @@ void Eluna::CreateBindStores() { DestroyBindStores(); - ServerEventBindings = new BindingMap< EventKey >(L); - PlayerEventBindings = new BindingMap< EventKey >(L); - GuildEventBindings = new BindingMap< EventKey >(L); - GroupEventBindings = new BindingMap< EventKey >(L); - VehicleEventBindings = new BindingMap< EventKey >(L); - BGEventBindings = new BindingMap< EventKey >(L); - - PacketEventBindings = new BindingMap< EntryKey >(L); - CreatureEventBindings = new BindingMap< EntryKey >(L); - CreatureGossipBindings = new BindingMap< EntryKey >(L); - GameObjectEventBindings = new BindingMap< EntryKey >(L); + ServerEventBindings = new BindingMap< EventKey >(L); + PlayerEventBindings = new BindingMap< EventKey >(L); + GuildEventBindings = new BindingMap< EventKey >(L); + GroupEventBindings = new BindingMap< EventKey >(L); + VehicleEventBindings = new BindingMap< EventKey >(L); + BGEventBindings = new BindingMap< EventKey >(L); + + PacketEventBindings = new BindingMap< EntryKey >(L); + CreatureEventBindings = new BindingMap< EntryKey >(L); + CreatureGossipBindings = new BindingMap< EntryKey >(L); + GameObjectEventBindings = new BindingMap< EntryKey >(L); GameObjectGossipBindings = new BindingMap< EntryKey >(L); - ItemEventBindings = new BindingMap< EntryKey >(L); - ItemGossipBindings = new BindingMap< EntryKey >(L); - PlayerGossipBindings = new BindingMap< EntryKey >(L); - MapEventBindings = new BindingMap< EntryKey >(L); - InstanceEventBindings = new BindingMap< EntryKey >(L); + ItemEventBindings = new BindingMap< EntryKey >(L); + ItemGossipBindings = new BindingMap< EntryKey >(L); + PlayerGossipBindings = new BindingMap< EntryKey >(L); + MapEventBindings = new BindingMap< EntryKey >(L); + InstanceEventBindings = new BindingMap< EntryKey >(L); - CreatureUniqueBindings = new BindingMap< UniqueObjectKey >(L); + CreatureUniqueBindings = new BindingMap< UniqueObjectKey >(L); } void Eluna::DestroyBindStores() @@ -478,14 +478,14 @@ void Eluna::Push(Unit const* unit) } switch (unit->GetTypeId()) { - case TYPEID_UNIT: - Push(unit->ToCreature()); - break; - case TYPEID_PLAYER: - Push(unit->ToPlayer()); - break; - default: - ElunaTemplate::Push(this, unit); + case TYPEID_UNIT: + Push(unit->ToCreature()); + break; + case TYPEID_PLAYER: + Push(unit->ToPlayer()); + break; + default: + ElunaTemplate::Push(this, unit); } } void Eluna::Push(WorldObject const* obj) @@ -497,20 +497,20 @@ void Eluna::Push(WorldObject const* obj) } switch (obj->GetTypeId()) { - case TYPEID_UNIT: - Push(obj->ToCreature()); - break; - case TYPEID_PLAYER: - Push(obj->ToPlayer()); - break; - case TYPEID_GAMEOBJECT: - Push(obj->ToGameObject()); - break; - case TYPEID_CORPSE: - Push(obj->ToCorpse()); - break; - default: - ElunaTemplate::Push(this, obj); + case TYPEID_UNIT: + Push(obj->ToCreature()); + break; + case TYPEID_PLAYER: + Push(obj->ToPlayer()); + break; + case TYPEID_GAMEOBJECT: + Push(obj->ToGameObject()); + break; + case TYPEID_CORPSE: + Push(obj->ToCorpse()); + break; + default: + ElunaTemplate::Push(this, obj); } } void Eluna::Push(Object const* obj) @@ -522,20 +522,20 @@ void Eluna::Push(Object const* obj) } switch (obj->GetTypeId()) { - case TYPEID_UNIT: - Push(obj->ToCreature()); - break; - case TYPEID_PLAYER: - Push(obj->ToPlayer()); - break; - case TYPEID_GAMEOBJECT: - Push(obj->ToGameObject()); - break; - case TYPEID_CORPSE: - Push(obj->ToCorpse()); - break; - default: - ElunaTemplate::Push(this, obj); + case TYPEID_UNIT: + Push(obj->ToCreature()); + break; + case TYPEID_PLAYER: + Push(obj->ToPlayer()); + break; + case TYPEID_GAMEOBJECT: + Push(obj->ToGameObject()); + break; + case TYPEID_CORPSE: + Push(obj->ToCorpse()); + break; + default: + ElunaTemplate::Push(this, obj); } } void Eluna::Push(ObjectGuid const guid) @@ -739,87 +739,118 @@ int Eluna::Register(lua_State* L, uint8 regtype, uint32 entry, ObjectGuid guid, switch (regtype) { - case Hooks::REGTYPE_SERVER: - if (event_id < Hooks::SERVER_EVENT_COUNT) - { - auto key = EventKey((Hooks::ServerEvents)event_id); - bindingID = ServerEventBindings->Insert(key, functionRef, shots); - createCancelCallback(this, bindingID, ServerEventBindings); - return 1; // Stack: callback - } - break; + case Hooks::REGTYPE_SERVER: + if (event_id < Hooks::SERVER_EVENT_COUNT) + { + auto key = EventKey((Hooks::ServerEvents)event_id); + bindingID = ServerEventBindings->Insert(key, functionRef, shots); + createCancelCallback(this, bindingID, ServerEventBindings); + return 1; // Stack: callback + } + break; - case Hooks::REGTYPE_PLAYER: - if (event_id < Hooks::PLAYER_EVENT_COUNT) - { - auto key = EventKey((Hooks::PlayerEvents)event_id); - bindingID = PlayerEventBindings->Insert(key, functionRef, shots); - createCancelCallback(this, bindingID, PlayerEventBindings); - return 1; // Stack: callback - } - break; + case Hooks::REGTYPE_PLAYER: + if (event_id < Hooks::PLAYER_EVENT_COUNT) + { + auto key = EventKey((Hooks::PlayerEvents)event_id); + bindingID = PlayerEventBindings->Insert(key, functionRef, shots); + createCancelCallback(this, bindingID, PlayerEventBindings); + return 1; // Stack: callback + } + break; - case Hooks::REGTYPE_GUILD: - if (event_id < Hooks::GUILD_EVENT_COUNT) - { - auto key = EventKey((Hooks::GuildEvents)event_id); - bindingID = GuildEventBindings->Insert(key, functionRef, shots); - createCancelCallback(this, bindingID, GuildEventBindings); - return 1; // Stack: callback - } - break; + case Hooks::REGTYPE_GUILD: + if (event_id < Hooks::GUILD_EVENT_COUNT) + { + auto key = EventKey((Hooks::GuildEvents)event_id); + bindingID = GuildEventBindings->Insert(key, functionRef, shots); + createCancelCallback(this, bindingID, GuildEventBindings); + return 1; // Stack: callback + } + break; - case Hooks::REGTYPE_GROUP: - if (event_id < Hooks::GROUP_EVENT_COUNT) - { - auto key = EventKey((Hooks::GroupEvents)event_id); - bindingID = GroupEventBindings->Insert(key, functionRef, shots); - createCancelCallback(this, bindingID, GroupEventBindings); - return 1; // Stack: callback - } - break; + case Hooks::REGTYPE_GROUP: + if (event_id < Hooks::GROUP_EVENT_COUNT) + { + auto key = EventKey((Hooks::GroupEvents)event_id); + bindingID = GroupEventBindings->Insert(key, functionRef, shots); + createCancelCallback(this, bindingID, GroupEventBindings); + return 1; // Stack: callback + } + break; - case Hooks::REGTYPE_VEHICLE: - if (event_id < Hooks::VEHICLE_EVENT_COUNT) - { - auto key = EventKey((Hooks::VehicleEvents)event_id); - bindingID = VehicleEventBindings->Insert(key, functionRef, shots); - createCancelCallback(this, bindingID, VehicleEventBindings); - return 1; // Stack: callback - } - break; + case Hooks::REGTYPE_VEHICLE: + if (event_id < Hooks::VEHICLE_EVENT_COUNT) + { + auto key = EventKey((Hooks::VehicleEvents)event_id); + bindingID = VehicleEventBindings->Insert(key, functionRef, shots); + createCancelCallback(this, bindingID, VehicleEventBindings); + return 1; // Stack: callback + } + break; - case Hooks::REGTYPE_BG: - if (event_id < Hooks::BG_EVENT_COUNT) - { - auto key = EventKey((Hooks::BGEvents)event_id); - bindingID = BGEventBindings->Insert(key, functionRef, shots); - createCancelCallback(this, bindingID, BGEventBindings); - return 1; // Stack: callback - } - break; + case Hooks::REGTYPE_BG: + if (event_id < Hooks::BG_EVENT_COUNT) + { + auto key = EventKey((Hooks::BGEvents)event_id); + bindingID = BGEventBindings->Insert(key, functionRef, shots); + createCancelCallback(this, bindingID, BGEventBindings); + return 1; // Stack: callback + } + break; - case Hooks::REGTYPE_PACKET: - if (event_id < Hooks::PACKET_EVENT_COUNT) - { - if (entry >= NUM_MSG_TYPES) + case Hooks::REGTYPE_PACKET: + if (event_id < Hooks::PACKET_EVENT_COUNT) { - luaL_unref(L, LUA_REGISTRYINDEX, functionRef); - luaL_error(L, "Couldn't find a creature with (ID: %d)!", entry); - return 0; // Stack: (empty) + if (entry >= NUM_MSG_TYPES) + { + luaL_unref(L, LUA_REGISTRYINDEX, functionRef); + luaL_error(L, "Couldn't find a creature with (ID: %d)!", entry); + return 0; // Stack: (empty) + } + + auto key = EntryKey((Hooks::PacketEvents)event_id, entry); + bindingID = PacketEventBindings->Insert(key, functionRef, shots); + createCancelCallback(this, bindingID, PacketEventBindings); + return 1; // Stack: callback } + break; - auto key = EntryKey((Hooks::PacketEvents)event_id, entry); - bindingID = PacketEventBindings->Insert(key, functionRef, shots); - createCancelCallback(this, bindingID, PacketEventBindings); - return 1; // Stack: callback - } - break; + case Hooks::REGTYPE_CREATURE: + if (event_id < Hooks::CREATURE_EVENT_COUNT) + { + if (entry != 0) + { + if (!eObjectMgr->GetCreatureTemplate(entry)) + { + luaL_unref(L, LUA_REGISTRYINDEX, functionRef); + luaL_error(L, "Couldn't find a creature with (ID: %d)!", entry); + return 0; // Stack: (empty) + } + + auto key = EntryKey((Hooks::CreatureEvents)event_id, entry); + bindingID = CreatureEventBindings->Insert(key, functionRef, shots); + createCancelCallback(this, bindingID, CreatureEventBindings); + } + else + { + if (guid.IsEmpty()) + { + luaL_unref(L, LUA_REGISTRYINDEX, functionRef); + luaL_error(L, "guid was 0!"); + return 0; // Stack: (empty) + } + + auto key = UniqueObjectKey((Hooks::CreatureEvents)event_id, guid, instanceId); + bindingID = CreatureUniqueBindings->Insert(key, functionRef, shots); + createCancelCallback(this, bindingID, CreatureUniqueBindings); + } + return 1; // Stack: callback + } + break; - case Hooks::REGTYPE_CREATURE: - if (event_id < Hooks::CREATURE_EVENT_COUNT) - { - if (entry != 0) + case Hooks::REGTYPE_CREATURE_GOSSIP: + if (event_id < Hooks::GOSSIP_EVENT_COUNT) { if (!eObjectMgr->GetCreatureTemplate(entry)) { @@ -828,139 +859,108 @@ int Eluna::Register(lua_State* L, uint8 regtype, uint32 entry, ObjectGuid guid, return 0; // Stack: (empty) } - auto key = EntryKey((Hooks::CreatureEvents)event_id, entry); - bindingID = CreatureEventBindings->Insert(key, functionRef, shots); - createCancelCallback(this, bindingID, CreatureEventBindings); + auto key = EntryKey((Hooks::GossipEvents)event_id, entry); + bindingID = CreatureGossipBindings->Insert(key, functionRef, shots); + createCancelCallback(this, bindingID, CreatureGossipBindings); + return 1; // Stack: callback } - else + break; + + case Hooks::REGTYPE_GAMEOBJECT: + if (event_id < Hooks::GAMEOBJECT_EVENT_COUNT) { - if (guid.IsEmpty()) + if (!eObjectMgr->GetGameObjectTemplate(entry)) { luaL_unref(L, LUA_REGISTRYINDEX, functionRef); - luaL_error(L, "guid was 0!"); + luaL_error(L, "Couldn't find a gameobject with (ID: %d)!", entry); return 0; // Stack: (empty) } - auto key = UniqueObjectKey((Hooks::CreatureEvents)event_id, guid, instanceId); - bindingID = CreatureUniqueBindings->Insert(key, functionRef, shots); - createCancelCallback(this, bindingID, CreatureUniqueBindings); + auto key = EntryKey((Hooks::GameObjectEvents)event_id, entry); + bindingID = GameObjectEventBindings->Insert(key, functionRef, shots); + createCancelCallback(this, bindingID, GameObjectEventBindings); + return 1; // Stack: callback } - return 1; // Stack: callback - } - break; + break; - case Hooks::REGTYPE_CREATURE_GOSSIP: - if (event_id < Hooks::GOSSIP_EVENT_COUNT) - { - if (!eObjectMgr->GetCreatureTemplate(entry)) + case Hooks::REGTYPE_GAMEOBJECT_GOSSIP: + if (event_id < Hooks::GOSSIP_EVENT_COUNT) { - luaL_unref(L, LUA_REGISTRYINDEX, functionRef); - luaL_error(L, "Couldn't find a creature with (ID: %d)!", entry); - return 0; // Stack: (empty) - } + if (!eObjectMgr->GetGameObjectTemplate(entry)) + { + luaL_unref(L, LUA_REGISTRYINDEX, functionRef); + luaL_error(L, "Couldn't find a gameobject with (ID: %d)!", entry); + return 0; // Stack: (empty) + } - auto key = EntryKey((Hooks::GossipEvents)event_id, entry); - bindingID = CreatureGossipBindings->Insert(key, functionRef, shots); - createCancelCallback(this, bindingID, CreatureGossipBindings); - return 1; // Stack: callback - } - break; + auto key = EntryKey((Hooks::GossipEvents)event_id, entry); + bindingID = GameObjectGossipBindings->Insert(key, functionRef, shots); + createCancelCallback(this, bindingID, GameObjectGossipBindings); + return 1; // Stack: callback + } + break; - case Hooks::REGTYPE_GAMEOBJECT: - if (event_id < Hooks::GAMEOBJECT_EVENT_COUNT) - { - if (!eObjectMgr->GetGameObjectTemplate(entry)) + case Hooks::REGTYPE_ITEM: + if (event_id < Hooks::ITEM_EVENT_COUNT) { - luaL_unref(L, LUA_REGISTRYINDEX, functionRef); - luaL_error(L, "Couldn't find a gameobject with (ID: %d)!", entry); - return 0; // Stack: (empty) - } + if (!eObjectMgr->GetItemTemplate(entry)) + { + luaL_unref(L, LUA_REGISTRYINDEX, functionRef); + luaL_error(L, "Couldn't find a item with (ID: %d)!", entry); + return 0; // Stack: (empty) + } - auto key = EntryKey((Hooks::GameObjectEvents)event_id, entry); - bindingID = GameObjectEventBindings->Insert(key, functionRef, shots); - createCancelCallback(this, bindingID, GameObjectEventBindings); - return 1; // Stack: callback - } - break; + auto key = EntryKey((Hooks::ItemEvents)event_id, entry); + bindingID = ItemEventBindings->Insert(key, functionRef, shots); + createCancelCallback(this, bindingID, ItemEventBindings); + return 1; // Stack: callback + } + break; - case Hooks::REGTYPE_GAMEOBJECT_GOSSIP: - if (event_id < Hooks::GOSSIP_EVENT_COUNT) - { - if (!eObjectMgr->GetGameObjectTemplate(entry)) + case Hooks::REGTYPE_ITEM_GOSSIP: + if (event_id < Hooks::GOSSIP_EVENT_COUNT) { - luaL_unref(L, LUA_REGISTRYINDEX, functionRef); - luaL_error(L, "Couldn't find a gameobject with (ID: %d)!", entry); - return 0; // Stack: (empty) - } + if (!eObjectMgr->GetItemTemplate(entry)) + { + luaL_unref(L, LUA_REGISTRYINDEX, functionRef); + luaL_error(L, "Couldn't find a item with (ID: %d)!", entry); + return 0; // Stack: (empty) + } - auto key = EntryKey((Hooks::GossipEvents)event_id, entry); - bindingID = GameObjectGossipBindings->Insert(key, functionRef, shots); - createCancelCallback(this, bindingID, GameObjectGossipBindings); - return 1; // Stack: callback - } - break; + auto key = EntryKey((Hooks::GossipEvents)event_id, entry); + bindingID = ItemGossipBindings->Insert(key, functionRef, shots); + createCancelCallback(this, bindingID, ItemGossipBindings); + return 1; // Stack: callback + } + break; - case Hooks::REGTYPE_ITEM: - if (event_id < Hooks::ITEM_EVENT_COUNT) - { - if (!eObjectMgr->GetItemTemplate(entry)) + case Hooks::REGTYPE_PLAYER_GOSSIP: + if (event_id < Hooks::GOSSIP_EVENT_COUNT) { - luaL_unref(L, LUA_REGISTRYINDEX, functionRef); - luaL_error(L, "Couldn't find a item with (ID: %d)!", entry); - return 0; // Stack: (empty) + auto key = EntryKey((Hooks::GossipEvents)event_id, entry); + bindingID = PlayerGossipBindings->Insert(key, functionRef, shots); + createCancelCallback(this, bindingID, PlayerGossipBindings); + return 1; // Stack: callback } - - auto key = EntryKey((Hooks::ItemEvents)event_id, entry); - bindingID = ItemEventBindings->Insert(key, functionRef, shots); - createCancelCallback(this, bindingID, ItemEventBindings); - return 1; // Stack: callback - } - break; - - case Hooks::REGTYPE_ITEM_GOSSIP: - if (event_id < Hooks::GOSSIP_EVENT_COUNT) - { - if (!eObjectMgr->GetItemTemplate(entry)) + break; + case Hooks::REGTYPE_MAP: + if (event_id < Hooks::INSTANCE_EVENT_COUNT) { - luaL_unref(L, LUA_REGISTRYINDEX, functionRef); - luaL_error(L, "Couldn't find a item with (ID: %d)!", entry); - return 0; // Stack: (empty) + auto key = EntryKey((Hooks::InstanceEvents)event_id, entry); + bindingID = MapEventBindings->Insert(key, functionRef, shots); + createCancelCallback(this, bindingID, MapEventBindings); + return 1; // Stack: callback } - - auto key = EntryKey((Hooks::GossipEvents)event_id, entry); - bindingID = ItemGossipBindings->Insert(key, functionRef, shots); - createCancelCallback(this, bindingID, ItemGossipBindings); - return 1; // Stack: callback - } - break; - - case Hooks::REGTYPE_PLAYER_GOSSIP: - if (event_id < Hooks::GOSSIP_EVENT_COUNT) - { - auto key = EntryKey((Hooks::GossipEvents)event_id, entry); - bindingID = PlayerGossipBindings->Insert(key, functionRef, shots); - createCancelCallback(this, bindingID, PlayerGossipBindings); - return 1; // Stack: callback - } - break; - case Hooks::REGTYPE_MAP: - if (event_id < Hooks::INSTANCE_EVENT_COUNT) - { - auto key = EntryKey((Hooks::InstanceEvents)event_id, entry); - bindingID = MapEventBindings->Insert(key, functionRef, shots); - createCancelCallback(this, bindingID, MapEventBindings); - return 1; // Stack: callback - } - break; - case Hooks::REGTYPE_INSTANCE: - if (event_id < Hooks::INSTANCE_EVENT_COUNT) - { - auto key = EntryKey((Hooks::InstanceEvents)event_id, entry); - bindingID = InstanceEventBindings->Insert(key, functionRef, shots); - createCancelCallback(this, bindingID, InstanceEventBindings); - return 1; // Stack: callback - } - break; + break; + case Hooks::REGTYPE_INSTANCE: + if (event_id < Hooks::INSTANCE_EVENT_COUNT) + { + auto key = EntryKey((Hooks::InstanceEvents)event_id, entry); + bindingID = InstanceEventBindings->Insert(key, functionRef, shots); + createCancelCallback(this, bindingID, InstanceEventBindings); + return 1; // Stack: callback + } + break; } luaL_unref(L, LUA_REGISTRYINDEX, functionRef); std::ostringstream oss; @@ -1003,9 +1003,9 @@ int Eluna::CallOneFunction(int number_of_functions, int number_of_arguments, int ASSERT(number_of_functions > 0 && number_of_arguments > 0 && number_of_results >= 0); // Stack: event_id, [arguments], [functions] - int functions_top = lua_gettop(L); + int functions_top = lua_gettop(L); int first_function_index = functions_top - number_of_functions + 1; - int arguments_top = first_function_index - 1; + int arguments_top = first_function_index - 1; int first_argument_index = arguments_top - number_of_arguments + 1; // Copy the arguments from the bottom of the stack to the top. diff --git a/LuaEngine.h b/LuaEngine.h index b04fee3022..b86a697a2c 100644 --- a/LuaEngine.h +++ b/LuaEngine.h @@ -217,21 +217,21 @@ class ELUNA_GAME_API Eluna // Non-static pushes, to be used in hooks. // They up the pushed value counter for hook helper functions. - void HookPush() { Push(); ++push_counter; } - void HookPush(const long long value) { Push(value); ++push_counter; } - void HookPush(const unsigned long long value) { Push(value); ++push_counter; } - void HookPush(const long value) { Push(value); ++push_counter; } - void HookPush(const unsigned long value) { Push(value); ++push_counter; } - void HookPush(const int value) { Push(value); ++push_counter; } - void HookPush(const unsigned int value) { Push(value); ++push_counter; } - void HookPush(const bool value) { Push(value); ++push_counter; } - void HookPush(const float value) { Push(value); ++push_counter; } - void HookPush(const double value) { Push(value); ++push_counter; } - void HookPush(const std::string& value) { Push(value); ++push_counter; } - void HookPush(const char* value) { Push(value); ++push_counter; } - void HookPush(ObjectGuid const value) { Push(value); ++push_counter; } + void HookPush() { Push(); ++push_counter; } + void HookPush(const long long value) { Push(value); ++push_counter; } + void HookPush(const unsigned long long value) { Push(value); ++push_counter; } + void HookPush(const long value) { Push(value); ++push_counter; } + void HookPush(const unsigned long value) { Push(value); ++push_counter; } + void HookPush(const int value) { Push(value); ++push_counter; } + void HookPush(const unsigned int value) { Push(value); ++push_counter; } + void HookPush(const bool value) { Push(value); ++push_counter; } + void HookPush(const float value) { Push(value); ++push_counter; } + void HookPush(const double value) { Push(value); ++push_counter; } + void HookPush(const std::string& value) { Push(value); ++push_counter; } + void HookPush(const char* value) { Push(value); ++push_counter; } + void HookPush(ObjectGuid const value) { Push(value); ++push_counter; } template - void HookPush(T const* ptr) { Push(ptr); ++push_counter; } + void HookPush(T const* ptr) { Push(ptr); ++push_counter; } public: @@ -241,23 +241,23 @@ class ELUNA_GAME_API Eluna QueryCallbackProcessor queryProcessor; QueryCallbackProcessor& GetQueryProcessor() { return queryProcessor; } - BindingMap< EventKey >* ServerEventBindings; - BindingMap< EventKey >* PlayerEventBindings; - BindingMap< EventKey >* GuildEventBindings; - BindingMap< EventKey >* GroupEventBindings; - BindingMap< EventKey >* VehicleEventBindings; - BindingMap< EventKey >* BGEventBindings; - - BindingMap< EntryKey >* PacketEventBindings; - BindingMap< EntryKey >* CreatureEventBindings; - BindingMap< EntryKey >* CreatureGossipBindings; + BindingMap< EventKey >* ServerEventBindings; + BindingMap< EventKey >* PlayerEventBindings; + BindingMap< EventKey >* GuildEventBindings; + BindingMap< EventKey >* GroupEventBindings; + BindingMap< EventKey >* VehicleEventBindings; + BindingMap< EventKey >* BGEventBindings; + + BindingMap< EntryKey >* PacketEventBindings; + BindingMap< EntryKey >* CreatureEventBindings; + BindingMap< EntryKey >* CreatureGossipBindings; BindingMap< EntryKey >* GameObjectEventBindings; - BindingMap< EntryKey >* GameObjectGossipBindings; - BindingMap< EntryKey >* ItemEventBindings; - BindingMap< EntryKey >* ItemGossipBindings; - BindingMap< EntryKey >* PlayerGossipBindings; - BindingMap< EntryKey >* MapEventBindings; - BindingMap< EntryKey >* InstanceEventBindings; + BindingMap< EntryKey >* GameObjectGossipBindings; + BindingMap< EntryKey >* ItemEventBindings; + BindingMap< EntryKey >* ItemGossipBindings; + BindingMap< EntryKey >* PlayerGossipBindings; + BindingMap< EntryKey >* MapEventBindings; + BindingMap< EntryKey >* InstanceEventBindings; BindingMap< UniqueObjectKey >* CreatureUniqueBindings;