Core/Client Builds: Move build info out of RealmList class

Port From (https://github.com/TrinityCore/TrinityCore/commit/82031dc720ac485c32158871aec86764c2505581)
This commit is contained in:
Hondacrx
2024-10-10 09:29:50 -04:00
parent 37d48ec371
commit 4540cd76e3
6 changed files with 155 additions and 154 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
// Copyright (c) CypherCore <http://github.com/CypherCore> All rights reserved.
// Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information.
using Framework.ClientBuild;
using Framework.Constants;
using Framework.Database;
using Game.Arenas;
@@ -1442,7 +1443,7 @@ namespace Game.Achievements
var currentRealm = Global.RealmMgr.GetCurrentRealm();
if (currentRealm == null)
return false;
if (reqValue < Global.RealmMgr.GetMinorMajorBugfixVersionForBuild(currentRealm.Build))
if (reqValue < ClientBuildHelper.GetMinorMajorBugfixVersionForBuild(currentRealm.Build))
return false;
break;
case ModifierTreeType.BattlePetTeamLevel: // 34
+3 -2
View File
@@ -1,6 +1,7 @@
// Copyright (c) CypherCore <http://github.com/CypherCore> All rights reserved.
// Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information.
using Framework.ClientBuild;
using Framework.Collections;
using Framework.Constants;
using Framework.Database;
@@ -3837,7 +3838,7 @@ namespace Game.Entities
stmt.AddValue(index++, m_activePlayerData.MultiActionBars);
var currentRealm = Global.RealmMgr.GetCurrentRealm();
if (currentRealm != null)
stmt.AddValue(index++, Global.RealmMgr.GetMinorMajorBugfixVersionForBuild(currentRealm.Build));
stmt.AddValue(index++, ClientBuildHelper.GetMinorMajorBugfixVersionForBuild(currentRealm.Build));
else
stmt.AddValue(index++, 0);
}
@@ -3998,7 +3999,7 @@ namespace Game.Entities
stmt.AddValue(index++, finiteAlways(_restMgr.GetRestBonus(RestTypes.Honor)));
var currentRealm = Global.RealmMgr.GetCurrentRealm();
if (currentRealm != null)
stmt.AddValue(index++, Global.RealmMgr.GetMinorMajorBugfixVersionForBuild(currentRealm.Build));
stmt.AddValue(index++, ClientBuildHelper.GetMinorMajorBugfixVersionForBuild(currentRealm.Build));
else
stmt.AddValue(index++, 0);
+1 -1
View File
@@ -482,7 +482,7 @@ namespace Game.Networking
AccountInfo account = new(result.GetFields());
ClientBuildInfo buildInfo = Global.RealmMgr.GetBuildInfo(account.game.Build);
ClientBuildInfo buildInfo = ClientBuildHelper.GetBuildInfo(account.game.Build);
if (buildInfo == null)
{
SendAuthResponseError(BattlenetRpcErrorCode.BadVersion);