Core/DataStores: Renamed sandbox scaling to content tuning

This commit is contained in:
Shauren
2018-09-16 17:04:44 +02:00
parent 8901e1d45e
commit 0c38fa1cf4
4 changed files with 12 additions and 12 deletions

View File

@@ -75,6 +75,7 @@ DB2Storage<ChrRacesEntry> sChrRacesStore("ChrRaces.db2", C
DB2Storage<ChrSpecializationEntry> sChrSpecializationStore("ChrSpecialization.db2", ChrSpecializationLoadInfo::Instance());
DB2Storage<CinematicCameraEntry> sCinematicCameraStore("CinematicCamera.db2", CinematicCameraLoadInfo::Instance());
DB2Storage<CinematicSequencesEntry> sCinematicSequencesStore("CinematicSequences.db2", CinematicSequencesLoadInfo::Instance());
DB2Storage<ContentTuningEntry> sContentTuningStore("ContentTuning.db2", ContentTuningLoadInfo::Instance());
DB2Storage<ConversationLineEntry> sConversationLineStore("ConversationLine.db2", ConversationLineLoadInfo::Instance());
DB2Storage<CreatureDisplayInfoEntry> sCreatureDisplayInfoStore("CreatureDisplayInfo.db2", CreatureDisplayInfoLoadInfo::Instance());
DB2Storage<CreatureDisplayInfoExtraEntry> sCreatureDisplayInfoExtraStore("CreatureDisplayInfoExtra.db2", CreatureDisplayInfoExtraLoadInfo::Instance());
@@ -201,7 +202,6 @@ DB2Storage<RewardPackEntry> sRewardPackStore("RewardPack.db2
DB2Storage<RewardPackXCurrencyTypeEntry> sRewardPackXCurrencyTypeStore("RewardPackXCurrencyType.db2", RewardPackXCurrencyTypeLoadInfo::Instance());
DB2Storage<RewardPackXItemEntry> sRewardPackXItemStore("RewardPackXItem.db2", RewardPackXItemLoadInfo::Instance());
DB2Storage<RulesetItemUpgradeEntry> sRulesetItemUpgradeStore("RulesetItemUpgrade.db2", RulesetItemUpgradeLoadInfo::Instance());
DB2Storage<SandboxScalingEntry> sSandboxScalingStore("SandboxScaling.db2", SandboxScalingLoadInfo::Instance());
DB2Storage<ScalingStatDistributionEntry> sScalingStatDistributionStore("ScalingStatDistribution.db2", ScalingStatDistributionLoadInfo::Instance());
DB2Storage<ScenarioEntry> sScenarioStore("Scenario.db2", ScenarioLoadInfo::Instance());
DB2Storage<ScenarioStepEntry> sScenarioStepStore("ScenarioStep.db2", ScenarioStepLoadInfo::Instance());
@@ -513,6 +513,7 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale)
LOAD_DB2(sChrSpecializationStore);
LOAD_DB2(sCinematicCameraStore);
LOAD_DB2(sCinematicSequencesStore);
LOAD_DB2(sContentTuningStore);
LOAD_DB2(sConversationLineStore);
LOAD_DB2(sCreatureDisplayInfoStore);
LOAD_DB2(sCreatureDisplayInfoExtraStore);
@@ -639,7 +640,6 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale)
LOAD_DB2(sRewardPackXCurrencyTypeStore);
LOAD_DB2(sRewardPackXItemStore);
LOAD_DB2(sRulesetItemUpgradeStore);
LOAD_DB2(sSandboxScalingStore);
LOAD_DB2(sScalingStatDistributionStore);
LOAD_DB2(sScenarioStore);
LOAD_DB2(sScenarioStepStore);

View File

