Added new hook for post reload

This commit is contained in:
Foereaper
2014-09-10 01:28:52 +02:00
parent b6663ba2d1
commit 7be917335a
4 changed files with 14 additions and 3 deletions

View File

@@ -116,6 +116,13 @@ void Eluna::OnLuaStateClose()
ENDCALL();
}
void Eluna::OnLuaStateOpen()
{
EVENT_BEGIN(ServerEventBindings, ELUNA_EVENT_ON_LUA_STATE_OPEN, return);
EVENT_EXECUTE(0);
ENDCALL();
}
// areatrigger
bool Eluna::OnAreaTrigger(Player* pPlayer, AreaTriggerEntry const* pTrigger)
{

View File

@@ -49,10 +49,10 @@ namespace HookMgr
SERVER_EVENT_ON_PACKET_RECEIVE_UNKNOWN = 6, // Not Implemented
SERVER_EVENT_ON_PACKET_SEND = 7, // (event, packet, player) - Player only if accessible. Can return false or a new packet
// World // Not implemented on mangos
WORLD_EVENT_ON_OPEN_STATE_CHANGE = 8, // (event, open)
// World
WORLD_EVENT_ON_OPEN_STATE_CHANGE = 8, // (event, open) - Needs core support on Mangos
WORLD_EVENT_ON_CONFIG_LOAD = 9, // (event, reload)
// UNUSED = 10, // (event)
// UNUSED = 10,
WORLD_EVENT_ON_SHUTDOWN_INIT = 11, // (event, code, mask)
WORLD_EVENT_ON_SHUTDOWN_CANCEL = 12, // (event)
WORLD_EVENT_ON_UPDATE = 13, // (event, diff)
@@ -61,6 +61,7 @@ namespace HookMgr
// Eluna
ELUNA_EVENT_ON_LUA_STATE_CLOSE = 16, // (event)
ELUNA_EVENT_ON_LUA_STATE_OPEN = 33, // (event) - Possibly change hook ID for increments? Not implemented on TC/Cmangos
// Map
MAP_EVENT_ON_CREATE = 17, // (event, map)

View File

@@ -124,6 +124,8 @@ playerGossipBindings(new EntryBind<HookMgr::GossipEvents>("GossipEvents (player)
// run scripts
RunScripts();
OnLuaStateOpen();
}
Eluna::~Eluna()

View File

@@ -194,6 +194,7 @@ public:
void OnQuestAbandon(Player* pPlayer, uint32 questId);
InventoryResult OnCanUseItem(const Player* pPlayer, uint32 itemEntry);
void OnLuaStateClose();
void OnLuaStateOpen();
bool OnAddonMessage(Player* sender, uint32 type, std::string& msg, Player* receiver, Guild* guild, Group* group, Channel* channel);
/* Item */