Core/Refactor: Part 4
This commit is contained in:
@@ -393,7 +393,6 @@ namespace Game.DataStorage
|
||||
BitReader bitReader = new BitReader(recordData);
|
||||
bitReader.Offset = i * (int)Header.RecordSize;
|
||||
|
||||
List<byte> data = new List<byte>();
|
||||
MemoryStream stream = new MemoryStream();
|
||||
BinaryWriter binaryWriter = new BinaryWriter(stream);
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace Game.DataStorage
|
||||
CliDB.ArtifactPowerLinkStorage.Clear();
|
||||
|
||||
foreach (ArtifactPowerRankRecord artifactPowerRank in CliDB.ArtifactPowerRankStorage.Values)
|
||||
_artifactPowerRanks[Tuple.Create((uint)artifactPowerRank.ArtifactPowerID, artifactPowerRank.RankIndex)] = artifactPowerRank;
|
||||
_artifactPowerRanks[Tuple.Create(artifactPowerRank.ArtifactPowerID, artifactPowerRank.RankIndex)] = artifactPowerRank;
|
||||
|
||||
CliDB.ArtifactPowerRankStorage.Clear();
|
||||
|
||||
@@ -228,7 +228,7 @@ namespace Game.DataStorage
|
||||
CliDB.ItemCurrencyCostStorage.Clear();
|
||||
|
||||
foreach (ItemLimitCategoryConditionRecord condition in CliDB.ItemLimitCategoryConditionStorage.Values)
|
||||
_itemCategoryConditions.Add((uint)condition.ParentItemLimitCategoryID, condition);
|
||||
_itemCategoryConditions.Add(condition.ParentItemLimitCategoryID, condition);
|
||||
|
||||
foreach (ItemLevelSelectorQualityRecord itemLevelSelectorQuality in CliDB.ItemLevelSelectorQualityStorage.Values)
|
||||
_itemLevelQualitySelectorQualities.Add(itemLevelSelectorQuality.ParentILSQualitySetID, itemLevelSelectorQuality);
|
||||
@@ -388,7 +388,7 @@ namespace Game.DataStorage
|
||||
{
|
||||
//ASSERT(talentUnlock->TierID < MAX_PVP_TALENT_TIERS, "MAX_PVP_TALENT_TIERS must be at least %u", talentUnlock->TierID + 1);
|
||||
//ASSERT(talentUnlock->ColumnIndex < MAX_PVP_TALENT_COLUMNS, "MAX_PVP_TALENT_COLUMNS must be at least %u", talentUnlock->ColumnIndex + 1);
|
||||
_pvpTalentUnlock[talentUnlock.TierID][talentUnlock.ColumnIndex] = (uint)talentUnlock.HonorLevel;
|
||||
_pvpTalentUnlock[talentUnlock.TierID][talentUnlock.ColumnIndex] = talentUnlock.HonorLevel;
|
||||
}
|
||||
|
||||
foreach (QuestPackageItemRecord questPackageItem in CliDB.QuestPackageItemStorage.Values)
|
||||
@@ -1000,7 +1000,7 @@ namespace Game.DataStorage
|
||||
public LFGDungeonsRecord GetLfgDungeon(uint mapId, Difficulty difficulty)
|
||||
{
|
||||
foreach (LFGDungeonsRecord dungeon in CliDB.LFGDungeonsStorage.Values)
|
||||
if (dungeon.MapID == mapId && (Difficulty)dungeon.DifficultyID == difficulty)
|
||||
if (dungeon.MapID == mapId && dungeon.DifficultyID == difficulty)
|
||||
return dungeon;
|
||||
|
||||
return null;
|
||||
|
||||
@@ -71,7 +71,6 @@ namespace Game.DataStorage
|
||||
targPositions[i] = new M2SplineKey(reader);
|
||||
|
||||
// Read the data for this set
|
||||
uint currPos = targArray.offset_elements;
|
||||
for (uint i = 0; i < targTsArray.number; ++i)
|
||||
{
|
||||
// Translate co-ordinates
|
||||
@@ -82,7 +81,6 @@ namespace Game.DataStorage
|
||||
thisCam.timeStamp = targTimestamps[i];
|
||||
thisCam.locations = new Vector4(newPos.X, newPos.Y, newPos.Z, 0.0f);
|
||||
targetcam.Add(thisCam);
|
||||
currPos += (uint)Marshal.SizeOf<M2SplineKey>();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,7 +103,6 @@ namespace Game.DataStorage
|
||||
positions[i] = new M2SplineKey(reader);
|
||||
|
||||
// Read the data for this set
|
||||
uint currPos = posArray.offset_elements;
|
||||
for (uint i = 0; i < posTsArray.number; ++i)
|
||||
{
|
||||
// Translate co-ordinates
|
||||
@@ -119,12 +116,9 @@ namespace Game.DataStorage
|
||||
if (targetcam.Count > 0)
|
||||
{
|
||||
// Find the target camera before and after this camera
|
||||
FlyByCamera lastTarget;
|
||||
FlyByCamera nextTarget;
|
||||
|
||||
// Pre-load first item
|
||||
lastTarget = targetcam[0];
|
||||
nextTarget = targetcam[0];
|
||||
FlyByCamera lastTarget = targetcam[0];
|
||||
FlyByCamera nextTarget = targetcam[0];
|
||||
for (int j = 0; j < targetcam.Count; ++j)
|
||||
{
|
||||
nextTarget = targetcam[j];
|
||||
@@ -159,7 +153,6 @@ namespace Game.DataStorage
|
||||
}
|
||||
|
||||
cameras.Add(thisCam);
|
||||
currPos += (uint)Marshal.SizeOf<M2SplineKey>();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user