131 QueryResult result =
CharacterDatabase.
Query(
"SELECT g.leaderGuid, g.lootMethod, g.looterGuid, g.lootThreshold, g.icon1, g.icon2, g.icon3, g.icon4, g.icon5, g.icon6"
133 ", g.icon7, g.icon8, g.groupType, g.difficulty, g.raiddifficulty, g.legacyRaidDifficulty, g.masterLooterGuid, g.guid, lfg.dungeon, lfg.state FROM groups g LEFT JOIN lfg_data lfg ON lfg.guid = g.guid ORDER BY g.guid ASC");
136 TC_LOG_INFO(
"server.loading",
">> Loaded 0 group definitions. DB table `groups` is empty!");
143 Field* fields = result->Fetch();
159 while (result->NextRow());
164 TC_LOG_INFO(
"server.loading",
"Loading Group members...");
178 TC_LOG_INFO(
"server.loading",
">> Loaded 0 group members. DB table `group_member` is empty!");
186 Field* fields = result->Fetch();
190 group->
LoadMemberFromDB(fields[1].GetUInt64(), fields[2].GetUInt8(), fields[3].GetUInt8(), fields[4].GetUInt8());
192 TC_LOG_ERROR(
"misc",
"GroupMgr::LoadGroups: Consistency failed, can't find group (storage id: %u)", fields[0].GetUInt32());
196 while (result->NextRow());
201 TC_LOG_INFO(
"server.loading",
"Loading Group instance saves...");
206 "FROM group_instance gi INNER JOIN instance i ON gi.instance = i.id "
207 "LEFT JOIN character_instance ci LEFT JOIN groups g ON g.leaderGuid = ci.guid ON ci.instance = gi.instance AND ci.permanent = 1 GROUP BY gi.instance ORDER BY gi.guid");
210 TC_LOG_INFO(
"server.loading",
">> Loaded 0 group-instance saves. DB table `group_instance` is empty!");
217 Field* fields = result->Fetch();
224 TC_LOG_ERROR(
"sql.sql",
"Incorrect entry in group_instance table : no dungeon map %d", fields[1].GetUInt16());
237 while (result->NextRow());
Difficulty
Definition: DBCEnums.h:402
uint64 GetUInt64() const
Definition: Field.h:184
InstanceGroupBind * BindToInstance(InstanceSave *save, bool permanent, bool load=false)
Definition: Group.cpp:2224
void AddGroup(Group *group)
Definition: GroupMgr.cpp:110
Class used to access individual fields of database query result.
Definition: Field.h:56
uint32 getMSTime()
Definition: Timer.h:24
Definition: DBCStructure.h:830
void LoadMemberFromDB(ObjectGuid::LowType guidLow, uint8 memberFlags, uint8 subgroup, uint8 roles)
Definition: Group.cpp:201
uint8 GetUInt8() const
Definition: Field.h:70
uint32 InstanceType
Definition: DBCStructure.h:834
uint32 NextGroupDbStoreId
Definition: GroupMgr.h:54
Group * GetGroupByDbStoreId(uint32 storageId) const
Definition: GroupMgr.cpp:77
uint32_t uint32
Definition: Define.h:150
uint32 InstanceType
Definition: DBCStructure.h:342
std::shared_ptr< ResultSet > QueryResult
Definition: QueryResult.h:61
static Summons Group[]
Definition: boss_urom.cpp:77
bool IsDungeon() const
Definition: DBCStructure.h:857
uint32 ID
Definition: DBCStructure.h:832
uint32 GetDbStoreId() const
Definition: Group.h:278
Definition: InstanceSaveMgr.h:44
#define sInstanceSaveMgr
Definition: InstanceSaveMgr.h:243
uint32 GetMSTimeDiffToNow(uint32 oldMSTime)
Definition: Timer.h:42
QueryResult Query(const char *sql, T *connection=nullptr)
Definition: DatabaseWorkerPool.cpp:113
DBCStorage< MapEntry > sMapStore(Mapfmt)
uint32 GetUInt32() const
Definition: Field.h:146
void RegisterGroupDbStoreId(uint32 storageId, Group *group)
Definition: GroupMgr.cpp:58
CharacterDatabaseWorkerPool CharacterDatabase
Accessor to the character database.
Definition: DatabaseEnv.cpp:21
#define TC_LOG_INFO(filterType__,...)
Definition: Log.h:201
#define TC_LOG_ERROR(filterType__,...)
Definition: Log.h:207
void DirectExecute(const char *sql)
Definition: DatabaseWorkerPool.h:121
DBCStorage< DifficultyEntry > sDifficultyStore(DifficultyFmt)
void LoadGroupFromDB(Field *field)
Definition: Group.cpp:170
Definition: DBCStructure.h:338