Merge pull request #365 from conde2/master

Fix - Writeable / Readable items Issues: #362 and #364
This commit is contained in:
Henrique Santiago 2013-10-21 17:29:13 -07:00
commit 84b722f8c7
1 changed files with 9 additions and 2 deletions

View File

@ -323,7 +323,6 @@ void ProtocolGame::parseMessage(const InputMessagePtr& msg)
case Proto::GameServerEnterGame:
parseEnterGame(msg);
break;
// PROTOCOL>=1010
case Proto::GameServerPlayerHelpers:
parsePlayerHelpers(msg);
break;
@ -978,7 +977,15 @@ void ProtocolGame::parseCreatureUnpass(const InputMessagePtr& msg)
void ProtocolGame::parseEditText(const InputMessagePtr& msg)
{
uint id = msg->getU32();
int itemId = msg->getU16();
int itemId;
if(g_game.getProtocolVersion() >= 1010) {
// TODO: processEditText with ItemPtr as parameter
ItemPtr item = getItem(msg);
itemId = item->getId();
} else
itemId = msg->getU16();
int maxLength = msg->getU16();
std::string text = msg->getString();
std::string writter = msg->getString();