mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
More merge fixes
This commit is contained in:
parent
972510fdcc
commit
fbf658d1f0
5 changed files with 4 additions and 31 deletions
|
|
@ -1795,7 +1795,6 @@ bool ChatHandler::HandleTurnObjectCommand(const char* args)
|
|||
|
||||
obj->Relocate(obj->GetPositionX(), obj->GetPositionY(), obj->GetPositionZ(), o);
|
||||
|
||||
obj->SetFloatValue(GAMEOBJECT_FACING, o);
|
||||
obj->SetFloatValue(GAMEOBJECT_PARENTROTATION+2, rot2);
|
||||
obj->SetFloatValue(GAMEOBJECT_PARENTROTATION+3, rot3);
|
||||
|
||||
|
|
@ -1846,9 +1845,6 @@ bool ChatHandler::HandleMoveObjectCommand(const char* args)
|
|||
map->Remove(obj,false);
|
||||
|
||||
obj->Relocate(chr->GetPositionX(), chr->GetPositionY(), chr->GetPositionZ(), obj->GetOrientation());
|
||||
obj->SetFloatValue(GAMEOBJECT_POS_X, chr->GetPositionX());
|
||||
obj->SetFloatValue(GAMEOBJECT_POS_Y, chr->GetPositionY());
|
||||
obj->SetFloatValue(GAMEOBJECT_POS_Z, chr->GetPositionZ());
|
||||
|
||||
map->Add(obj);
|
||||
}
|
||||
|
|
@ -1872,9 +1868,6 @@ bool ChatHandler::HandleMoveObjectCommand(const char* args)
|
|||
map->Remove(obj,false);
|
||||
|
||||
obj->Relocate(x, y, z, obj->GetOrientation());
|
||||
obj->SetFloatValue(GAMEOBJECT_POS_X, x);
|
||||
obj->SetFloatValue(GAMEOBJECT_POS_Y, y);
|
||||
obj->SetFloatValue(GAMEOBJECT_POS_Z, z);
|
||||
|
||||
map->Add(obj);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -357,7 +357,7 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
|
|||
/*0x148*/ { "SMSG_ATTACKSWING_DEADTARGET", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x149*/ { "SMSG_ATTACKSWING_CANT_ATTACK", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x14A*/ { "SMSG_ATTACKERSTATEUPDATE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x14B*/ { "SMSG_VICTIMSTATEUPDATE_OBSOLETE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x14B*/ { "SMSG_BATTLEFIELD_PORT_DENIED", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x14C*/ { "SMSG_DAMAGE_DONE_OBSOLETE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x14D*/ { "SMSG_DAMAGE_TAKEN_OBSOLETE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x14E*/ { "SMSG_CANCEL_COMBAT", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
|
|
|
|||
|
|
@ -365,7 +365,7 @@ enum Opcodes
|
|||
SMSG_ATTACKSWING_DEADTARGET = 0x148,
|
||||
SMSG_ATTACKSWING_CANT_ATTACK = 0x149,
|
||||
SMSG_ATTACKERSTATEUPDATE = 0x14A,
|
||||
SMSG_VICTIMSTATEUPDATE_OBSOLETE = 0x14B,
|
||||
SMSG_BATTLEFIELD_PORT_DENIED = 0x14B,
|
||||
SMSG_DAMAGE_DONE_OBSOLETE = 0x14C,
|
||||
SMSG_DAMAGE_TAKEN_OBSOLETE = 0x14D,
|
||||
SMSG_CANCEL_COMBAT = 0x14E,
|
||||
|
|
|
|||
|
|
@ -18298,7 +18298,6 @@ void Player::SendInitialPacketsBeforeAddToMap()
|
|||
|
||||
SendInitialActionButtons();
|
||||
SendInitialReputations();
|
||||
SendInitWorldStates();
|
||||
m_achievementMgr.SendAllAchievementData();
|
||||
|
||||
uint32 newzone, newarea;
|
||||
|
|
|
|||
|
|
@ -33,51 +33,32 @@ AuthCrypt::~AuthCrypt()
|
|||
|
||||
void AuthCrypt::Init(BigNumber *K)
|
||||
{
|
||||
sLog.outDebug("SessionKey: %s", K->AsHexStr());
|
||||
|
||||
uint8 ServerEncryptionKey[SEED_KEY_SIZE] = { 0x22, 0xBE, 0xE5, 0xCF, 0xBB, 0x07, 0x64, 0xD9, 0x00, 0x45, 0x1B, 0xD0, 0x24, 0xB8, 0xD5, 0x45 };
|
||||
HmacHash serverEncryptHmac(SEED_KEY_SIZE, (uint8*)ServerEncryptionKey);
|
||||
uint8 *encryptHash = serverEncryptHmac.ComputeHash(K);
|
||||
|
||||
BigNumber eh;
|
||||
eh.SetBinary(encryptHash, SHA_DIGEST_LENGTH);
|
||||
sLog.outDebug("EncryptHash: %s", eh.AsHexStr());
|
||||
|
||||
uint8 ServerDecryptionKey[SEED_KEY_SIZE] = { 0xF4, 0x66, 0x31, 0x59, 0xFC, 0x83, 0x6E, 0x31, 0x31, 0x02, 0x51, 0xD5, 0x44, 0x31, 0x67, 0x98 };
|
||||
HmacHash clientDecryptHmac(SEED_KEY_SIZE, (uint8*)ServerDecryptionKey);
|
||||
uint8 *decryptHash = clientDecryptHmac.ComputeHash(K);
|
||||
|
||||
BigNumber dh;
|
||||
dh.SetBinary(decryptHash, SHA_DIGEST_LENGTH);
|
||||
sLog.outDebug("DecryptHash: %s", dh.AsHexStr());
|
||||
|
||||
SARC4 _serverDecrypt(encryptHash);
|
||||
_clientDecrypt.Init(decryptHash);
|
||||
_serverEncrypt.Init(encryptHash);
|
||||
SARC4 _clientEncrypt(decryptHash);
|
||||
|
||||
uint8 *syncBuf = new uint8[1024];
|
||||
uint8 syncBuf[1024];
|
||||
|
||||
memset(syncBuf, 0, 1024);
|
||||
|
||||
_serverEncrypt.UpdateData(1024, syncBuf);
|
||||
_clientEncrypt.UpdateData(1024, syncBuf);
|
||||
|
||||
BigNumber b1;
|
||||
b1.SetBinary(syncBuf, 16);
|
||||
sLog.outDebug("buf1: %s", b1.AsHexStr());
|
||||
|
||||
memset(syncBuf, 0, 1024);
|
||||
|
||||
_serverDecrypt.UpdateData(1024, syncBuf);
|
||||
_clientDecrypt.UpdateData(1024, syncBuf);
|
||||
|
||||
BigNumber b2;
|
||||
b2.SetBinary(syncBuf, 16);
|
||||
sLog.outDebug("buf2: %s", b2.AsHexStr());
|
||||
|
||||
_initialized = true;
|
||||
|
||||
delete[] syncBuf;
|
||||
}
|
||||
|
||||
void AuthCrypt::DecryptRecv(uint8 *data, size_t len)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue