mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[6908] Faster setting online=0 at startup and semilar queries.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
35f54d365d
commit
a62801aee9
4 changed files with 4 additions and 4 deletions
|
|
@ -3137,7 +3137,7 @@ bool ChatHandler::HandleWpShowCommand(const char* args)
|
||||||
}
|
}
|
||||||
}while(result->NextRow());
|
}while(result->NextRow());
|
||||||
// set "wpguid" column to "empty" - no visual waypoint spawned
|
// set "wpguid" column to "empty" - no visual waypoint spawned
|
||||||
WorldDatabase.PExecuteLog("UPDATE creature_movement SET wpguid = '0'");
|
WorldDatabase.PExecuteLog("UPDATE creature_movement SET wpguid = '0' WHERE wpguid <> '0'");
|
||||||
|
|
||||||
if( hasError )
|
if( hasError )
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4564,7 +4564,7 @@ bool ChatHandler::HandleResetAllCommand(const char * args)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
CharacterDatabase.PExecute("UPDATE characters SET at_login = at_login | '%u'",atLogin);
|
CharacterDatabase.PExecute("UPDATE characters SET at_login = at_login | '%u' WHERE (at_login & '%u') = '0'",atLogin,atLogin);
|
||||||
HashMapHolder<Player>::MapType const& plist = ObjectAccessor::Instance().GetPlayers();
|
HashMapHolder<Player>::MapType const& plist = ObjectAccessor::Instance().GetPlayers();
|
||||||
for(HashMapHolder<Player>::MapType::const_iterator itr = plist.begin(); itr != plist.end(); ++itr)
|
for(HashMapHolder<Player>::MapType::const_iterator itr = plist.begin(); itr != plist.end(); ++itr)
|
||||||
itr->second->SetAtLoginFlag(atLogin);
|
itr->second->SetAtLoginFlag(atLogin);
|
||||||
|
|
|
||||||
|
|
@ -459,7 +459,7 @@ void Master::clearOnlineAccounts()
|
||||||
"AND id IN (SELECT acctid FROM realmcharacters WHERE realmid = '%d')",realmID);
|
"AND id IN (SELECT acctid FROM realmcharacters WHERE realmid = '%d')",realmID);
|
||||||
|
|
||||||
|
|
||||||
CharacterDatabase.Execute("UPDATE characters SET online = 0");
|
CharacterDatabase.Execute("UPDATE characters SET online = 0 WHERE online<>0");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Handle termination signals
|
/// Handle termination signals
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "6907"
|
#define REVISION_NR "6908"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue