Changeset 3156

Show
Ignore:
Timestamp:
02/07/2010 09:32:13 AM (4 weeks ago)
Author:
AlexisB
Message:

Some BG packet fixes. Thanks to Mangos for the structure.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/arcemu-world/BattlegroundMgr.cpp

    r3153 r3156  
    8282        { 
    8383                WorldPacket data(SMSG_BATTLEFIELD_LIST, 18); 
    84                 data << m_session->GetPlayer()->GetGUID() << from << uint32(6) << uint32(0xC) << uint8(0); 
     84                data << m_session->GetPlayer()->GetGUID(); 
     85        data << from; 
     86        data << uint32( 6 ); 
     87        data << uint32( 0xC ); 
     88        data << uint8( 0 ); 
     89        data << uint8( 0 ); 
    8590                m_session->SendPacket(&data); 
     91 
    8692                return; 
    8793        } 
     
    95101        data << BattlegroundType; 
    96102        data << uint8(2); 
     103    data << uint8( 0 ); 
     104     
     105    size_t pos = data.wpos(); 
     106 
    97107        data << uint32(0);      // Count 
    98108 
     
    103113                if(itr->second->CanPlayerJoin(m_session->GetPlayer(),BattlegroundType) && !itr->second->HasEnded() ) 
    104114                { 
    105                         data << itr->first; 
     115                        data << uint32( itr->first ); 
    106116                        ++Count; 
    107117                } 
     
    109119        m_instanceLock.Release(); 
    110120 
    111         *(uint32*)&data.contents()[13] = Count; 
     121    data.put< uint32 >( pos, Count ); 
    112122 
    113123    m_session->SendPacket(&data);