@@ -65,6 +65,7 @@ TC_GAME_API extern DB2Storage<ChrRacesEntry> sChrRacesSto
TC_GAME_API extern DB2Storage<ChrSpecializationEntry> sChrSpecializationStore;
TC_GAME_API extern DB2Storage<CinematicCameraEntry> sCinematicCameraStore;
TC_GAME_API extern DB2Storage<CinematicSequencesEntry> sCinematicSequencesStore;
TC_GAME_API extern DB2Storage<ContentTuningEntry> sContentTuningStore;
TC_GAME_API extern DB2Storage<ConversationLineEntry> sConversationLineStore;
TC_GAME_API extern DB2Storage<CreatureDisplayInfoEntry> sCreatureDisplayInfoStore;
TC_GAME_API extern DB2Storage<CreatureDisplayInfoExtraEntry> sCreatureDisplayInfoExtraStore;
@@ -155,7 +156,6 @@ TC_GAME_API extern DB2Storage<QuestSortEntry> sQuestSortSt
TC_GAME_API extern DB2Storage<QuestXPEntry> sQuestXPStore;
TC_GAME_API extern DB2Storage<RandPropPointsEntry> sRandPropPointsStore;
TC_GAME_API extern DB2Storage<RewardPackEntry> sRewardPackStore;
TC_GAME_API extern DB2Storage<SandboxScalingEntry> sSandboxScalingStore;
TC_GAME_API extern DB2Storage<ScalingStatDistributionEntry> sScalingStatDistributionStore;
TC_GAME_API extern DB2Storage<ScenarioEntry> sScenarioStore;
TC_GAME_API extern DB2Storage<ScenarioStepEntry> sScenarioStepStore;

View File

@@ -2231,9 +2231,9 @@ uint32 Item::GetItemLevel(ItemTemplate const* itemTemplate, BonusData const& bon
else
level = std::min(std::max(int32(level), ssd->MinLevel), ssd->MaxLevel);
if (SandboxScalingEntry const* sandbox = sSandboxScalingStore.LookupEntry(bonusData.SandboxScalingId))
if ((sandbox->Flags & 2 || sandbox->MinLevel || sandbox->MaxLevel) && !(sandbox->Flags & 4))
level = std::min(std::max(int32(level), sandbox->MinLevel), sandbox->MaxLevel);
if (ContentTuningEntry const* contentTuning = sContentTuningStore.LookupEntry(bonusData.ContentTuningId))
if ((contentTuning->Flags & 2 || contentTuning->MinLevel || contentTuning->MaxLevel) && !(contentTuning->Flags & 4))
level = std::min(std::max(int32(level), contentTuning->MinLevel), contentTuning->MaxLevel);
if (uint32 heirloomIlvl = uint32(sDB2Manager.GetCurveValueAt(ssd->PlayerLevelToItemLevelCurveID, level)))
itemLevel = heirloomIlvl;
@@ -2598,9 +2598,9 @@ void Item::SetFixedLevel(uint8 level)
{
level = std::min(std::max(int32(level), ssd->MinLevel), ssd->MaxLevel);
if (SandboxScalingEntry const* sandbox = sSandboxScalingStore.LookupEntry(_bonusData.SandboxScalingId))
if ((sandbox->Flags & 2 || sandbox->MinLevel || sandbox->MaxLevel) && !(sandbox->Flags & 4))
level = std::min(std::max(int32(level), sandbox->MinLevel), sandbox->MaxLevel);
if (ContentTuningEntry const* contentTuning = sContentTuningStore.LookupEntry(_bonusData.ContentTuningId))
if ((contentTuning->Flags & 2 || contentTuning->MinLevel || contentTuning->MaxLevel) && !(contentTuning->Flags & 4))
level = std::min(std::max(int32(level), contentTuning->MinLevel), contentTuning->MaxLevel);
SetModifier(ITEM_MODIFIER_SCALING_STAT_DISTRIBUTION_FIXED_LEVEL, level);
}
@@ -2643,7 +2643,7 @@ void BonusData::Initialize(ItemTemplate const* proto)
AppearanceModID = 0;
RepairCostMultiplier = 1.0f;
ScalingStatDistribution = proto->GetScalingStatDistribution();
SandboxScalingId = 0;
ContentTuningId = 0;
RelicType = -1;
HasItemLevelBonus = false;
HasFixedLevel = false;
@@ -2731,7 +2731,7 @@ void BonusData::AddBonus(uint32 type, int32 const (&values)[3])
if (values[1] < _state.ScalingStatDistributionPriority)
{
ScalingStatDistribution = static_cast<uint32>(values[0]);
SandboxScalingId = static_cast<uint32>(values[2]);
ContentTuningId = static_cast<uint32>(values[2]);
_state.ScalingStatDistributionPriority = values[1];
HasFixedLevel = type == ITEM_BONUS_SCALING_STAT_DISTRIBUTION_FIXED;
}

View File

@@ -85,7 +85,7 @@ struct BonusData
uint32 AppearanceModID;
float RepairCostMultiplier;
uint32 ScalingStatDistribution;
uint32 SandboxScalingId;
uint32 ContentTuningId;
uint32 DisenchantLootId;
uint32 GemItemLevelBonus[MAX_ITEM_PROTO_SOCKETS];
int32 GemRelicType[MAX_ITEM_PROTO_SOCKETS];