/*
* Copyright (C) 2010 - 2014 Eluna Lua Engine
* This program is free software licensed under GPL version 3
* Please see the included DOCS/LICENSE.md for more information
*/
extern "C"
{
#include "lua.h"
};
// Eluna
#include "LuaEngine.h"
#include "ElunaEventMgr.h"
#include "ElunaIncludes.h"
#include "ElunaTemplate.h"
#include "ElunaUtility.h"
// Method includes
#include "GlobalMethods.h"
#include "ObjectMethods.h"
#include "WorldObjectMethods.h"
#include "UnitMethods.h"
#include "PlayerMethods.h"
#include "CreatureMethods.h"
#include "GroupMethods.h"
#include "GuildMethods.h"
#include "GameObjectMethods.h"
#include "ElunaQueryMethods.h"
#include "AuraMethods.h"
#include "ItemMethods.h"
#include "WorldPacketMethods.h"
#include "SpellMethods.h"
#include "QuestMethods.h"
#include "MapMethods.h"
#include "CorpseMethods.h"
#include "WeatherMethods.h"
#include "VehicleMethods.h"
#include "BattleGroundMethods.h"
void RegisterGlobals(lua_State* L)
{
// Hooks
lua_register(L, "RegisterPacketEvent", &LuaGlobalFunctions::RegisterPacketEvent); // RegisterPacketEvent(opcodeID, event, function)
lua_register(L, "RegisterServerEvent", &LuaGlobalFunctions::RegisterServerEvent); // RegisterServerEvent(event, function)
lua_register(L, "RegisterPlayerEvent", &LuaGlobalFunctions::RegisterPlayerEvent); // RegisterPlayerEvent(event, function)
lua_register(L, "RegisterGuildEvent", &LuaGlobalFunctions::RegisterGuildEvent); // RegisterGuildEvent(event, function)
lua_register(L, "RegisterGroupEvent", &LuaGlobalFunctions::RegisterGroupEvent); // RegisterGroupEvent(event, function)
lua_register(L, "RegisterCreatureEvent", &LuaGlobalFunctions::RegisterCreatureEvent); // RegisterCreatureEvent(entry, event, function)
lua_register(L, "RegisterCreatureGossipEvent", &LuaGlobalFunctions::RegisterCreatureGossipEvent); // RegisterCreatureGossipEvent(entry, event, function)
lua_register(L, "RegisterGameObjectEvent", &LuaGlobalFunctions::RegisterGameObjectEvent); // RegisterGameObjectEvent(entry, event, function)
lua_register(L, "RegisterGameObjectGossipEvent", &LuaGlobalFunctions::RegisterGameObjectGossipEvent); // RegisterGameObjectGossipEvent(entry, event, function)
lua_register(L, "RegisterItemEvent", &LuaGlobalFunctions::RegisterItemEvent); // RegisterItemEvent(entry, event, function)
lua_register(L, "RegisterItemGossipEvent", &LuaGlobalFunctions::RegisterItemGossipEvent); // RegisterItemGossipEvent(entry, event, function)
lua_register(L, "RegisterPlayerGossipEvent", &LuaGlobalFunctions::RegisterPlayerGossipEvent); // RegisterPlayerGossipEvent(menu_id, event, function)
lua_register(L, "RegisterBGEvent", &LuaGlobalFunctions::RegisterBGEvent); // RegisterBGEvent(event, function)
// Getters
lua_register(L, "GetLuaEngine", &LuaGlobalFunctions::GetLuaEngine);
lua_register(L, "GetCoreName", &LuaGlobalFunctions::GetCoreName);
lua_register(L, "GetCoreVersion", &LuaGlobalFunctions::GetCoreVersion);
lua_register(L, "GetCoreExpansion", &LuaGlobalFunctions::GetCoreExpansion);
lua_register(L, "GetQuest", &LuaGlobalFunctions::GetQuest);
lua_register(L, "GetPlayerByGUID", &LuaGlobalFunctions::GetPlayerByGUID);
lua_register(L, "GetPlayerByName", &LuaGlobalFunctions::GetPlayerByName);
lua_register(L, "GetGameTime", &LuaGlobalFunctions::GetGameTime);
lua_register(L, "GetPlayersInWorld", &LuaGlobalFunctions::GetPlayersInWorld);
lua_register(L, "GetPlayersInMap", &LuaGlobalFunctions::GetPlayersInMap);
lua_register(L, "GetGuildByName", &LuaGlobalFunctions::GetGuildByName);
lua_register(L, "GetGuildByLeaderGUID", &LuaGlobalFunctions::GetGuildByLeaderGUID);
lua_register(L, "GetPlayerCount", &LuaGlobalFunctions::GetPlayerCount);
lua_register(L, "GetPlayerGUID", &LuaGlobalFunctions::GetPlayerGUID);
lua_register(L, "GetItemGUID", &LuaGlobalFunctions::GetItemGUID);
lua_register(L, "GetObjectGUID", &LuaGlobalFunctions::GetObjectGUID);
lua_register(L, "GetUnitGUID", &LuaGlobalFunctions::GetUnitGUID);
lua_register(L, "GetGUIDLow", &LuaGlobalFunctions::GetGUIDLow);
lua_register(L, "GetGUIDType", &LuaGlobalFunctions::GetGUIDType);
lua_register(L, "GetGUIDEntry", &LuaGlobalFunctions::GetGUIDEntry);
lua_register(L, "GetAreaName", &LuaGlobalFunctions::GetAreaName);
lua_register(L, "bit_not", &LuaGlobalFunctions::bit_not);
lua_register(L, "bit_xor", &LuaGlobalFunctions::bit_xor);
lua_register(L, "bit_rshift", &LuaGlobalFunctions::bit_rshift);
lua_register(L, "bit_lshift", &LuaGlobalFunctions::bit_lshift);
lua_register(L, "bit_or", &LuaGlobalFunctions::bit_or);
lua_register(L, "bit_and", &LuaGlobalFunctions::bit_and);
lua_register(L, "GetItemLink", &LuaGlobalFunctions::GetItemLink);
lua_register(L, "GetMapById", &LuaGlobalFunctions::GetMapById);
// Boolean
lua_register(L, "IsInventoryPos", &LuaGlobalFunctions::IsInventoryPos);
lua_register(L, "IsEquipmentPos", &LuaGlobalFunctions::IsEquipmentPos);
lua_register(L, "IsBankPos", &LuaGlobalFunctions::IsBankPos);
lua_register(L, "IsBagPos", &LuaGlobalFunctions::IsBagPos);
// Other
lua_register(L, "ReloadEluna", &LuaGlobalFunctions::ReloadEluna);
lua_register(L, "SendWorldMessage", &LuaGlobalFunctions::SendWorldMessage);
lua_register(L, "WorldDBQuery", &LuaGlobalFunctions::WorldDBQuery);
lua_register(L, "WorldDBExecute", &LuaGlobalFunctions::WorldDBExecute);
lua_register(L, "CharDBQuery", &LuaGlobalFunctions::CharDBQuery);
lua_register(L, "CharDBExecute", &LuaGlobalFunctions::CharDBExecute);
lua_register(L, "AuthDBQuery", &LuaGlobalFunctions::AuthDBQuery);
lua_register(L, "AuthDBExecute", &LuaGlobalFunctions::AuthDBExecute);
lua_register(L, "CreateLuaEvent", &LuaGlobalFunctions::CreateLuaEvent);
lua_register(L, "RemoveEventById", &LuaGlobalFunctions::RemoveEventById);
lua_register(L, "RemoveEvents", &LuaGlobalFunctions::RemoveEvents);
lua_register(L, "PerformIngameSpawn", &LuaGlobalFunctions::PerformIngameSpawn);
lua_register(L, "CreatePacket", &LuaGlobalFunctions::CreatePacket);
lua_register(L, "AddVendorItem", &LuaGlobalFunctions::AddVendorItem);
lua_register(L, "VendorRemoveItem", &LuaGlobalFunctions::VendorRemoveItem);
lua_register(L, "VendorRemoveAllItems", &LuaGlobalFunctions::VendorRemoveAllItems);
lua_register(L, "Kick", &LuaGlobalFunctions::Kick);
lua_register(L, "Ban", &LuaGlobalFunctions::Ban);
lua_register(L, "SaveAllPlayers", &LuaGlobalFunctions::SaveAllPlayers);
lua_register(L, "SendMail", &LuaGlobalFunctions::SendMail);
lua_register(L, "AddTaxiPath", &LuaGlobalFunctions::AddTaxiPath);
lua_register(L, "AddCorpse", &LuaGlobalFunctions::AddCorpse);
lua_register(L, "RemoveCorpse", &LuaGlobalFunctions::RemoveCorpse);
lua_register(L, "ConvertCorpseForPlayer", &LuaGlobalFunctions::ConvertCorpseForPlayer);
lua_register(L, "RemoveOldCorpses", &LuaGlobalFunctions::RemoveOldCorpses);
lua_register(L, "FindWeather", &LuaGlobalFunctions::FindWeather);
lua_register(L, "AddWeather", &LuaGlobalFunctions::AddWeather);
lua_register(L, "RemoveWeather", &LuaGlobalFunctions::RemoveWeather);
lua_register(L, "SendFineWeatherToPlayer", &LuaGlobalFunctions::SendFineWeatherToPlayer);
}
ElunaRegister