mirror of
https://github.com/edubart/otclient.git
synced 2025-12-21 07:57:12 +01:00
Fix protocol error #362
TODO: Handle the helpers in LUA, it could be added into Battle Window i think, if someone know where should this be comment here !
This commit is contained in:
@@ -323,6 +323,10 @@ void ProtocolGame::parseMessage(const InputMessagePtr& msg)
|
||||
case Proto::GameServerEnterGame:
|
||||
parseEnterGame(msg);
|
||||
break;
|
||||
// PROTOCOL>=1010
|
||||
case Proto::GameServerPlayerHelpers:
|
||||
parsePlayerHelpers(msg);
|
||||
break;
|
||||
// otclient ONLY
|
||||
case Proto::GameServerExtendedOpcode:
|
||||
parseExtendedOpcode(msg);
|
||||
@@ -379,6 +383,18 @@ void ProtocolGame::parseEnterGame(const InputMessagePtr& msg)
|
||||
}
|
||||
}
|
||||
|
||||
void ProtocolGame::parsePlayerHelpers(const InputMessagePtr& msg)
|
||||
{
|
||||
uint id = msg->getU32();
|
||||
int helpers = msg->getU16();
|
||||
|
||||
CreaturePtr creature = g_map.getCreatureById(id);
|
||||
if(creature)
|
||||
g_game.processPlayerHelpers(helpers);
|
||||
else
|
||||
g_logger.traceError("could not get creature");
|
||||
}
|
||||
|
||||
void ProtocolGame::parseGMActions(const InputMessagePtr& msg)
|
||||
{
|
||||
std::vector<uint8> actions;
|
||||
|
||||
Reference in New Issue
Block a user