Core: Update to 10.1
Port From (https://github.com/TrinityCore/TrinityCore/commit/16bc74667e8996b64258718e95b97258dfc0217a)
This commit is contained in:
@@ -366,13 +366,18 @@ namespace Game
|
||||
if (questXp == null || xpDifficulty >= 10)
|
||||
return 0;
|
||||
|
||||
uint xp = questXp.Difficulty[xpDifficulty];
|
||||
var contentTuning = CliDB.ContentTuningStorage.LookupByKey(contentTuningId);
|
||||
if (contentTuning != null)
|
||||
xp = (uint)(xp * contentTuning.QuestXpMultiplier);
|
||||
|
||||
int diffFactor = (int)(2 * (questLevel - player.GetLevel()) + 12);
|
||||
if (diffFactor < 1)
|
||||
diffFactor = 1;
|
||||
else if (diffFactor > 10)
|
||||
diffFactor = 10;
|
||||
|
||||
uint xp = (uint)(diffFactor * questXp.Difficulty[xpDifficulty] * xpMultiplier / 10);
|
||||
xp = (uint)(diffFactor * xp * xpMultiplier / 10);
|
||||
if (player.GetLevel() >= Global.ObjectMgr.GetMaxLevelForExpansion(PlayerConst.CurrentExpansion - 1) && player.GetSession().GetExpansion() == PlayerConst.CurrentExpansion && expansion >= 0 && expansion < (int)PlayerConst.CurrentExpansion)
|
||||
xp = (uint)(xp / 9.0f);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user