Core/Chat: Always save channel info to database on shutdown if persistence is enabled.

This commit is contained in:
Treeston
2019-08-04 02:19:34 +02:00
parent 4a219eda07
commit 2d74652b5b
2 changed files with 3 additions and 3 deletions

View File

@@ -62,7 +62,7 @@ ChannelMgr::~ChannelMgr()
do
{
Field* fields = result->Fetch();
std::string dbName = fields[0].GetString(); // may be different - channel names are case insensitive
std::string dbName = fields[0].GetString();
uint32 team = fields[1].GetUInt32();
bool dbAnnounce = fields[2].GetBool();
bool dbOwnership = fields[3].GetBool();

View File

@@ -2283,7 +2283,7 @@ void World::Update(uint32 diff)
sWhoListStorageMgr->Update();
}
if (m_timers[WUPDATE_CHANNEL_SAVE].Passed())
if (IsStopped() || m_timers[WUPDATE_CHANNEL_SAVE].Passed())
{
m_timers[WUPDATE_CHANNEL_SAVE].Reset();
@@ -2963,7 +2963,7 @@ void World::ShutdownMsg(bool show, Player* player, const std::string& reason)
/// Cancel a planned server shutdown
uint32 World::ShutdownCancel()
{
// nothing cancel or too later
// nothing cancel or too late
if (!m_ShutdownTimer || m_stopEvent)
return 0;