Updated to PTR build 11655.

This commit is contained in:
tomrus88 2010-03-13 00:50:15 +03:00
parent e73c5d3b79
commit 768772b14b
12 changed files with 23 additions and 21 deletions

View file

@ -21705,5 +21705,3 @@ void Player::SetHomebindToLocation(WorldLocation const& loc, uint32 area_id)
CharacterDatabase.PExecute("UPDATE character_homebind SET map = '%u', zone = '%u', position_x = '%f', position_y = '%f', position_z = '%f' WHERE guid = '%u'",
m_homebindMapId, m_homebindAreaId, m_homebindX, m_homebindY, m_homebindZ, GetGUIDLow());
}

View file

@ -1093,6 +1093,7 @@ class MANGOS_DLL_SPEC Player : public Unit
// Played Time Stuff
time_t m_logintime;
time_t m_Last_tick;
uint32 m_Played_time[MAX_PLAYED_TIME_INDEX];
uint32 GetTotalPlayedTime() { return m_Played_time[PLAYED_TIME_TOTAL]; }
uint32 GetLevelPlayedTime() { return m_Played_time[PLAYED_TIME_LEVEL]; }

View file

@ -2661,9 +2661,9 @@ enum TotemSlot
// we need to stick to 1 version or half of the stuff will work for someone
// others will not and opposite
// will only support WoW, WoW:TBC and WoW:WotLK 3.3.3 client build 11643...
// will only support WoW, WoW:TBC and WoW:WotLK 3.3.3 client build 11655...
#define EXPECTED_MANGOSD_CLIENT_BUILD {11643, 0}
#define EXPECTED_MANGOSD_CLIENT_BUILD {11655, 0}
// max supported expansion level in mangosd
// NOTE: not set it more that supported by targeted client version with all expansions installed

View file

