Fix crash on shutdown after last DF changes

This commit is contained in:
Spp
2012-10-19 21:35:51 +02:00
parent 67a03027ae
commit 0c909b2aed
2 changed files with 9 additions and 11 deletions

View File

@@ -31,17 +31,20 @@
#include "GroupMgr.h"
#include "GameEventMgr.h"
LFGMgr::LFGMgr(): m_QueueTimer(0), m_lfgProposalId(1),
m_options(sWorld->getBoolConfig(CONFIG_DUNGEON_FINDER_ENABLE)),
m_lfgPlayerScript(new LFGPlayerScript()), m_lfgGroupScript(new LFGGroupScript())
{ }
LFGMgr::LFGMgr(): m_QueueTimer(0), m_lfgProposalId(1)
{
m_options = sWorld->getBoolConfig(CONFIG_DUNGEON_FINDER_ENABLE);
if (m_options)
{
new LFGPlayerScript();
new LFGGroupScript();
}
}
LFGMgr::~LFGMgr()
{
for (LfgRewardMap::iterator itr = m_RewardMap.begin(); itr != m_RewardMap.end(); ++itr)
delete itr->second;
delete m_lfgPlayerScript;
delete m_lfgGroupScript;
}
void LFGMgr::_LoadFromDB(Field* fields, uint64 guid)

View File

@@ -25,8 +25,6 @@
#include "LFGGroupData.h"
#include "LFGPlayerData.h"
class LFGPlayerScript;
class LFGGroupScript;
class Group;
class Player;
@@ -406,9 +404,6 @@ class LFGMgr
LfgPlayerDataMap m_Players; ///< Player data
LfgGroupDataMap m_Groups; ///< Group data
LfgGuidList m_teleport; ///< Players being teleported
LFGPlayerScript *m_lfgPlayerScript;
LFGGroupScript *m_lfgGroupScript;
};
#define sLFGMgr ACE_Singleton<LFGMgr, ACE_Null_Mutex>::instance()