Hello.
I want to downgrade latest tfs to 7.7 but I had some problems with RSA.
I added in otserv.cpp:
Protocol.cpp
protocolgame.cpp
protocollogin.cpp
rsa.cpp
rsa.h
Server return when want to login but client debug:
Those are not full files, only part with RSA.
I think that RSA is good beacuse I tested it changing some things in outputmessage:
remove add_handler and paste:
But after this and remove from protocolgame.cpp all :
I can login to char list and char is loading ~minute and nothing. In console it shows that : player logged in.
I need Your help.
I want to downgrade latest tfs to 7.7 but I had some problems with RSA.
I added in otserv.cpp:
Code:
http://wklej.to/WlXcT/text
Code:
http://wklej.to/MKZfI/text
Code:
http://wklej.to/0udYz/text
Code:
http://wklej.to/ifKKo/text
Code:
http://wklej.to/QqhrC/text
Code:
http://wklej.to/VVtcl/text
Code:
Error: [OutputMessage::add_handler] m_outputufferStart<0> < 2
I think that RSA is good beacuse I tested it changing some things in outputmessage:
remove add_handler and paste:
Code:
void writeMessageLength()
{
*(uint16_t*)(m_MsgBuf + 2) = m_MsgSize;
//added header size to the message size
m_MsgSize = m_MsgSize + 2;
m_outputBufferStart = 2;
}
void addCryptoHeader()
{
*(uint16_t*)(m_MsgBuf) = m_MsgSize;
m_MsgSize = m_MsgSize + 2;
m_outputBufferStart = 0;
}
Code:
void writeMessageLength() {
add_header((uint16_t)(m_MsgSize));
}
void addCryptoHeader() {
add_header((uint16_t)(m_MsgSize));
}
...
template <typename T>
inline void add_header(T add) {
if ((int32_t)m_outputBufferStart - (int32_t)sizeof(T) < 0) {
std::cout << "Error: [OutputMessage::add_header] m_outputBufferStart(" << m_outputBufferStart <<
") < " << sizeof(T) << std::endl;
return;
}
m_outputBufferStart = m_outputBufferStart - sizeof(T);
*(T*)(m_MsgBuf + m_outputBufferStart) = add;
//added header size to the message size
m_MsgSize = m_MsgSize + sizeof(T);
}
Code:
writeToOutputBuffer(msg)
I need Your help.