mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[7248] Check battlemaster_entry data at loading. Code cleanups.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
6b381f2d0e
commit
c5f20ff9a9
9 changed files with 55 additions and 48 deletions
|
|
@ -265,7 +265,7 @@ void InstanceSaveManager::CleanupInstances()
|
|||
|
||||
// creature_respawn and gameobject_respawn are in another database
|
||||
// first, obtain total instance set
|
||||
std::set< uint32 > InstanceSet;
|
||||
std::set<uint32> InstanceSet;
|
||||
QueryResult *result = CharacterDatabase.Query("SELECT id FROM instance");
|
||||
if( result )
|
||||
{
|
||||
|
|
@ -317,7 +317,7 @@ void InstanceSaveManager::PackInstances()
|
|||
// TODO: this can be done a LOT more efficiently
|
||||
|
||||
// obtain set of all associations
|
||||
std::set< uint32 > InstanceSet;
|
||||
std::set<uint32> InstanceSet;
|
||||
|
||||
// all valid ids are in the instance table
|
||||
// any associations to ids not in this table are assumed to be
|
||||
|
|
@ -339,7 +339,7 @@ void InstanceSaveManager::PackInstances()
|
|||
|
||||
uint32 InstanceNumber = 1;
|
||||
// we do assume std::set is sorted properly on integer value
|
||||
for (std::set< uint32 >::iterator i = InstanceSet.begin(); i != InstanceSet.end(); ++i)
|
||||
for (std::set<uint32>::iterator i = InstanceSet.begin(); i != InstanceSet.end(); ++i)
|
||||
{
|
||||
if (*i != InstanceNumber)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue