mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[10380] Finaly drop MAKE_NEW_GUID.
This meaning that ObjectGuid only proper way create guid from lowguid now. But packet handlers still generate uint64 guids. Some DB fields also loaded uint64 values. Also possible existed not catches et uint32->uint64 assigns.
This commit is contained in:
parent
5fd06abf44
commit
22b515718f
6 changed files with 9 additions and 14 deletions
|
|
@ -34,10 +34,10 @@
|
||||||
|
|
||||||
void WorldSession::HandleBattlemasterHelloOpcode(WorldPacket & recv_data)
|
void WorldSession::HandleBattlemasterHelloOpcode(WorldPacket & recv_data)
|
||||||
{
|
{
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
recv_data >> guid;
|
recv_data >> guid;
|
||||||
|
|
||||||
DEBUG_LOG("WORLD: Recvd CMSG_BATTLEMASTER_HELLO Message from (GUID: %u TypeId:%u)", GUID_LOPART(guid),GuidHigh2TypeId(GUID_HIPART(guid)));
|
DEBUG_LOG("WORLD: Recvd CMSG_BATTLEMASTER_HELLO Message from %s", guid.GetString().c_str());
|
||||||
|
|
||||||
Creature *pCreature = GetPlayer()->GetMap()->GetCreature(guid);
|
Creature *pCreature = GetPlayer()->GetMap()->GetCreature(guid);
|
||||||
|
|
||||||
|
|
@ -66,7 +66,7 @@ void WorldSession::HandleBattlemasterHelloOpcode(WorldPacket & recv_data)
|
||||||
SendBattlegGroundList(guid, bgTypeId);
|
SendBattlegGroundList(guid, bgTypeId);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::SendBattlegGroundList( uint64 guid, BattleGroundTypeId bgTypeId )
|
void WorldSession::SendBattlegGroundList( ObjectGuid guid, BattleGroundTypeId bgTypeId )
|
||||||
{
|
{
|
||||||
WorldPacket data;
|
WorldPacket data;
|
||||||
sBattleGroundMgr.BuildBattleGroundListPacket(&data, guid, _player, bgTypeId, 0);
|
sBattleGroundMgr.BuildBattleGroundListPacket(&data, guid, _player, bgTypeId, 0);
|
||||||
|
|
@ -315,7 +315,7 @@ void WorldSession::HandleBattlefieldListOpcode( WorldPacket &recv_data )
|
||||||
}
|
}
|
||||||
|
|
||||||
WorldPacket data;
|
WorldPacket data;
|
||||||
sBattleGroundMgr.BuildBattleGroundListPacket(&data, 0, _player, BattleGroundTypeId(bgTypeId), fromWhere);
|
sBattleGroundMgr.BuildBattleGroundListPacket(&data, ObjectGuid(), _player, BattleGroundTypeId(bgTypeId), fromWhere);
|
||||||
SendPacket( &data );
|
SendPacket( &data );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1781,13 +1781,13 @@ void BattleGroundMgr::DistributeArenaPoints()
|
||||||
sWorld.SendWorldText(LANG_DIST_ARENA_POINTS_END);
|
sWorld.SendWorldText(LANG_DIST_ARENA_POINTS_END);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BattleGroundMgr::BuildBattleGroundListPacket(WorldPacket *data, const uint64& guid, Player* plr, BattleGroundTypeId bgTypeId, uint8 fromWhere)
|
void BattleGroundMgr::BuildBattleGroundListPacket(WorldPacket *data, ObjectGuid guid, Player* plr, BattleGroundTypeId bgTypeId, uint8 fromWhere)
|
||||||
{
|
{
|
||||||
if (!plr)
|
if (!plr)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
data->Initialize(SMSG_BATTLEFIELD_LIST);
|
data->Initialize(SMSG_BATTLEFIELD_LIST);
|
||||||
*data << uint64(guid); // battlemaster guid
|
*data << guid; // battlemaster guid
|
||||||
*data << uint8(fromWhere); // from where you joined
|
*data << uint8(fromWhere); // from where you joined
|
||||||
*data << uint32(bgTypeId); // battleground id
|
*data << uint32(bgTypeId); // battleground id
|
||||||
*data << uint8(0); // unk
|
*data << uint8(0); // unk
|
||||||
|
|
|
||||||
|
|
@ -192,7 +192,7 @@ class BattleGroundMgr
|
||||||
/* Packet Building */
|
/* Packet Building */
|
||||||
void BuildPlayerJoinedBattleGroundPacket(WorldPacket *data, Player *plr);
|
void BuildPlayerJoinedBattleGroundPacket(WorldPacket *data, Player *plr);
|
||||||
void BuildPlayerLeftBattleGroundPacket(WorldPacket *data, const uint64& guid);
|
void BuildPlayerLeftBattleGroundPacket(WorldPacket *data, const uint64& guid);
|
||||||
void BuildBattleGroundListPacket(WorldPacket *data, const uint64& guid, Player *plr, BattleGroundTypeId bgTypeId, uint8 fromWhere);
|
void BuildBattleGroundListPacket(WorldPacket *data, ObjectGuid guid, Player *plr, BattleGroundTypeId bgTypeId, uint8 fromWhere);
|
||||||
void BuildGroupJoinedBattlegroundPacket(WorldPacket *data, GroupJoinBattlegroundResult result);
|
void BuildGroupJoinedBattlegroundPacket(WorldPacket *data, GroupJoinBattlegroundResult result);
|
||||||
void BuildUpdateWorldStatePacket(WorldPacket *data, uint32 field, uint32 value);
|
void BuildUpdateWorldStatePacket(WorldPacket *data, uint32 field, uint32 value);
|
||||||
void BuildPvpLogDataPacket(WorldPacket *data, BattleGround *bg);
|
void BuildPvpLogDataPacket(WorldPacket *data, BattleGround *bg);
|
||||||
|
|
|
||||||
|
|
@ -77,11 +77,6 @@ enum HighGuid
|
||||||
//*** Must be replaced by ObjectGuid use ***
|
//*** Must be replaced by ObjectGuid use ***
|
||||||
#define IS_PLAYER_GUID(Guid) ( GUID_HIPART(Guid) == HIGHGUID_PLAYER && Guid!=0 )
|
#define IS_PLAYER_GUID(Guid) ( GUID_HIPART(Guid) == HIGHGUID_PLAYER && Guid!=0 )
|
||||||
// special case for empty guid need check
|
// special case for empty guid need check
|
||||||
// l - OBJECT_FIELD_GUID
|
|
||||||
// e - OBJECT_FIELD_ENTRY for GO (except GAMEOBJECT_TYPE_MO_TRANSPORT) and creatures or UNIT_FIELD_PETNUMBER for pets
|
|
||||||
// h - OBJECT_FIELD_GUID + 1
|
|
||||||
#define MAKE_NEW_GUID(l, e, h) uint64( uint64(l) | ( uint64(e) << 24 ) | ( uint64(h) << 48 ) )
|
|
||||||
|
|
||||||
#define GUID_HIPART(x) (uint32)((uint64(x) >> 48) & 0x0000FFFF)
|
#define GUID_HIPART(x) (uint32)((uint64(x) >> 48) & 0x0000FFFF)
|
||||||
|
|
||||||
// We have different low and middle part size for different guid types
|
// We have different low and middle part size for different guid types
|
||||||
|
|
|
||||||
|
|
@ -223,7 +223,7 @@ class MANGOS_DLL_SPEC WorldSession
|
||||||
|
|
||||||
void SendAttackStop(Unit const* enemy);
|
void SendAttackStop(Unit const* enemy);
|
||||||
|
|
||||||
void SendBattlegGroundList( uint64 guid, BattleGroundTypeId bgTypeId );
|
void SendBattlegGroundList(ObjectGuid guid, BattleGroundTypeId bgTypeId);
|
||||||
|
|
||||||
void SendTradeStatus(TradeStatus status);
|
void SendTradeStatus(TradeStatus status);
|
||||||
void SendUpdateTrade(bool trader_state = true);
|
void SendUpdateTrade(bool trader_state = true);
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "10379"
|
#define REVISION_NR "10380"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue