diff options
| author | Shauren <shauren.trinity@gmail.com> | 2023-09-07 01:10:07 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2023-09-07 01:10:07 +0200 |
| commit | 8efeb202a500bda46283127f66fb85f6b91f9e76 (patch) | |
| tree | c6c12b633d144d26927f615af4d3d64b07e62dcc /src/server/game/Groups | |
| parent | 0bf5cf33c7dd909202ef492b69e317652e923f96 (diff) | |
Core: Update to 10.1.7
Diffstat (limited to 'src/server/game/Groups')
| -rw-r--r-- | src/server/game/Groups/Group.cpp | 24 | ||||
| -rw-r--r-- | src/server/game/Groups/Group.h | 10 |
2 files changed, 17 insertions, 17 deletions
diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp index 821ee3c7dd8..55a481c8fc7 100644 --- a/src/server/game/Groups/Group.cpp +++ b/src/server/game/Groups/Group.cpp @@ -657,7 +657,7 @@ bool Group::RemoveMember(ObjectGuid guid, RemoveMethod method /*= GROUP_REMOVEME } } -void Group::ChangeLeader(ObjectGuid newLeaderGuid, int8 partyIndex) +void Group::ChangeLeader(ObjectGuid newLeaderGuid) { member_witerator slot = _getMemberWSlot(newLeaderGuid); @@ -698,7 +698,7 @@ void Group::ChangeLeader(ObjectGuid newLeaderGuid, int8 partyIndex) WorldPackets::Party::GroupNewLeader groupNewLeader; groupNewLeader.Name = m_leaderName; - groupNewLeader.PartyIndex = partyIndex; + groupNewLeader.PartyIndex = GetGroupCategory(); BroadcastPacket(groupNewLeader.Write(), true); } @@ -769,7 +769,7 @@ void Group::Disband(bool hideDestroy /* = false */) delete this; } -void Group::SetTargetIcon(uint8 symbol, ObjectGuid target, ObjectGuid changedBy, uint8 partyIndex) +void Group::SetTargetIcon(uint8 symbol, ObjectGuid target, ObjectGuid changedBy) { if (symbol >= TARGET_ICONS_COUNT) return; @@ -778,27 +778,27 @@ void Group::SetTargetIcon(uint8 symbol, ObjectGuid target, ObjectGuid changedBy, if (!target.IsEmpty()) for (uint8 i = 0; i < TARGET_ICONS_COUNT; ++i) if (m_targetIcons[i] == target) - SetTargetIcon(i, ObjectGuid::Empty, changedBy, partyIndex); + SetTargetIcon(i, ObjectGuid::Empty, changedBy); m_targetIcons[symbol] = target; WorldPackets::Party::SendRaidTargetUpdateSingle updateSingle; - updateSingle.PartyIndex = partyIndex; + updateSingle.PartyIndex = GetGroupCategory(); updateSingle.Target = target; updateSingle.ChangedBy = changedBy; updateSingle.Symbol = symbol; BroadcastPacket(updateSingle.Write(), true); } -void Group::SendTargetIconList(WorldSession* session, int8 partyIndex) +void Group::SendTargetIconList(WorldSession* session) { if (!session) return; WorldPackets::Party::SendRaidTargetUpdateAll updateAll; - updateAll.PartyIndex = partyIndex; + updateAll.PartyIndex = GetGroupCategory(); for (uint8 i = 0; i < TARGET_ICONS_COUNT; i++) - updateAll.TargetIcons.insert(std::pair<uint8, ObjectGuid>(i, m_targetIcons[i])); + updateAll.TargetIcons.try_emplace(i, m_targetIcons[i]); session->SendPacket(updateAll.Write()); } @@ -1444,7 +1444,7 @@ void Group::UpdateReadyCheck(uint32 diff) EndReadyCheck(); } -void Group::StartReadyCheck(ObjectGuid starterGuid, int8 partyIndex, Milliseconds duration) +void Group::StartReadyCheck(ObjectGuid starterGuid, Milliseconds duration) { if (m_readyCheckStarted) return; @@ -1462,7 +1462,7 @@ void Group::StartReadyCheck(ObjectGuid starterGuid, int8 partyIndex, Millisecond WorldPackets::Party::ReadyCheckStarted readyCheckStarted; readyCheckStarted.PartyGUID = m_guid; - readyCheckStarted.PartyIndex = partyIndex; + readyCheckStarted.PartyIndex = GetGroupCategory(); readyCheckStarted.InitiatorGUID = starterGuid; readyCheckStarted.Duration = duration; BroadcastPacket(readyCheckStarted.Write(), false); @@ -1561,11 +1561,11 @@ void Group::DeleteRaidMarker(uint8 markerId) SendRaidMarkersChanged(); } -void Group::SendRaidMarkersChanged(WorldSession* session, int8 partyIndex) +void Group::SendRaidMarkersChanged(WorldSession* session) { WorldPackets::Party::RaidMarkersChanged packet; - packet.PartyIndex = partyIndex; + packet.PartyIndex = GetGroupCategory(); packet.ActiveMarkers = m_activeMarkers; for (uint8 i = 0; i < RAID_MARKERS_COUNT; i++) diff --git a/src/server/game/Groups/Group.h b/src/server/game/Groups/Group.h index 825c8732724..397755c6deb 100644 --- a/src/server/game/Groups/Group.h +++ b/src/server/game/Groups/Group.h @@ -209,7 +209,7 @@ class TC_GAME_API Group bool AddLeaderInvite(Player* player); bool AddMember(Player* player); bool RemoveMember(ObjectGuid guid, RemoveMethod method = GROUP_REMOVEMETHOD_DEFAULT, ObjectGuid kicker = ObjectGuid::Empty, const char* reason = nullptr); - void ChangeLeader(ObjectGuid guid, int8 partyIndex = 0); + void ChangeLeader(ObjectGuid guid); void SetLootMethod(LootMethod method); void SetLooterGuid(ObjectGuid guid); void SetMasterLooterGuid(ObjectGuid guid); @@ -224,7 +224,7 @@ class TC_GAME_API Group void UpdateReadyCheck(uint32 diff); // Ready check - void StartReadyCheck(ObjectGuid starterGuid, int8 partyIndex, Milliseconds duration = Milliseconds(READYCHECK_DURATION)); + void StartReadyCheck(ObjectGuid starterGuid, Milliseconds duration = Milliseconds(READYCHECK_DURATION)); void EndReadyCheck(); bool IsReadyCheckStarted(void) const { return m_readyCheckStarted; } @@ -240,7 +240,7 @@ class TC_GAME_API Group // Raid Markers void AddRaidMarker(uint8 markerId, uint32 mapId, float positionX, float positionY, float positionZ, ObjectGuid transportGuid = ObjectGuid::Empty); void DeleteRaidMarker(uint8 markerId); - void SendRaidMarkersChanged(WorldSession* session = nullptr, int8 partyIndex = 0); + void SendRaidMarkersChanged(WorldSession* session = nullptr); // properties accessories bool IsFull() const; @@ -297,7 +297,7 @@ class TC_GAME_API Group void ChangeMembersGroup(ObjectGuid guid, uint8 group); void SwapMembersGroups(ObjectGuid firstGuid, ObjectGuid secondGuid); - void SetTargetIcon(uint8 symbol, ObjectGuid target, ObjectGuid changedBy, uint8 partyIndex); + void SetTargetIcon(uint8 symbol, ObjectGuid target, ObjectGuid changedBy); void SetGroupMemberFlag(ObjectGuid guid, bool apply, GroupMemberFlags flag); void RemoveUniqueGroupMemberFlag(GroupMemberFlags flag); @@ -312,7 +312,7 @@ class TC_GAME_API Group // -no description- //void SendInit(WorldSession* session); - void SendTargetIconList(WorldSession* session, int8 partyIndex = 0); + void SendTargetIconList(WorldSession* session); void SendUpdate(); void SendUpdateToPlayer(ObjectGuid playerGUID, MemberSlot* slot = nullptr); void SendUpdateDestroyGroupToPlayer(Player* player) const; |
