Updated Bnet Server.

Port From (https://github.com/TrinityCore/TrinityCore)
This commit is contained in:
hondacrx
2024-02-21 00:05:48 -05:00
parent 7960e7b192
commit 9e3a7df6a7
62 changed files with 2186 additions and 731 deletions
+6 -2
View File
@@ -25,7 +25,7 @@ namespace Game
{
public partial class WorldSession : IDisposable
{
public WorldSession(uint id, string name, uint battlenetAccountId, WorldSocket sock, AccountTypes sec, Expansion expansion, long mute_time, string os, Locale locale, uint recruiter, bool isARecruiter)
public WorldSession(uint id, string name, uint battlenetAccountId, WorldSocket sock, AccountTypes sec, Expansion expansion, long mute_time, string os, TimeSpan timezoneOffset, Locale locale, uint recruiter, bool isARecruiter)
{
m_muteTime = mute_time;
AntiDOS = new DosProtection(this);
@@ -39,6 +39,7 @@ namespace Game
_os = os;
m_sessionDbcLocale = Global.WorldMgr.GetAvailableDbcLocale(locale);
m_sessionDbLocaleIndex = locale;
_timezoneOffset = timezoneOffset;
recruiterId = recruiter;
isRecruiter = isARecruiter;
expireTime = 60000; // 1 min after socket loss, session is deleted
@@ -897,6 +898,8 @@ namespace Game
public Locale GetSessionDbcLocale() { return m_sessionDbcLocale; }
public Locale GetSessionDbLocaleIndex() { return m_sessionDbLocaleIndex; }
public TimeSpan GetTimezoneOffset() { return _timezoneOffset; }
public uint GetLatency() { return m_latency; }
public void SetLatency(uint latency) { m_latency = latency; }
public void ResetTimeOutTime(bool onlyActive)
@@ -956,6 +959,7 @@ namespace Game
bool m_playerSave;
Locale m_sessionDbcLocale;
Locale m_sessionDbLocaleIndex;
TimeSpan _timezoneOffset;
uint m_latency;
AccountData[] _accountData = new AccountData[(int)AccountDataTypes.Max];
uint[] tutorials = new uint[SharedConst.MaxAccountTutorialValues];
@@ -1141,7 +1145,7 @@ namespace Game
stmt.AddValue(0, battlenetAccountId);
SetQuery(AccountInfoQueryLoad.Mounts, stmt);
stmt = LoginDatabase.GetPreparedStatement(LoginStatements.SelBnetCharacterCountsByAccountId);
stmt = LoginDatabase.GetPreparedStatement(LoginStatements.SEL_BNET_CHARACTER_COUNTS_BY_ACCOUNT_ID);
stmt.AddValue(0, accountId);
SetQuery(AccountInfoQueryLoad.GlobalRealmCharacterCounts, stmt);