Fix - Writeable / Readable items

This commit is contained in:
Joao Pasqualini Costa 2013-10-21 22:25:12 -02:00
parent 3340e06da6
commit b3717ceb93
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();