mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[7141] Implement heroic raid instance mode support.
* Heroic mode player amount for instances in DB. Can be used for any instances but added for heroic raid instance. * Output transfer error at max playrs limit. * FIXME notes ;) for raid required implementing store 2 reset time and do global reset for 2 modes. But currently raid have inmmap entry data same reset time for both cases. * Update instances list where mounts allowed. * Simplify and fix code for SMSG_RAID_INSTANCE_INFO. Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
2a891a8c92
commit
f26d6151c8
11 changed files with 87 additions and 52 deletions
|
|
@ -15288,29 +15288,29 @@ InstancePlayerBind* Player::BindToInstance(InstanceSave *save, bool permanent, b
|
|||
|
||||
void Player::SendRaidInfo()
|
||||
{
|
||||
uint32 counter = 0;
|
||||
|
||||
WorldPacket data(SMSG_RAID_INSTANCE_INFO, 4);
|
||||
|
||||
uint32 counter = 0, i;
|
||||
for(i = 0; i < TOTAL_DIFFICULTIES; i++)
|
||||
for (BoundInstancesMap::iterator itr = m_boundInstances[i].begin(); itr != m_boundInstances[i].end(); ++itr)
|
||||
if(itr->second.perm) counter++;
|
||||
size_t p_counter = data.wpos();
|
||||
data << uint32(counter); // placeholder
|
||||
|
||||
data << counter;
|
||||
for(i = 0; i < TOTAL_DIFFICULTIES; i++)
|
||||
for(int i = 0; i < TOTAL_DIFFICULTIES; ++i)
|
||||
{
|
||||
for (BoundInstancesMap::iterator itr = m_boundInstances[i].begin(); itr != m_boundInstances[i].end(); ++itr)
|
||||
{
|
||||
if(itr->second.perm)
|
||||
{
|
||||
InstanceSave *save = itr->second.save;
|
||||
data << (save->GetMapId());
|
||||
data << (uint32)(save->GetResetTime() - time(NULL));
|
||||
data << save->GetInstanceId();
|
||||
data << uint32(counter);
|
||||
counter--;
|
||||
data << uint32(save->GetMapId());
|
||||
data << uint32(save->GetResetTime() - time(NULL));
|
||||
data << uint32(save->GetInstanceId());
|
||||
data << uint32(save->GetDifficulty());
|
||||
++counter;
|
||||
}
|
||||
}
|
||||
}
|
||||
data.put<uint32>(p_counter,counter);
|
||||
GetSession()->SendPacket(&data);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue