Fix for event register in previous hook

This commit is contained in:
Foereaper
2014-09-10 22:40:53 +02:00
parent 0bfdf632e7
commit 29385c63b1

View File

@@ -775,13 +775,6 @@ void Eluna::Register(uint8 regtype, uint32 id, uint32 evt, int functionRef)
case HookMgr::REGTYPE_BG:
if (evt < HookMgr::BG_EVENT_COUNT)
{
if (!BattleGroundTypeId(id))
{
luaL_unref(L, LUA_REGISTRYINDEX, functionRef);
luaL_error(L, "Couldn't find battleground with type (ID: %d)!", id);
return;
}
BGEventBindings->Insert(id, evt, functionRef);
return;
}