diff options
author | Shauren <shauren.trinity@gmail.com> | 2018-09-15 17:55:26 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2018-09-15 17:55:26 +0200 |
commit | 738f37d3cf45d4e10eda9d44a4cb17079b7bbc1b (patch) | |
tree | 9db45160ed8a0c68090dec2aebb9b73c9f2ea335 /src/server/game/Handlers/CalendarHandler.cpp | |
parent | 0f3156d324ff8134171bada01b40f5c23f5c43cc (diff) |
Core/Maps: Replaced spawnmask with difficulty list
Diffstat (limited to 'src/server/game/Handlers/CalendarHandler.cpp')
-rw-r--r-- | src/server/game/Handlers/CalendarHandler.cpp | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/src/server/game/Handlers/CalendarHandler.cpp b/src/server/game/Handlers/CalendarHandler.cpp index 5ce188e9b20..bf9ddd12b7b 100644 --- a/src/server/game/Handlers/CalendarHandler.cpp +++ b/src/server/game/Handlers/CalendarHandler.cpp @@ -92,20 +92,23 @@ void WorldSession::HandleCalendarGetCalendar(WorldPackets::Calendar::CalendarGet for (uint8 i = 0; i < MAX_DIFFICULTY; ++i) { - Player::BoundInstancesMap boundInstances = _player->GetBoundInstances(Difficulty(i)); - for (auto const& boundInstance : boundInstances) + auto boundInstances = _player->GetBoundInstances(Difficulty(i)); + if (boundInstances != _player->m_boundInstances.end()) { - if (boundInstance.second.perm) + for (auto const& boundInstance : boundInstances->second) { - WorldPackets::Calendar::CalendarSendCalendarRaidLockoutInfo lockoutInfo; - - InstanceSave const* save = boundInstance.second.save; - lockoutInfo.MapID = save->GetMapId(); - lockoutInfo.DifficultyID = save->GetDifficultyID(); - lockoutInfo.ExpireTime = save->GetResetTime() - currTime; - lockoutInfo.InstanceID = save->GetInstanceId(); // instance save id as unique instance copy id - - packet.RaidLockouts.push_back(lockoutInfo); + if (boundInstance.second.perm) + { + WorldPackets::Calendar::CalendarSendCalendarRaidLockoutInfo lockoutInfo; + + InstanceSave const* save = boundInstance.second.save; + lockoutInfo.MapID = save->GetMapId(); + lockoutInfo.DifficultyID = save->GetDifficultyID(); + lockoutInfo.ExpireTime = save->GetResetTime() - currTime; + lockoutInfo.InstanceID = save->GetInstanceId(); // instance save id as unique instance copy id + + packet.RaidLockouts.push_back(lockoutInfo); + } } } } |