aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Handlers/CalendarHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Handlers/CalendarHandler.cpp')
-rw-r--r--src/server/game/Handlers/CalendarHandler.cpp27
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);
+ }
}
}
}