diff options
author | Shauren <shauren.trinity@gmail.com> | 2020-01-02 14:19:35 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2022-10-04 00:19:38 +0200 |
commit | 9b924522d0549dd67b10e2cbdfc20297dd21e182 (patch) | |
tree | f0fcdf96902b7c497c1bc65db83621a8dfadf43a /src/server/game/Groups/GroupMgr.cpp | |
parent | a131542855d23022714a97640be1c8d68a741c31 (diff) |
Core/Instances: Delete InstanceSaveMgr and replace most of its uses with new InstanceLockMgr
Diffstat (limited to 'src/server/game/Groups/GroupMgr.cpp')
-rw-r--r-- | src/server/game/Groups/GroupMgr.cpp | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/src/server/game/Groups/GroupMgr.cpp b/src/server/game/Groups/GroupMgr.cpp index c8ed49365ad..69fbe8e4d21 100644 --- a/src/server/game/Groups/GroupMgr.cpp +++ b/src/server/game/Groups/GroupMgr.cpp @@ -18,9 +18,7 @@ #include "GroupMgr.h" #include "Common.h" #include "DatabaseEnv.h" -#include "DB2Stores.h" #include "Group.h" -#include "InstanceSaveMgr.h" #include "Log.h" #include "World.h" @@ -205,49 +203,4 @@ void GroupMgr::LoadGroups() TC_LOG_INFO("server.loading", ">> Loaded %u group members in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } - - TC_LOG_INFO("server.loading", "Loading Group instance saves..."); - { - uint32 oldMSTime = getMSTime(); - - // 0 1 2 3 4 5 6 - QueryResult result = CharacterDatabase.Query("SELECT gi.guid, i.map, gi.instance, gi.permanent, i.difficulty, i.resettime, i.entranceId, " - // 7 - "(SELECT COUNT(1) FROM character_instance ci LEFT JOIN `groups` g ON ci.guid = g.leaderGuid WHERE ci.instance = gi.instance AND ci.permanent = 1 LIMIT 1) " - "FROM group_instance gi LEFT JOIN instance i ON gi.instance = i.id ORDER BY guid"); - - if (!result) - { - TC_LOG_INFO("server.loading", ">> Loaded 0 group-instance saves. DB table `group_instance` is empty!"); - return; - } - - uint32 count = 0; - do - { - Field* fields = result->Fetch(); - Group* group = GetGroupByDbStoreId(fields[0].GetUInt32()); - // group will never be NULL (we have run consistency sql's before loading) - ASSERT(group); - - MapEntry const* mapEntry = sMapStore.LookupEntry(fields[1].GetUInt16()); - if (!mapEntry || !mapEntry->IsDungeon()) - { - TC_LOG_ERROR("sql.sql", "Incorrect entry in group_instance table : no dungeon map %d", fields[1].GetUInt16()); - continue; - } - - uint32 diff = fields[4].GetUInt8(); - DifficultyEntry const* difficultyEntry = sDifficultyStore.LookupEntry(diff); - if (!difficultyEntry || difficultyEntry->InstanceType != mapEntry->InstanceType) - continue; - - InstanceSave* save = sInstanceSaveMgr->AddInstanceSave(mapEntry->ID, fields[2].GetUInt32(), Difficulty(diff), fields[5].GetInt64(), fields[6].GetUInt32(), fields[7].GetUInt64() == 0, true); - group->BindToInstance(save, fields[3].GetBool(), true); - ++count; - } - while (result->NextRow()); - - TC_LOG_INFO("server.loading", ">> Loaded %u group-instance saves in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } } |