mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[9284] Realy fixed crash source added in [9228] now.
This commit is contained in:
parent
868a4d20a4
commit
66c8c75914
4 changed files with 11 additions and 7 deletions
|
|
@ -1251,12 +1251,14 @@ void Group::_setLeader(const uint64 &guid)
|
|||
CharacterDatabase.CommitTransaction();
|
||||
}
|
||||
|
||||
uint32 old_guidlow = m_leaderGuid;
|
||||
|
||||
m_leaderGuid = slot->guid;
|
||||
m_leaderName = slot->name;
|
||||
|
||||
// Non-BG groups stored in sObjectMgr with leader low-guids as keys
|
||||
if (IsCreated() && !isBGGroup())
|
||||
sObjectMgr.UpdateGroup(this);
|
||||
sObjectMgr.UpdateGroup(old_guidlow,this);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8415,6 +8415,12 @@ void ObjectMgr::RemoveGroup( Group* group )
|
|||
mGroupMap.erase(GUID_LOPART(group->GetLeaderGUID()));
|
||||
}
|
||||
|
||||
void ObjectMgr::UpdateGroup( uint32 old_guidlow, Group* group )
|
||||
{
|
||||
mGroupMap.erase(old_guidlow);
|
||||
AddGroup(group);
|
||||
}
|
||||
|
||||
void ObjectMgr::AddArenaTeam( ArenaTeam* arenaTeam )
|
||||
{
|
||||
mArenaTeamMap[arenaTeam->GetId()] = arenaTeam;
|
||||
|
|
|
|||
|
|
@ -411,11 +411,7 @@ class ObjectMgr
|
|||
Group * GetGroupByLeaderLowGUID(uint32 lowguid) const;
|
||||
void AddGroup(Group* group);
|
||||
void RemoveGroup(Group* group);
|
||||
void UpdateGroup(Group* group) // when need update leader guid as group key
|
||||
{
|
||||
RemoveGroup(group);
|
||||
AddGroup(group);
|
||||
}
|
||||
void UpdateGroup(uint32 old_guidlow, Group* group); // when need update leader guid as group key
|
||||
|
||||
Guild* GetGuildByLeader(uint64 const&guid) const;
|
||||
Guild* GetGuildById(uint32 GuildId) const;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "9283"
|
||||
#define REVISION_NR "9284"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue