void ScriptMgr::Unload() { #define SCR_CLEAR(T) \ for (SCR_REG_ITR(T) itr = SCR_REG_LST(T).begin(); itr != SCR_REG_LST(T).end(); ++itr) \ delete itr->second; \ SCR_REG_LST(T).clear(); // Clear scripts for every script type. SCR_CLEAR(SpellScriptLoader); SCR_CLEAR(ServerScript); SCR_CLEAR(WorldScript); SCR_CLEAR(FormulaScript); SCR_CLEAR(WorldMapScript); SCR_CLEAR(InstanceMapScript); SCR_CLEAR(BattlegroundMapScript); SCR_CLEAR(ItemScript); SCR_CLEAR(CreatureScript); SCR_CLEAR(GameObjectScript); SCR_CLEAR(AreaTriggerScript); SCR_CLEAR(BattlegroundScript); SCR_CLEAR(OutdoorPvPScript); SCR_CLEAR(CommandScript); SCR_CLEAR(WeatherScript); SCR_CLEAR(AuctionHouseScript); SCR_CLEAR(ConditionScript); SCR_CLEAR(VehicleScript); SCR_CLEAR(DynamicObjectScript); SCR_CLEAR(TransportScript); SCR_CLEAR(AchievementCriteriaScript); SCR_CLEAR(PlayerScript); SCR_CLEAR(AccountScript); SCR_CLEAR(GuildScript); SCR_CLEAR(GroupScript); SCR_CLEAR(UnitScript); #undef SCR_CLEAR for (ExampleScriptContainer::iterator itr = ExampleScripts.begin(); itr != ExampleScripts.end(); ++itr) delete *itr; ExampleScripts.clear(); delete[] SpellSummary; delete[] UnitAI::AISpellInfo; }
void ScriptMgr::Unload() { #define SCR_CLEAR(T) \ FOR_SCRIPTS(T, itr, end) \ delete itr->second; \ SCR_REG_LST(T).clear(); // Clear scripts for every script type. SCR_CLEAR(SpellScriptLoader); SCR_CLEAR(ServerScript); SCR_CLEAR(WorldScript); SCR_CLEAR(FormulaScript); SCR_CLEAR(WorldMapScript); SCR_CLEAR(InstanceMapScript); SCR_CLEAR(BattlegroundMapScript); SCR_CLEAR(ItemScript); SCR_CLEAR(CreatureScript); SCR_CLEAR(GameObjectScript); SCR_CLEAR(AreaTriggerScript); SCR_CLEAR(BattlegroundScript); SCR_CLEAR(OutdoorPvPScript); SCR_CLEAR(CommandScript); SCR_CLEAR(WeatherScript); SCR_CLEAR(AuctionHouseScript); SCR_CLEAR(ConditionScript); SCR_CLEAR(VehicleScript); SCR_CLEAR(DynamicObjectScript); SCR_CLEAR(TransportScript); SCR_CLEAR(AchievementCriteriaScript); SCR_CLEAR(PlayerScript); SCR_CLEAR(GuildScript); SCR_CLEAR(GroupScript); #undef SCR_CLEAR }
void ScriptMgr::Unload() { #define SCR_CLEAR(T) \ for (SCR_REG_ITR(T) itr = SCR_REG_LST(T).begin(); itr != SCR_REG_LST(T).end(); ++itr) \ delete itr->second; \ SCR_REG_LST(T).clear(); // Clear scripts for every script type. SCR_CLEAR(SpellScriptLoader); SCR_CLEAR(ServerScript); SCR_CLEAR(WorldScript); SCR_CLEAR(FormulaScript); SCR_CLEAR(WorldMapScript); SCR_CLEAR(InstanceMapScript); SCR_CLEAR(BattlegroundMapScript); SCR_CLEAR(ItemScript); SCR_CLEAR(CreatureScript); SCR_CLEAR(GameObjectScript); SCR_CLEAR(AreaTriggerScript); SCR_CLEAR(BattlegroundScript); SCR_CLEAR(OutdoorPvPScript); SCR_CLEAR(CommandScript); SCR_CLEAR(WeatherScript); SCR_CLEAR(AuctionHouseScript); SCR_CLEAR(ConditionScript); SCR_CLEAR(DynamicObjectScript); SCR_CLEAR(TransportScript); SCR_CLEAR(PlayerScript); SCR_CLEAR(GuildScript); SCR_CLEAR(GroupScript); #undef SCR_CLEAR }