@ -19,7 +19,7 @@
#ifndef _UPDATEFIELDS_AUTO_H
#define _UPDATEFIELDS_AUTO_H
// Auto generated for version 0, 3, 3, 11643
// Auto generated for version 0, 3, 3, 11655
enum EObjectFields
{

View file

@ -49,7 +49,7 @@ enum eAuthResults
#define EXPECTED_REALMD_CLIENT_BUILD \
{ \
11643, /* 3.3.3 and higher */ \
11655, /* 3.3.3 and higher */ \
11159, /* 3.3.0a */ \
10505, /* 3.2.2a */ \
8606, /* 2.4.3 */ \

View file

@ -21,7 +21,7 @@
#include "Log.h"
#include "BigNumber.h"
AuthCrypt::AuthCrypt()
AuthCrypt::AuthCrypt() : _clientDecrypt(SHA_DIGEST_LENGTH), _serverEncrypt(SHA_DIGEST_LENGTH)
{
_initialized = false;
}
@ -33,13 +33,11 @@ AuthCrypt::~AuthCrypt()
void AuthCrypt::Init(BigNumber *K)
{
//uint8 ServerEncryptionKey[SEED_KEY_SIZE] = { 0x22, 0xBE, 0xE5, 0xCF, 0xBB, 0x07, 0x64, 0xD9, 0x00, 0x45, 0x1B, 0xD0, 0x24, 0xB8, 0xD5, 0x45 };
uint8 ServerEncryptionKey[SEED_KEY_SIZE] = { 0xCC, 0x98, 0xAE, 0x04, 0xE8, 0x97, 0xEA, 0xCA, 0x12, 0xDD, 0xC0, 0x93, 0x42, 0x91, 0x53, 0x57 };
HmacHash serverEncryptHmac(SEED_KEY_SIZE, (uint8*)ServerEncryptionKey);
uint8 *encryptHash = serverEncryptHmac.ComputeHash(K);
//uint8 ServerDecryptionKey[SEED_KEY_SIZE] = { 0xF4, 0x66, 0x31, 0x59, 0xFC, 0x83, 0x6E, 0x31, 0x31, 0x02, 0x51, 0xD5, 0x44, 0x31, 0x67, 0x98 };
uint8 ServerDecryptionKey[SEED_KEY_SIZE] = { 0xC2, 0xB3, 0x72, 0x3C, 0xC6, 0xAE, 0xD9, 0xB5, 0x34, 0x3C, 0x53, 0xEE, 0x2F, 0x43, 0x67, 0xCE };
HmacHash clientDecryptHmac(SEED_KEY_SIZE, (uint8*)ServerDecryptionKey);

View file

@ -164,7 +164,7 @@ bool BigNumber::isZero() const
return BN_is_zero(_bn)!=0;
}
uint8 *BigNumber::AsByteArray(int minSize)
uint8 *BigNumber::AsByteArray(int minSize, bool reverse)
{
int length = (minSize >= GetNumBytes()) ? minSize : GetNumBytes();
@ -181,6 +181,7 @@ uint8 *BigNumber::AsByteArray(int minSize)
BN_bn2bin(_bn, (unsigned char *)_array);
if (reverse)
std::reverse(_array, _array + length);
return _array;

View file

@ -81,7 +81,7 @@ class BigNumber
struct bignum_st *BN() { return _bn; }
uint32 AsDword();
uint8* AsByteArray(int minSize = 0);
uint8* AsByteArray(int minSize = 0, bool reverse = true);
const char *AsHexStr();
const char *AsDecStr();

View file

@ -21,10 +21,8 @@
HmacHash::HmacHash(uint32 len, uint8 *seed)
{
ASSERT(len == SEED_KEY_SIZE);
HMAC_CTX_init(&m_ctx);
HMAC_Init_ex(&m_ctx, seed, SEED_KEY_SIZE, EVP_sha1(), NULL);
HMAC_Init_ex(&m_ctx, seed, len, EVP_sha1(), NULL);
}
HmacHash::~HmacHash()
@ -42,6 +40,11 @@ void HmacHash::UpdateData(const uint8 *data, int length)
HMAC_Update(&m_ctx, data, length);
}
void HmacHash::UpdateData(const std::string &str)
{
UpdateData((uint8 const*)str.c_str(), str.length());
}
void HmacHash::Finalize()
{
uint32 length = 0;

View file

@ -34,6 +34,7 @@ class HmacHash
~HmacHash();
void UpdateBigNumber(BigNumber *bn);
void UpdateData(const uint8 *data, int length);
void UpdateData(const std::string &str);
void Finalize();
uint8 *ComputeHash(BigNumber *bn);
uint8 *GetDigest() { return (uint8*)m_digest; }

View file

@ -19,18 +19,18 @@
#include "Auth/SARC4.h"
#include <openssl/sha.h>
SARC4::SARC4()
SARC4::SARC4(uint8 len)
{
EVP_CIPHER_CTX_init(&m_ctx);
EVP_EncryptInit_ex(&m_ctx, EVP_rc4(), NULL, NULL, NULL);
EVP_CIPHER_CTX_set_key_length(&m_ctx, SHA_DIGEST_LENGTH);
EVP_CIPHER_CTX_set_key_length(&m_ctx, len);
}
SARC4::SARC4(uint8 *seed)
SARC4::SARC4(uint8 *seed, uint8 len)
{
EVP_CIPHER_CTX_init(&m_ctx);
EVP_EncryptInit_ex(&m_ctx, EVP_rc4(), NULL, NULL, NULL);
EVP_CIPHER_CTX_set_key_length(&m_ctx, SHA_DIGEST_LENGTH);
EVP_CIPHER_CTX_set_key_length(&m_ctx, len);
EVP_EncryptInit_ex(&m_ctx, NULL, NULL, seed, NULL);
}

View file

@ -25,8 +25,8 @@
class SARC4
{
public:
SARC4();
SARC4(uint8 *seed);
SARC4(uint8 len);
SARC4(uint8 *seed, uint8 len);
~SARC4();
void Init(uint8 *seed);
void UpdateData(int len, uint8 *data);