[11490] Alow implicit cast ObjectGuid->uint64 and only explicit uint64->ObjectGuid

Now safe allow this casts in like way after completed convertion to ObjectGuid use.
Also simplify code in result allowed auto cast to uint64.

Please _not_ add new uint64 storages (local and in structures) for guid values.
This commit is contained in:
VladimirMangos 2011-05-15 22:01:16 +04:00
parent ecdb435b1e
commit 249fb836ca
47 changed files with 194 additions and 210 deletions

View file

@ -2335,7 +2335,7 @@ void Guild::BroadcastEvent(GuildEvents event, ObjectGuid guid, char const* str1
{
uint8 strCount = !str1 ? 0 : (!str2 ? 1 : (!str3 ? 2 : 3));
WorldPacket data(SMSG_GUILD_EVENT, 1 + 1 + 1*strCount + (guid.IsEmpty() ? 0 : 8));
WorldPacket data(SMSG_GUILD_EVENT, 1 + 1 + 1*strCount + (!guid ? 0 : 8));
data << uint8(event);
data << uint8(strCount);
@ -2353,8 +2353,8 @@ void Guild::BroadcastEvent(GuildEvents event, ObjectGuid guid, char const* str1
else if (str1)
data << str1;
if (!guid.IsEmpty())
data << guid;
if (guid)
data << ObjectGuid(guid);
BroadcastPacket(&data);