Core/Auth: Refactor client auth key storage to support more future client variants and preserve more information about client version
Port From (https://github.com/TrinityCore/TrinityCore/commit/8e1595265925e0840d07e943b8c9ff1e906d4719)
This commit is contained in:
@@ -438,6 +438,21 @@ namespace System
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
public static int fourcc(this string str)
|
||||
{
|
||||
//if (length > sizeof(uint))
|
||||
// throw "Text can only be max 4 characters long";
|
||||
|
||||
int intValue = 0;
|
||||
foreach (char c in str.ToCharArray())
|
||||
{
|
||||
intValue <<= 8;
|
||||
intValue |= c;
|
||||
}
|
||||
|
||||
return intValue;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region BinaryReader
|
||||
|
||||
Reference in New Issue
Block a user