mirror of
https://github.com/edubart/otclient.git
synced 2025-10-15 20:14:54 +02:00
Fixes! Closes #235 and more:
* Hotkeys now save by server & player rather than just player * Added double clicking to module dialog options * Fixed a bug in the modal dialog for > pv970 (protocol changed) * Fixed a login bug for pv970. WARNING: Will remove all your current hotkeys.
This commit is contained in:
@@ -1500,20 +1500,26 @@ void ProtocolGame::parseShowModalDialog(const InputMessagePtr& msg)
|
||||
choiceList.push_back(std::make_tuple(id, value));
|
||||
}
|
||||
|
||||
int enterButton = msg->getU8();
|
||||
int escapeButton = msg->getU8();
|
||||
int enterButton, escapeButton;
|
||||
if(g_game.getProtocolVersion() > 970) {
|
||||
escapeButton = msg->getU8();
|
||||
enterButton = msg->getU8();
|
||||
}
|
||||
else {
|
||||
enterButton = msg->getU8();
|
||||
escapeButton = msg->getU8();
|
||||
}
|
||||
|
||||
msg->getU8(); // popup value (no clue what it is for)
|
||||
|
||||
std::map<int, std::string>::iterator itEnter = buttonList.find(enterButton);
|
||||
if(itEnter == buttonList.end())
|
||||
{
|
||||
if(itEnter == buttonList.end()) {
|
||||
g_logger.info(stdext::format("Enter button does not exist for dialog id: %d", id));
|
||||
return;
|
||||
}
|
||||
|
||||
std::map<int, std::string >::iterator itEscape = buttonList.find(escapeButton);
|
||||
if(itEscape == buttonList.end())
|
||||
{
|
||||
if(itEscape == buttonList.end()) {
|
||||
g_logger.info(stdext::format("Escape button does not exist for dialog id: %d", id));
|
||||
return;
|
||||
}
|
||||
|
@@ -64,7 +64,7 @@ void ProtocolGame::sendLoginPacket(uint challengeTimestamp, uint8 challengeRando
|
||||
|
||||
msg->addU16(g_game.getProtocolVersion());
|
||||
|
||||
if(g_game.getProtocolVersion() >= 970) {
|
||||
if(g_game.getProtocolVersion() >= 971) {
|
||||
msg->addU32(g_game.getClientVersion());
|
||||
msg->addU8(0); // clientType
|
||||
}
|
||||
|
Reference in New Issue
Block a user