Core/DataStores: Implemented new ContentTuning offset type

Port From (https://github.com/TrinityCore/TrinityCore/commit/584676e628a1ffd31800b18b7d6c7d00e9f390d1)
This commit is contained in:
Hondacrx
2024-08-25 14:07:58 -04:00
parent edb6934082
commit 2273f3f22d
2 changed files with 7 additions and 5 deletions
+3 -2
View File
@@ -1096,8 +1096,9 @@ namespace Game.DataStorage
static int getLevelAdjustment(ContentTuningCalcType type) => type switch
{
ContentTuningCalcType.PlusOne => 1,
ContentTuningCalcType.PlusMaxLevelForExpansion => (int)Global.ObjectMgr.GetMaxLevelForExpansion((Expansion)WorldConfig.GetUIntValue(WorldCfg.Expansion)),
ContentTuningCalcType.MinLevel => 1,
ContentTuningCalcType.MaxLevel => (int)Global.ObjectMgr.GetMaxLevelForExpansion((Expansion)WorldConfig.GetUIntValue(WorldCfg.Expansion)),
ContentTuningCalcType.PrevExpansionMaxLevel => (int)Global.ObjectMgr.GetMaxLevelForExpansion((Expansion)Math.Max(WorldConfig.GetUIntValue(WorldCfg.Expansion) - 1, 0)),
_ => 0
};