Eluna::~Eluna() { OnLuaStateClose(); // Replace this with map remove if making multithread version Eluna::GEluna = NULL; delete m_EventMgr; delete ServerEventBindings; delete PlayerEventBindings; delete GuildEventBindings; delete GroupEventBindings; delete VehicleEventBindings; delete PacketEventBindings; delete CreatureEventBindings; delete CreatureGossipBindings; delete GameObjectEventBindings; delete GameObjectGossipBindings; delete ItemEventBindings; delete ItemGossipBindings; delete playerGossipBindings; // Must close lua state after deleting stores and mgr lua_close(L); }
void Eluna::CloseLua() { OnLuaStateClose(); DestroyBindStores(); // Must close lua state after deleting stores and mgr if (L) lua_close(L); L = NULL; }
void Eluna::CloseLua() { OnLuaStateClose(); DestroyBindStores(); // Must close lua state after deleting stores and mgr if (L) lua_close(L); L = NULL; instanceDataRefs.clear(); continentDataRefs.clear(); }