1
This commit is contained in:
parent
155903906a
commit
f87ade8108
@ -94,7 +94,7 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
curl
|
||||
hiredis
|
||||
tinyxml2
|
||||
tcmalloc
|
||||
# tcmalloc
|
||||
behaviac_gcc_debug
|
||||
)
|
||||
else()
|
||||
|
@ -65,7 +65,6 @@ void Player::UnInit()
|
||||
delete pair.second;
|
||||
}
|
||||
friend_hash_.clear();
|
||||
NotifyOffline();
|
||||
}
|
||||
|
||||
void Player::Deserialize(const ss::MFUserDB& user_db)
|
||||
@ -763,46 +762,7 @@ void Player::InternalSendSSMsg(const Friend& friend_data,
|
||||
int msgid,
|
||||
::google::protobuf::Message& msg)
|
||||
{
|
||||
#if 0
|
||||
if (friend_data.server_key.empty()) {
|
||||
return;
|
||||
}
|
||||
IMConn* conn = IMConnMgr::Instance()->GetConnByKey(friend_data.server_key);
|
||||
if (conn) {
|
||||
conn->SendMsg(msgid, msg);
|
||||
}
|
||||
#endif
|
||||
#if 1
|
||||
{
|
||||
Player* hum = PlayerMgr::Instance()->GetPlayerByAccountId(friend_data.base_data.account_id);
|
||||
if (hum) {
|
||||
f8::NetMsgHandler* handler = f8::GetNetMsgHandler(&HandlerMgr::Instance()->imcmsghandler,
|
||||
msgid);
|
||||
if (!handler || handler->handlerid != HID_PlayerMgr) {
|
||||
return;
|
||||
}
|
||||
|
||||
f8::MsgHdr hdr;
|
||||
hdr.msgid = msgid;
|
||||
hdr.seqid = 0;
|
||||
hdr.socket_handle = 0;
|
||||
int packlen = msg.ByteSize();
|
||||
char* buff = nullptr;
|
||||
if (packlen) {
|
||||
buff = (char*)malloc(packlen);
|
||||
msg.SerializeToArray(buff, packlen);
|
||||
}
|
||||
hdr.buf = buff;
|
||||
hdr.buflen = packlen;
|
||||
hdr.offset = 0;
|
||||
hdr.ip_saddr = 0;
|
||||
ProcessNetMsg(handler, PlayerMgr::Instance(), hdr);
|
||||
if (buff) {
|
||||
free(buff);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
SyncHelper::Instance()->BroadcastIMConnMsg(msgid, msg);
|
||||
}
|
||||
|
||||
int Player::AddFriend(Friend* friendobj)
|
||||
@ -925,7 +885,9 @@ void Player::SyncOtherFriend()
|
||||
if (hum) {
|
||||
Friend* friend_data = hum->GetFriendById(AccountId());
|
||||
if (friend_data) {
|
||||
list_head node_copy = friend_data->watch_node;
|
||||
*friend_data = myself;
|
||||
friend_data->watch_node = node_copy;
|
||||
}
|
||||
hum->SendMsg(msg);
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ private:
|
||||
void SS_IM_FriendAgreeRequest_TimeOut(ss::SS_IM_FriendAgreeRequest* msg);
|
||||
void SS_IM_FriendDeleteRequest_TimeOut(ss::SS_IM_FriendDeleteRequest* msg);
|
||||
|
||||
private:
|
||||
public:
|
||||
template <typename T>
|
||||
void BroadcastIMConnMsg(T& msg)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user