Core/Maps: Replaced spawnmask with difficulty list

This commit is contained in:
Shauren
2018-09-15 17:55:26 +02:00
parent 0f3156d324
commit 738f37d3cf
36 changed files with 320 additions and 214 deletions

View File

@@ -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;
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
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);
packet.RaidLockouts.push_back(lockoutInfo);
}
}
}
}