Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ///< @todo refactor me with new data stillnot done 22/02/16
- void WorldSession::SendSetPhaseShift(const std::set<uint32> & p_PhaseIds, const std::set<uint32> & p_TerrainSwaps, const std::set<uint32> & p_InactiveTerrainSwap)
- {
- uint32 unkValue = 0;
- WorldPacket l_ShiftPacket(SMSG_SET_PHASE_SHIFT, 500);
- l_ShiftPacket.appendPackGUID(m_Player->GetGUID()); ///< CLientGUID
- // 0x8 or 0x10 is related to areatrigger, if we send flags 0x00 areatrigger doesn't work in some case
- l_ShiftPacket << uint32(0x18); ///< PhaseShiftFlags
- l_ShiftPacket << uint32(p_PhaseIds.size()); ///< PhaseShiftCount
- l_ShiftPacket.appendPackGUID(0); ///< PersonalGUID
- // Active terrain swaps, may switch with inactive terrain
- for (std::set<uint32>::const_iterator l_It = p_PhaseIds.begin(); l_It != p_PhaseIds.end(); ++l_It)
- {
- l_ShiftPacket << uint16(1); ///< PhaseFlags
- l_ShiftPacket << uint16(*l_It); ///< PhaseID
- }
- /// Inactive terrain swaps, may switch with active terrain
- l_ShiftPacket << uint32(p_InactiveTerrainSwap.size() * 2); ///< Active terrain swaps size
- for (std::set<uint32>::const_iterator l_It = p_InactiveTerrainSwap.begin(); l_It != p_InactiveTerrainSwap.end(); ++l_It)
- l_ShiftPacket << uint16(*l_It); ///< Active terrain swap map id
- // WorldMapAreaId ?
- l_ShiftPacket << unkValue; ///< Inactive terrain swaps size used for PreloadMapIDs
- //for (uint32 i = 0; i < unkValue; i++)
- //data << uint16(0); ///< Inactive terrain swap map id
- /// Active terrain swaps
- l_ShiftPacket << uint32(p_TerrainSwaps.size() * 2); ///< UI map swaps size
- for (std::set<uint32>::const_iterator l_It = p_TerrainSwaps.begin(); l_It != p_TerrainSwaps.end(); ++l_It)
- l_ShiftPacket << uint16(*l_It); ///< UI map id, WorldMapArea.dbc, controls map display
- SendPacket(&l_ShiftPacket);
- }
Advertisement
Add Comment
Please, Sign In to add comment