mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 13:46:24 +00:00
feat(Core/Misc): implement ObjectGuid class (port from TC) (#4885)
This commit is contained in:
@@ -50,9 +50,9 @@ void GroupMgr::RegisterGroupId(uint32 groupId)
|
||||
++_nextGroupId;
|
||||
}
|
||||
|
||||
uint32 GroupMgr::GenerateGroupId()
|
||||
ObjectGuid::LowType GroupMgr::GenerateGroupId()
|
||||
{
|
||||
uint32 newGroupId = _nextGroupId;
|
||||
ObjectGuid::LowType newGroupId = _nextGroupId;
|
||||
|
||||
// find the lowest available id starting from the current _nextGroupId
|
||||
while (_nextGroupId < 0xFFFFFFFF && ++_nextGroupId < _groupIds.size() && _groupIds[_nextGroupId]);
|
||||
@@ -66,7 +66,7 @@ uint32 GroupMgr::GenerateGroupId()
|
||||
return newGroupId;
|
||||
}
|
||||
|
||||
Group* GroupMgr::GetGroupByGUID(uint32 groupId) const
|
||||
Group* GroupMgr::GetGroupByGUID(ObjectGuid::LowType groupId) const
|
||||
{
|
||||
GroupContainer::const_iterator itr = GroupStore.find(groupId);
|
||||
if (itr != GroupStore.end())
|
||||
@@ -77,12 +77,12 @@ Group* GroupMgr::GetGroupByGUID(uint32 groupId) const
|
||||
|
||||
void GroupMgr::AddGroup(Group* group)
|
||||
{
|
||||
GroupStore[group->GetLowGUID()] = group;
|
||||
GroupStore[group->GetGUID().GetCounter()] = group;
|
||||
}
|
||||
|
||||
void GroupMgr::RemoveGroup(Group* group)
|
||||
{
|
||||
GroupStore.erase(group->GetLowGUID());
|
||||
GroupStore.erase(group->GetGUID().GetCounter());
|
||||
}
|
||||
|
||||
void GroupMgr::LoadGroups()
|
||||
@@ -126,7 +126,7 @@ void GroupMgr::LoadGroups()
|
||||
}
|
||||
AddGroup(group);
|
||||
|
||||
RegisterGroupId(group->GetLowGUID());
|
||||
RegisterGroupId(group->GetGUID().GetCounter());
|
||||
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
|
||||
Reference in New Issue
Block a user