From 0fbba700032fbd1be7910f3a05ad1f171ebb8055 Mon Sep 17 00:00:00 2001 From: conde2 Date: Tue, 11 Mar 2014 17:18:50 -0300 Subject: [PATCH] Fix protocol erros and try to fix walk delay Not implemented CreaturesType, just fixed the protocol error reported in #493, also try to fix #499 and #461 --- modules/game_interface/gameinterface.lua | 2 +- src/client/protocolcodes.h | 1 + src/client/protocolgame.h | 1 + src/client/protocolgameparse.cpp | 9 +++++++++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/modules/game_interface/gameinterface.lua b/modules/game_interface/gameinterface.lua index ab9795f2..9a107312 100644 --- a/modules/game_interface/gameinterface.lua +++ b/modules/game_interface/gameinterface.lua @@ -56,7 +56,7 @@ function init() end function bindKeys() - gameRootPanel:setAutoRepeatDelay(250) + gameRootPanel:setAutoRepeatDelay(80) bindWalkKey('Up', North) bindWalkKey('Right', East) diff --git a/src/client/protocolcodes.h b/src/client/protocolcodes.h index 67f2ec4e..ffe3aaa7 100644 --- a/src/client/protocolcodes.h +++ b/src/client/protocolcodes.h @@ -104,6 +104,7 @@ namespace Proto { GameServerCreatureUnpass = 146, GameServerCreatureMarks = 147, GameServerPlayerHelpers = 148, + GameServerCreatureType = 149, GameServerEditText = 150, GameServerEditList = 151, GameServerPlayerDataBasic = 159, // 950 diff --git a/src/client/protocolgame.h b/src/client/protocolgame.h index fd26ba30..e78cc631 100644 --- a/src/client/protocolgame.h +++ b/src/client/protocolgame.h @@ -126,6 +126,7 @@ public: void addPosition(const OutputMessagePtr& msg, const Position& position); private: + void parseCreatureType(const InputMessagePtr& msg); void parsePlayerHelpers(const InputMessagePtr& msg); void parseMessage(const InputMessagePtr& msg); void parsePendingGame(const InputMessagePtr& msg); diff --git a/src/client/protocolgameparse.cpp b/src/client/protocolgameparse.cpp index 579c8989..e5fec3c7 100644 --- a/src/client/protocolgameparse.cpp +++ b/src/client/protocolgameparse.cpp @@ -333,6 +333,9 @@ void ProtocolGame::parseMessage(const InputMessagePtr& msg) case Proto::GameServerCreatureMarks: parseCreaturesMark(msg); break; + case Proto::GameServerCreatureType: + parseCreatureType(msg); + break; // otclient ONLY case Proto::GameServerExtendedOpcode: parseExtendedOpcode(msg); @@ -1698,6 +1701,12 @@ void ProtocolGame::parseCreaturesMark(const InputMessagePtr& msg) } } +void ProtocolGame::parseCreatureType(const InputMessagePtr& msg) +{ + uint32 id = msg->getU32(); + uint8 type = msg->getU8(); +} + void ProtocolGame::setMapDescription(const InputMessagePtr& msg, int x, int y, int z, int width, int height) { int startz, endz, zstep;