Skip to content

Commit

Permalink
fix(Core/Player): Delete by group (azerothcore#19015)
Browse files Browse the repository at this point in the history
* fix(Core/Player): Delete by group

* closes azerothcore#19014

Co-Authored-By: trickerer <[email protected]>

* Update Player.cpp

* fix build

---------

Co-authored-by: trickerer <[email protected]>
  • Loading branch information
Kitzunu and trickerer authored Jun 6, 2024
1 parent ffc9da9 commit 744067b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server/game/Entities/Player/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3982,8 +3982,8 @@ void Player::DeleteFromDB(ObjectGuid::LowType lowGuid, uint32 accountId, bool up
sTicketMgr->CloseTicket(ticket->GetId(), playerGuid);

// remove from group
if (uint32 groupId = sCharacterCache->GetCharacterGuildIdByGuid(playerGuid))
if (Group* group = sGroupMgr->GetGroupByGUID(groupId))
if (ObjectGuid groupId = sCharacterCache->GetCharacterGroupGuidByGuid(playerGuid))
if (Group* group = sGroupMgr->GetGroupByGUID(groupId.GetCounter()))
RemoveFromGroup(group, playerGuid);

// Remove signs from petitions (also remove petitions if owner);
Expand Down

0 comments on commit 744067b

Please sign in to comment.