mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
Core/Chat: Always save channel info to database on shutdown if persistence is enabled.
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user