diff options
author | Krudor <erikstrandberg93@hotmail.com> | 2016-07-16 14:58:33 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2016-07-16 14:58:33 +0200 |
commit | 649e3a9ac59a1d24eeec3419138d0d5f11dee566 (patch) | |
tree | 94834378e61389199ec5e734f34a02097e80d911 /src/server/game/Groups/GroupMgr.cpp | |
parent | e2d6c362f2c80346c464f053ad20b773f9e31863 (diff) |
Core/Instances: Add functionality for modifying instance entrance locations
Instances have since MoP (Possibly even Cataclysm) been able to set new locations for players when they zone into the instance.
A theoretic example of this could be after a certain boss has been defeated, a new entrance location is set to bring players entering the instance closer to the relevant content.
A real example would be Siege of Orgrimmar changing entrance locations many times as the raid progresses.
Added SetEntranceLocation for setting entrance locations that will be saved to DB the next time the instance is saved, and SetTemporaryEntranceLocation for when you don't want the value to be saved to the database.
Closes #17167
Diffstat (limited to 'src/server/game/Groups/GroupMgr.cpp')
-rw-r--r-- | src/server/game/Groups/GroupMgr.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/game/Groups/GroupMgr.cpp b/src/server/game/Groups/GroupMgr.cpp index c6046c3a9aa..dce3102fe3e 100644 --- a/src/server/game/Groups/GroupMgr.cpp +++ b/src/server/game/Groups/GroupMgr.cpp @@ -201,8 +201,8 @@ void GroupMgr::LoadGroups() 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, COUNT(g.guid) " + // 0 1 2 3 4 5 6 7 + QueryResult result = CharacterDatabase.Query("SELECT gi.guid, i.map, gi.instance, gi.permanent, i.difficulty, i.resettime, i.entranceId, COUNT(g.guid) " "FROM group_instance gi INNER JOIN instance i ON gi.instance = i.id " "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"); if (!result) @@ -230,7 +230,7 @@ void GroupMgr::LoadGroups() if (!difficultyEntry || difficultyEntry->InstanceType != mapEntry->InstanceType) continue; - InstanceSave* save = sInstanceSaveMgr->AddInstanceSave(mapEntry->ID, fields[2].GetUInt32(), Difficulty(diff), time_t(fields[5].GetUInt32()), fields[6].GetUInt64() != 0, true); + InstanceSave* save = sInstanceSaveMgr->AddInstanceSave(mapEntry->ID, fields[2].GetUInt32(), Difficulty(diff), time_t(fields[5].GetUInt32()), fields[6].GetUInt32(), fields[7].GetUInt64() != 0, true); group->BindToInstance(save, fields[3].GetBool(), true); ++count; } |