mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[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:
parent
ecdb435b1e
commit
249fb836ca
47 changed files with 194 additions and 210 deletions
|
|
@ -943,7 +943,7 @@ void Group::SetTargetIcon(uint8 id, ObjectGuid whoGuid, ObjectGuid targetGuid)
|
|||
return;
|
||||
|
||||
// clean other icons
|
||||
if (!targetGuid.IsEmpty())
|
||||
if (targetGuid)
|
||||
for(int i = 0; i < TARGET_ICON_COUNT; ++i)
|
||||
if (m_targetIcons[i] == targetGuid)
|
||||
SetTargetIcon(i, ObjectGuid(), ObjectGuid());
|
||||
|
|
@ -1009,7 +1009,7 @@ void Group::SendTargetIconList(WorldSession *session)
|
|||
|
||||
for(int i = 0; i < TARGET_ICON_COUNT; ++i)
|
||||
{
|
||||
if (m_targetIcons[i].IsEmpty())
|
||||
if (!m_targetIcons[i])
|
||||
continue;
|
||||
|
||||
data << uint8(i);
|
||||
|
|
@ -1094,7 +1094,7 @@ void Group::BroadcastPacket(WorldPacket *packet, bool ignorePlayersInBGRaid, int
|
|||
for(GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next())
|
||||
{
|
||||
Player *pl = itr->getSource();
|
||||
if (!pl || (!ignore.IsEmpty() && pl->GetObjectGuid() == ignore) || (ignorePlayersInBGRaid && pl->GetGroup() != this) )
|
||||
if (!pl || (ignore && pl->GetObjectGuid() == ignore) || (ignorePlayersInBGRaid && pl->GetGroup() != this) )
|
||||
continue;
|
||||
|
||||
if (pl->GetSession() && (group == -1 || itr->getSubGroup() == group))
|
||||
|
|
@ -1156,7 +1156,7 @@ bool Group::_addMember(ObjectGuid guid, const char* name, bool isAssistant, uint
|
|||
if(IsFull())
|
||||
return false;
|
||||
|
||||
if (guid.IsEmpty())
|
||||
if (!guid)
|
||||
return false;
|
||||
|
||||
Player *player = sObjectMgr.GetPlayer(guid);
|
||||
|
|
@ -1369,7 +1369,7 @@ bool Group::_setMainTank(ObjectGuid guid)
|
|||
if (m_mainTankGuid == guid)
|
||||
return false;
|
||||
|
||||
if (!guid.IsEmpty())
|
||||
if (guid)
|
||||
{
|
||||
member_citerator slot = _getMemberCSlot(guid);
|
||||
if (slot == m_memberSlots.end())
|
||||
|
|
@ -1392,7 +1392,7 @@ bool Group::_setMainAssistant(ObjectGuid guid)
|
|||
if (m_mainAssistantGuid == guid)
|
||||
return false;
|
||||
|
||||
if (!guid.IsEmpty())
|
||||
if (guid)
|
||||
{
|
||||
member_witerator slot = _getMemberWSlot(guid);
|
||||
if (slot == m_memberSlots.end())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue