mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-10 03:59:05 +01:00
Core/Groups: Move OnGroupChangeLeader so it could be triggered when a leader leaves a group
--HG-- branch : trunk
This commit is contained in:
@@ -431,7 +431,6 @@ void Group::ChangeLeader(const uint64 &guid)
|
||||
if (slot == m_memberSlots.end())
|
||||
return;
|
||||
|
||||
sScriptMgr.OnGroupChangeLeader(this, m_leaderGuid, guid);
|
||||
_setLeader(guid);
|
||||
|
||||
WorldPacket data(SMSG_GROUP_SET_LEADER, slot->name.size()+1);
|
||||
@@ -1332,6 +1331,8 @@ void Group::_setLeader(const uint64 &guid)
|
||||
if (slot == m_memberSlots.end())
|
||||
return;
|
||||
|
||||
sScriptMgr.OnGroupChangeLeader(this, m_leaderGuid, guid);
|
||||
|
||||
if (!isBGGroup())
|
||||
{
|
||||
// TODO: set a time limit to have this function run rarely cause it can be slow
|
||||
|
||||
Reference in New Issue
Block a user