mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/DataStores: Updated hotfix database structure
* Updated handling for removed db2s
This commit is contained in:
@@ -60,23 +60,23 @@ PhaseShift::EraseResult<PhaseShift::VisibleMapIdContainer> PhaseShift::RemoveVis
|
||||
return { VisibleMapIds.end(), false };
|
||||
}
|
||||
|
||||
bool PhaseShift::AddUiWorldMapAreaIdSwap(uint32 uiWorldMapAreaId, int32 references /*= 1*/)
|
||||
bool PhaseShift::AddUiMapPhaseId(uint32 uiMapPhaseId, int32 references /*= 1*/)
|
||||
{
|
||||
auto insertResult = UiWorldMapAreaIdSwaps.emplace(uiWorldMapAreaId, UiWorldMapAreaIdSwapRef{ 0 });
|
||||
auto insertResult = UiMapPhaseIds.emplace(uiMapPhaseId, UiMapPhaseIdRef{ 0 });
|
||||
insertResult.first->second.References += references;
|
||||
return insertResult.second;
|
||||
}
|
||||
|
||||
PhaseShift::EraseResult<PhaseShift::UiWorldMapAreaIdSwapContainer> PhaseShift::RemoveUiWorldMapAreaIdSwap(uint32 uiWorldMapAreaId)
|
||||
PhaseShift::EraseResult<PhaseShift::UiMapPhaseIdContainer> PhaseShift::RemoveUiMapPhaseId(uint32 uiMapPhaseId)
|
||||
{
|
||||
auto itr = UiWorldMapAreaIdSwaps.find(uiWorldMapAreaId);
|
||||
if (itr != UiWorldMapAreaIdSwaps.end())
|
||||
auto itr = UiMapPhaseIds.find(uiMapPhaseId);
|
||||
if (itr != UiMapPhaseIds.end())
|
||||
{
|
||||
if (!--itr->second.References)
|
||||
return { UiWorldMapAreaIdSwaps.erase(itr), true };
|
||||
return { UiMapPhaseIds.erase(itr), true };
|
||||
return { itr, false };
|
||||
}
|
||||
return { UiWorldMapAreaIdSwaps.end(), false };
|
||||
return { UiMapPhaseIds.end(), false };
|
||||
}
|
||||
|
||||
void PhaseShift::Clear()
|
||||
@@ -84,7 +84,7 @@ void PhaseShift::Clear()
|
||||
ClearPhases();
|
||||
PersonalGuid.Clear();
|
||||
VisibleMapIds.clear();
|
||||
UiWorldMapAreaIdSwaps.clear();
|
||||
UiMapPhaseIds.clear();
|
||||
}
|
||||
|
||||
void PhaseShift::ClearPhases()
|
||||
|
||||
Reference in New Issue
Block a user