mirror of
https://github.com/edubart/otclient.git
synced 2025-11-03 04:06:23 +01:00
protocol login at lua
This commit is contained in:
@@ -151,6 +151,15 @@ void Protocol::generateXteaKey()
|
||||
m_xteaKey[3] = unif(eng);
|
||||
}
|
||||
|
||||
std::vector<int> Protocol::getXteaKey()
|
||||
{
|
||||
std::vector<int> xteaKey;
|
||||
xteaKey.resize(4);
|
||||
for(int i = 0; i < 4; ++i)
|
||||
xteaKey[i] = m_xteaKey[i];
|
||||
return xteaKey;
|
||||
}
|
||||
|
||||
bool Protocol::xteaDecrypt(const InputMessagePtr& inputMessage)
|
||||
{
|
||||
uint16 encryptedSize = inputMessage->getUnreadSize();
|
||||
@@ -215,3 +224,8 @@ void Protocol::xteaEncrypt(const OutputMessagePtr& outputMessage)
|
||||
readPos = readPos + 2;
|
||||
}
|
||||
}
|
||||
|
||||
void Protocol::onConnect()
|
||||
{
|
||||
callLuaField("onConnect");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user