mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +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();
|
CharacterDatabase.CommitTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32 old_guidlow = m_leaderGuid;
|
||||||
|
|
||||||
m_leaderGuid = slot->guid;
|
m_leaderGuid = slot->guid;
|
||||||
m_leaderName = slot->name;
|
m_leaderName = slot->name;
|
||||||
|
|
||||||
// Non-BG groups stored in sObjectMgr with leader low-guids as keys
|
// Non-BG groups stored in sObjectMgr with leader low-guids as keys
|
||||||
if (IsCreated() && !isBGGroup())
|
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()));
|
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 )
|
void ObjectMgr::AddArenaTeam( ArenaTeam* arenaTeam )
|
||||||
{
|
{
|
||||||
mArenaTeamMap[arenaTeam->GetId()] = arenaTeam;
|
mArenaTeamMap[arenaTeam->GetId()] = arenaTeam;
|
||||||
|
|
|
||||||
|
|
@ -411,11 +411,7 @@ class ObjectMgr
|
||||||
Group * GetGroupByLeaderLowGUID(uint32 lowguid) const;
|
Group * GetGroupByLeaderLowGUID(uint32 lowguid) const;
|
||||||
void AddGroup(Group* group);
|
void AddGroup(Group* group);
|
||||||
void RemoveGroup(Group* group);
|
void RemoveGroup(Group* group);
|
||||||
void UpdateGroup(Group* group) // when need update leader guid as group key
|
void UpdateGroup(uint32 old_guidlow, Group* group); // when need update leader guid as group key
|
||||||
{
|
|
||||||
RemoveGroup(group);
|
|
||||||
AddGroup(group);
|
|
||||||
}
|
|
||||||
|
|
||||||
Guild* GetGuildByLeader(uint64 const&guid) const;
|
Guild* GetGuildByLeader(uint64 const&guid) const;
|
||||||
Guild* GetGuildById(uint32 GuildId) const;
|
Guild* GetGuildById(uint32 GuildId) const;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "9283"
|
#define REVISION_NR "9284"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue