Core/Players: Introduce configurable allied race starting level and fix default level selection for pandaren death knights
Port From (https://github.com/TrinityCore/TrinityCore/commit/bff8f2ff4ebc4144a2c1c31a65b78a1f0ed3f973)
This commit is contained in:
@@ -408,12 +408,12 @@ namespace Game
|
||||
Values[WorldCfg.StartPlayerLevel] = Values[WorldCfg.MaxPlayerLevel];
|
||||
}
|
||||
|
||||
Values[WorldCfg.StartDeathKnightPlayerLevel] = GetDefaultValue("StartDeathKnightPlayerLevel", 55);
|
||||
Values[WorldCfg.StartDeathKnightPlayerLevel] = GetDefaultValue("StartDeathKnightPlayerLevel", 8);
|
||||
if ((int)Values[WorldCfg.StartDeathKnightPlayerLevel] < 1)
|
||||
{
|
||||
Log.outError(LogFilter.ServerLoading, "StartDeathKnightPlayerLevel ({0}) must be in range 1..MaxPlayerLevel({1}). Set to 55.",
|
||||
Log.outError(LogFilter.ServerLoading, "StartDeathKnightPlayerLevel ({0}) must be in range 1..MaxPlayerLevel({1}). Set to 1.",
|
||||
Values[WorldCfg.StartDeathKnightPlayerLevel], Values[WorldCfg.MaxPlayerLevel]);
|
||||
Values[WorldCfg.StartDeathKnightPlayerLevel] = 55;
|
||||
Values[WorldCfg.StartDeathKnightPlayerLevel] = 1;
|
||||
}
|
||||
else if ((int)Values[WorldCfg.StartDeathKnightPlayerLevel] > (int)Values[WorldCfg.MaxPlayerLevel])
|
||||
{
|
||||
@@ -422,12 +422,12 @@ namespace Game
|
||||
Values[WorldCfg.StartDeathKnightPlayerLevel] = Values[WorldCfg.MaxPlayerLevel];
|
||||
}
|
||||
|
||||
Values[WorldCfg.StartDemonHunterPlayerLevel] = GetDefaultValue("StartDemonHunterPlayerLevel", 98);
|
||||
if ((int)Values[WorldCfg.StartDemonHunterPlayerLevel] < 98)
|
||||
Values[WorldCfg.StartDemonHunterPlayerLevel] = GetDefaultValue("StartDemonHunterPlayerLevel", 8);
|
||||
if ((int)Values[WorldCfg.StartDemonHunterPlayerLevel] < 1)
|
||||
{
|
||||
Log.outError(LogFilter.ServerLoading, "StartDemonHunterPlayerLevel ({0}) must be in range 98..MaxPlayerLevel({1}). Set to 98.",
|
||||
Log.outError(LogFilter.ServerLoading, "StartDemonHunterPlayerLevel ({0}) must be in range 1..MaxPlayerLevel({1}). Set to 1.",
|
||||
Values[WorldCfg.StartDemonHunterPlayerLevel], Values[WorldCfg.MaxPlayerLevel]);
|
||||
Values[WorldCfg.StartDemonHunterPlayerLevel] = 98;
|
||||
Values[WorldCfg.StartDemonHunterPlayerLevel] = 1;
|
||||
}
|
||||
else if ((int)Values[WorldCfg.StartDemonHunterPlayerLevel] > (int)Values[WorldCfg.MaxPlayerLevel])
|
||||
{
|
||||
@@ -436,6 +436,18 @@ namespace Game
|
||||
Values[WorldCfg.StartDemonHunterPlayerLevel] = Values[WorldCfg.MaxPlayerLevel];
|
||||
}
|
||||
|
||||
Values[WorldCfg.StartAlliedRaceLevel] = GetDefaultValue("StartAlliedRacePlayerLevel", 10);
|
||||
if ((int)Values[WorldCfg.StartAlliedRaceLevel] < 1)
|
||||
{
|
||||
Log.outError(LogFilter.ServerLoading, $"StartDemonHunterPlayerLevel ({Values[WorldCfg.StartAlliedRaceLevel]}) must be in range 1..MaxPlayerLevel({Values[WorldCfg.MaxPlayerLevel]}). Set to 1.");
|
||||
Values[WorldCfg.StartAlliedRaceLevel] = 1;
|
||||
}
|
||||
else if ((int)Values[WorldCfg.StartAlliedRaceLevel] > (int)Values[WorldCfg.MaxPlayerLevel])
|
||||
{
|
||||
Log.outError(LogFilter.ServerLoading, $"StartDemonHunterPlayerLevel ({Values[WorldCfg.StartAlliedRaceLevel]}) must be in range 1..MaxPlayerLevel({Values[WorldCfg.MaxPlayerLevel]}). Set to {Values[WorldCfg.MaxPlayerLevel]}.");
|
||||
Values[WorldCfg.StartAlliedRaceLevel] = Values[WorldCfg.MaxPlayerLevel];
|
||||
}
|
||||
|
||||
Values[WorldCfg.StartPlayerMoney] = GetDefaultValue("StartPlayerMoney", 0);
|
||||
if ((int)Values[WorldCfg.StartPlayerMoney] < 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user