Core/DataStores: Implemented new ContentTuning offset type
Port From (https://github.com/TrinityCore/TrinityCore/commit/584676e628a1ffd31800b18b7d6c7d00e9f390d1)
This commit is contained in:
@@ -1221,9 +1221,10 @@ namespace Framework.Constants
|
|||||||
|
|
||||||
public enum ContentTuningCalcType
|
public enum ContentTuningCalcType
|
||||||
{
|
{
|
||||||
Base = 0,
|
None = 0,
|
||||||
PlusOne = 1,
|
MinLevel = 1,
|
||||||
PlusMaxLevelForExpansion = 2
|
MaxLevel = 2,
|
||||||
|
PrevExpansionMaxLevel = 3
|
||||||
}
|
}
|
||||||
|
|
||||||
[Flags]
|
[Flags]
|
||||||
|
|||||||
@@ -1096,8 +1096,9 @@ namespace Game.DataStorage
|
|||||||
|
|
||||||
static int getLevelAdjustment(ContentTuningCalcType type) => type switch
|
static int getLevelAdjustment(ContentTuningCalcType type) => type switch
|
||||||
{
|
{
|
||||||
ContentTuningCalcType.PlusOne => 1,
|
ContentTuningCalcType.MinLevel => 1,
|
||||||
ContentTuningCalcType.PlusMaxLevelForExpansion => (int)Global.ObjectMgr.GetMaxLevelForExpansion((Expansion)WorldConfig.GetUIntValue(WorldCfg.Expansion)),
|
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
|
_ => 0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user