mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 19:44:54 +02:00
textmessage
This commit is contained in:
@@ -97,9 +97,9 @@ void Game::processLogout()
|
||||
}
|
||||
}
|
||||
|
||||
void Game::processTextMessage(const std::string& message)
|
||||
void Game::processTextMessage(int type, const std::string& message)
|
||||
{
|
||||
g_lua.callGlobalField("Game","onTextMessage", message);
|
||||
g_lua.callGlobalField("Game","onTextMessage", type, message);
|
||||
}
|
||||
|
||||
void Game::walk(Otc::Direction direction)
|
||||
|
@@ -44,7 +44,7 @@ public:
|
||||
void processLogin(const LocalPlayerPtr& localPlayer);
|
||||
void processLogout();
|
||||
|
||||
void processTextMessage(const std::string& message);
|
||||
void processTextMessage(int type, const std::string& message);
|
||||
|
||||
void walk(Otc::Direction direction);
|
||||
void turn(Otc::Direction direction);
|
||||
|
@@ -734,11 +734,11 @@ void ProtocolGame::parseClosePrivateChannel(InputMessage& msg)
|
||||
|
||||
void ProtocolGame::parseTextMessage(InputMessage& msg)
|
||||
{
|
||||
msg.getU8(); // messageType
|
||||
uint8 type = msg.getU8();
|
||||
std::string message = msg.getString();
|
||||
|
||||
// must be scheduled because the map may not exist yet
|
||||
g_dispatcher.addEvent(std::bind(&Game::processTextMessage, &g_game, message));
|
||||
g_dispatcher.addEvent(std::bind(&Game::processTextMessage, &g_game, type, message));
|
||||
}
|
||||
|
||||
void ProtocolGame::parseCancelWalk(InputMessage& msg)
|
||||
|
Reference in New Issue
Block a user