Skip to content

Commit

Permalink
Don't allow changing leader to the player who already is leader.
Browse files Browse the repository at this point in the history
  • Loading branch information
ratkosrb authored Oct 2, 2024
1 parent 827ea07 commit 4bfeab9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/game/Handlers/GroupHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ void WorldSession::HandleGroupSetLeaderOpcode(WorldPacket& recv_data)
#endif

/** error handling **/
if (!player || !group->IsLeader(GetPlayer()->GetObjectGuid()) || player->GetGroup() != group)
if (!player || player == GetPlayer() || !group->IsLeader(GetPlayer()->GetObjectGuid()) || player->GetGroup() != group)
return;
/********************/

Expand Down

0 comments on commit 4bfeab9

Please sign in to comment.