Started 1050 implementation and fix ups:

* Dat now loads (new animations aren't yet functional).
* Fixed the way we reference client versions.

TODO: Write new animation functionality & find out protocol changes.
This commit is contained in:
BenDol
2014-08-03 10:02:28 +12:00
parent fe585d27d8
commit d7429c201c
31 changed files with 316 additions and 121 deletions

View File

@@ -201,7 +201,7 @@ std::string Crypt::_encrypt(const std::string& decrypted_string, bool useMachine
{
std::string tmp = "0000" + decrypted_string;
uint32 sum = stdext::adler32((const uint8*)decrypted_string.c_str(), decrypted_string.size());
stdext::writeLE32((uint8*)&tmp[0], sum);
stdext::writeULE32((uint8*)&tmp[0], sum);
std::string encrypted = base64Encode(xorCrypt(tmp, getCryptKey(useMachineUUID)));
return encrypted;
}
@@ -211,7 +211,7 @@ std::string Crypt::_decrypt(const std::string& encrypted_string, bool useMachine
std::string decoded = base64Decode(encrypted_string);
std::string tmp = xorCrypt(base64Decode(encrypted_string), getCryptKey(useMachineUUID));
if(tmp.length() >= 4) {
uint32 readsum = stdext::readLE32((const uint8*)tmp.c_str());
uint32 readsum = stdext::readULE32((const uint8*)tmp.c_str());
std::string decrypted_string = tmp.substr(4);
uint32 sum = stdext::adler32((const uint8*)decrypted_string.c_str(), decrypted_string.size());
if(readsum == sum)