mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-23 21:27:45 +00:00
Rename m_territoryInstanceMap to m_territoryIdToInstanceGuidMap
This commit is contained in:
parent
569445632c
commit
af06875e93
2 changed files with 6 additions and 6 deletions
|
@ -132,7 +132,7 @@ bool Core::TerritoryMgr::createDefaultTerritories()
|
||||||
InstanceIdToZonePtrMap instanceMap;
|
InstanceIdToZonePtrMap instanceMap;
|
||||||
instanceMap[guid] = pZone;
|
instanceMap[guid] = pZone;
|
||||||
m_instanceIdToZonePtrMap[guid] = pZone;
|
m_instanceIdToZonePtrMap[guid] = pZone;
|
||||||
m_territoryInstanceMap[territoryId] = instanceMap;
|
m_territoryIdToInstanceGuidMap[territoryId] = instanceMap;
|
||||||
m_zoneSet.insert( { pZone } );
|
m_zoneSet.insert( { pZone } );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -162,7 +162,7 @@ Core::ZonePtr Core::TerritoryMgr::createTerritoryInstance( uint32_t territoryTyp
|
||||||
pZone->init();
|
pZone->init();
|
||||||
|
|
||||||
m_instanceIdToZonePtrMap[pZone->getGuId()] = pZone;
|
m_instanceIdToZonePtrMap[pZone->getGuId()] = pZone;
|
||||||
m_territoryInstanceMap[pZone->getTerritoryId()][pZone->getGuId()] = pZone;
|
m_territoryIdToInstanceGuidMap[pZone->getTerritoryId()][pZone->getGuId()] = pZone;
|
||||||
m_zoneSet.insert( { pZone } );
|
m_zoneSet.insert( { pZone } );
|
||||||
|
|
||||||
return pZone;
|
return pZone;
|
||||||
|
@ -215,7 +215,7 @@ bool Core::TerritoryMgr::removeTerritoryInstance( uint32_t instanceId )
|
||||||
m_instanceContentToInstanceMap[instance->getInstanceContentId()].erase( pZone->getGuId() );
|
m_instanceContentToInstanceMap[instance->getInstanceContentId()].erase( pZone->getGuId() );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
m_territoryInstanceMap[pZone->getTerritoryId()].erase( pZone->getGuId() );
|
m_territoryIdToInstanceGuidMap[pZone->getTerritoryId()].erase( pZone->getGuId() );
|
||||||
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -276,8 +276,8 @@ Core::ZonePositionPtr Core::TerritoryMgr::getTerritoryPosition( uint32_t territo
|
||||||
|
|
||||||
Core::ZonePtr Core::TerritoryMgr::getZoneByTerriId( uint32_t territoryId ) const
|
Core::ZonePtr Core::TerritoryMgr::getZoneByTerriId( uint32_t territoryId ) const
|
||||||
{
|
{
|
||||||
auto zoneMap = m_territoryInstanceMap.find( territoryId );
|
auto zoneMap = m_territoryIdToInstanceGuidMap.find( territoryId );
|
||||||
if( zoneMap == m_territoryInstanceMap.end() )
|
if( zoneMap == m_territoryIdToInstanceGuidMap.end() )
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
// TODO: actually select the proper one
|
// TODO: actually select the proper one
|
||||||
|
|
|
@ -135,7 +135,7 @@ namespace Core
|
||||||
TerritoryTypeDetailCache m_territoryTypeDetailCacheMap;
|
TerritoryTypeDetailCache m_territoryTypeDetailCacheMap;
|
||||||
|
|
||||||
/*! map holding actual instances of default territories */
|
/*! map holding actual instances of default territories */
|
||||||
TerritoryIdToInstanceMap m_territoryInstanceMap;
|
TerritoryIdToInstanceMap m_territoryIdToInstanceGuidMap;
|
||||||
|
|
||||||
/*! map holding actual instances of InstanceContent */
|
/*! map holding actual instances of InstanceContent */
|
||||||
InstanceContentIdToInstanceMap m_instanceContentToInstanceMap;
|
InstanceContentIdToInstanceMap m_instanceContentToInstanceMap;
|
||||||
|
|
Loading…
Add table
Reference in a new issue