diff --git a/src/otclient/net/protocolgame.h b/src/otclient/net/protocolgame.h index f51d8918..c9453cf7 100644 --- a/src/otclient/net/protocolgame.h +++ b/src/otclient/net/protocolgame.h @@ -54,7 +54,6 @@ public: void sendTurnEast(); void sendTurnSouth(); void sendTurnWest(); - void sendTalk(int channelType, const std::string& message, int channelId = 0, const std::string& receiver = ""); void sendAddVip(const std::string& name); void sendRemoveVip(int id); diff --git a/src/otclient/net/protocolgamesend.cpp b/src/otclient/net/protocolgamesend.cpp index 14fa9c81..d18663af 100644 --- a/src/otclient/net/protocolgamesend.cpp +++ b/src/otclient/net/protocolgamesend.cpp @@ -158,35 +158,6 @@ void ProtocolGame::sendTurnWest() send(oMsg); } -void ProtocolGame::sendTalk(int channelType, const std::string& message, int channelId, const std::string& receiver) -{ - // Game.getProtocolGame():sendTalk(1, "lalala", 0, "ignore") - // TODO: MAKE SURE IT WAS AN USER EVENT AND NOT DIRECTLY FROM SCRIPT. - - if(message.length() > 255 && message.length() <= 0) - return; - - OutputMessage oMsg; - oMsg.addU8(Otc::ClientTalk); - - assert(channelType >= 0); - oMsg.addU8(channelType); - - switch(channelType) { - case Otc::SpeakPrivate: - case Otc::SpeakPrivateRed: - oMsg.addString(receiver); - break; - case Otc::SpeakChannelYellow: - case Otc::SpeakChannelRed: - oMsg.addU16(channelId); - break; - } - - oMsg.addString(message); - send(oMsg); -} - void ProtocolGame::sendAddVip(const std::string& name) { OutputMessage oMsg; diff --git a/src/otclient/otclientluafunctions.cpp b/src/otclient/otclientluafunctions.cpp index e3a4242d..186f893f 100644 --- a/src/otclient/otclientluafunctions.cpp +++ b/src/otclient/otclientluafunctions.cpp @@ -49,7 +49,6 @@ void OTClient::registerLuaFunctions() g_lua.bindClassMemberFunction("cancelLogin", &ProtocolLogin::cancelLogin); g_lua.registerClass(); - g_lua.bindClassMemberFunction("sendTalk", &ProtocolGame::sendTalk); g_lua.registerClass(); g_lua.registerClass(); @@ -64,7 +63,6 @@ void OTClient::registerLuaFunctions() g_lua.bindClassStaticFunction("logout", std::bind(&Game::logout, &g_game, _1)); g_lua.bindClassStaticFunction("cancelLogin", std::bind(&Game::cancelLogin, &g_game)); g_lua.bindClassStaticFunction("isOnline", std::bind(&Game::isOnline, &g_game)); - g_lua.bindClassStaticFunction("getProtocolGame", std::bind(&Game::getProtocolGame, &g_game)); g_lua.registerClass(); g_lua.bindClassStaticFunction("create", &UIWidget::create);