From 33610976bd96bd0ad9308fe9b4f28820b33675cb Mon Sep 17 00:00:00 2001 From: NingLeiXueR <348634371@qq.com> Date: Mon, 15 Jan 2024 11:08:01 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=80=E5=8D=95=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 简单修改 --- public/logic/public/public/chat/actor_chat.h | 22 ++++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/public/logic/public/public/chat/actor_chat.h b/public/logic/public/public/chat/actor_chat.h index 60f88365..d2bd66ba 100644 --- a/public/logic/public/public/chat/actor_chat.h +++ b/public/logic/public/public/chat/actor_chat.h @@ -43,12 +43,12 @@ namespace ngl virtual void loaddb_finish(bool adbishave) {} + bool handle( - i32_threadid athread, - const std::shared_ptr& apack, - mforward& adata) + message>& adata) { - pbnet::PROBUFF_NET_CHAT& recv = *adata.data(); + + pbnet::PROBUFF_NET_CHAT& recv = *adata.m_data->data(); if (recv.m_type() == pbnet::chat_speak) { auto pro = std::make_shared(); @@ -59,11 +59,11 @@ namespace ngl tab_chat* ltab = allcsv::tab(recv.m_channelid()); if (ltab == nullptr) { - send_client(adata.identifier(), pro); + send_client(adata.m_data->identifier(), pro); return true; } - roleitem* lroleitem = type_roleitems::get_roleinfo(adata.identifier()); + roleitem* lroleitem = type_roleitems::get_roleinfo(adata.m_data->identifier()); if (lroleitem == nullptr) { return true; @@ -72,7 +72,7 @@ namespace ngl int ltemputc = localtime::gettime() - lroleitem->m_lastspeakutc; if (ltemputc < ltab->m_time) { - send_client(adata.identifier(), pro); + send_client(adata.m_data->identifier(), pro); return true; } lroleitem->m_lastspeakutc = localtime::gettime(); @@ -88,7 +88,7 @@ namespace ngl lchatitem.set_m_roleid(lroleitem->m_info.m_id()); pro->set_m_stat(true); - send_client(adata.identifier(), pro); + send_client(adata.m_data->identifier(), pro); } else if (recv.m_type() == pbnet::get_chat_list) { @@ -100,7 +100,7 @@ namespace ngl auto itor_channelid = m_chatitem.find(recv.m_channelid()); if (itor_channelid == m_chatitem.end()) { - send_client(adata.identifier(), pro); + send_client(adata.m_data->identifier(), pro); return true; } for (pbnet::chatitem& item : itor_channelid->second) @@ -111,7 +111,7 @@ namespace ngl auto itor_update_channelid = m_update_chatitem.find(recv.m_channelid()); if (itor_update_channelid == m_update_chatitem.end()) { - send_client(adata.identifier(), pro); + send_client(adata.m_data->identifier(), pro); return true; } for (pbnet::chatitem& item : itor_update_channelid->second) @@ -120,7 +120,7 @@ namespace ngl } pro->set_m_stat(true); - send_client(adata.identifier(), pro); + send_client(adata.m_data->identifier(), pro); return true; }