From bedfbd46e818fe8267f067585d873c0929728e93 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Thu, 22 Jun 2017 12:49:52 -0400 Subject: [PATCH] Fix math error in ConnectToKey. Would not allow anyone over account id 1 to enter game. --- Game/Server/WorldSession.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Game/Server/WorldSession.cs b/Game/Server/WorldSession.cs index 959f0623a..f19f1adfa 100644 --- a/Game/Server/WorldSession.cs +++ b/Game/Server/WorldSession.cs @@ -881,12 +881,12 @@ namespace Game { public ulong Raw { - get { return ((ulong)AccountId) | ((ulong)connectionType << 32) | (Key << 33); } + get { return ((ulong)AccountId | ((ulong)connectionType << 32) | (Key << 33)); } set { - AccountId = (uint)(value & ((1 << 33) - 1)); - connectionType = (ConnectionType)(uint)((value >> 32) & ((1 << 1) - 1)); - Key = (uint)(value >> 33) & ((1 << 30) - 1); + AccountId = (uint)(value & 0xFFFFFFFF); + connectionType = (ConnectionType)(value & (1u >> 32)); + Key = (value >> 33); } }