This commit is contained in:
aozhiwei 2020-06-22 19:54:16 +08:00
parent 8a39ab289d
commit f0501aaf11
7 changed files with 30 additions and 0 deletions

View File

@ -34,6 +34,11 @@ enum NetHandler_e
HID_SyncHelper HID_SyncHelper
}; };
enum ReadPointFlag
{
RPF_Apply = 0
};
const char* const PROJ_NAME_FMT = "friend_imserver"; const char* const PROJ_NAME_FMT = "friend_imserver";
const char* const PROJ_ROOT_FMT = "/data/logs/%s"; const char* const PROJ_ROOT_FMT = "/data/logs/%s";

View File

@ -213,6 +213,8 @@ void Player::_CMFriendApplyList(f8::MsgHdr& hdr, const cs::CMFriendApplyList& ms
hum->FillApplyList(*paging, respmsg); hum->FillApplyList(*paging, respmsg);
hum->SendMsg(respmsg); hum->SendMsg(respmsg);
hum->apply_list_.clear(); hum->apply_list_.clear();
a8::UnSetBitFlag(hum->red_point_flags_, RPF_Apply);
hum->SyncRedPoint();
} }
delete paging; delete paging;
}; };
@ -546,6 +548,11 @@ void Player::_SS_IM_FriendDeleteRequest(f8::MsgHdr& hdr, const ss::SS_IM_FriendD
); );
} }
void Player::_SS_IM_FriendApply(f8::MsgHdr& hdr, const ss::SS_IM_FriendApply& msg)
{
}
void Player::ReLogin(f8::MsgHdr& hdr, const cs::CMLogin& msg) void Player::ReLogin(f8::MsgHdr& hdr, const cs::CMLogin& msg)
{ {
cs::SMLogin respmsg; cs::SMLogin respmsg;

View File

@ -91,6 +91,7 @@ class Player
void _SS_IM_FriendAgreeRequest(f8::MsgHdr& hdr, const ss::SS_IM_FriendAgreeRequest& msg); void _SS_IM_FriendAgreeRequest(f8::MsgHdr& hdr, const ss::SS_IM_FriendAgreeRequest& msg);
void _SS_IM_FriendDeleteRequest(f8::MsgHdr& hdr, const ss::SS_IM_FriendDeleteRequest& msg); void _SS_IM_FriendDeleteRequest(f8::MsgHdr& hdr, const ss::SS_IM_FriendDeleteRequest& msg);
void _SS_IM_FriendApply(f8::MsgHdr& hdr, const ss::SS_IM_FriendApply& msg);
void ReLogin(f8::MsgHdr& hdr, const cs::CMLogin& msg); void ReLogin(f8::MsgHdr& hdr, const cs::CMLogin& msg);
void NotifyOnline(); void NotifyOnline();

View File

@ -73,6 +73,14 @@ void PlayerMgr::_SS_IM_FriendDeleteRequest(f8::MsgHdr& hdr, const ss::SS_IM_Frie
} }
} }
void PlayerMgr::_SS_IM_FriendApply(f8::MsgHdr& hdr, const ss::SS_IM_FriendApply& msg)
{
Player* hum = GetPlayerByAccountId(msg.target_id());
if (hum) {
hum->_SS_IM_FriendApply(hdr, msg);
}
}
void PlayerMgr::_SS_IM_UpdateUserInfo(f8::MsgHdr& hdr, const ss::SS_IM_UpdateUserInfo& msg) void PlayerMgr::_SS_IM_UpdateUserInfo(f8::MsgHdr& hdr, const ss::SS_IM_UpdateUserInfo& msg)
{ {
auto itr = watch_players_.find(msg.user_info().base_data().account_id()); auto itr = watch_players_.find(msg.user_info().base_data().account_id());

View File

@ -14,6 +14,7 @@ namespace ss
class SS_IM_UpdateUserInfo; class SS_IM_UpdateUserInfo;
class SS_IM_FriendAgreeRequest; class SS_IM_FriendAgreeRequest;
class SS_IM_FriendDeleteRequest; class SS_IM_FriendDeleteRequest;
class SS_IM_FriendApply;
} }
class Player; class Player;
@ -36,6 +37,7 @@ class PlayerMgr : public a8::Singleton<PlayerMgr>
void _SS_IM_SendCustomMsg(f8::MsgHdr& hdr, const ss::SS_IM_SendCustomMsg& msg); void _SS_IM_SendCustomMsg(f8::MsgHdr& hdr, const ss::SS_IM_SendCustomMsg& msg);
void _SS_IM_FriendAgreeRequest(f8::MsgHdr& hdr, const ss::SS_IM_FriendAgreeRequest& msg); void _SS_IM_FriendAgreeRequest(f8::MsgHdr& hdr, const ss::SS_IM_FriendAgreeRequest& msg);
void _SS_IM_FriendDeleteRequest(f8::MsgHdr& hdr, const ss::SS_IM_FriendDeleteRequest& msg); void _SS_IM_FriendDeleteRequest(f8::MsgHdr& hdr, const ss::SS_IM_FriendDeleteRequest& msg);
void _SS_IM_FriendApply(f8::MsgHdr& hdr, const ss::SS_IM_FriendApply& msg);
void _SS_IM_UpdateUserInfo(f8::MsgHdr& hdr, const ss::SS_IM_UpdateUserInfo& msg); void _SS_IM_UpdateUserInfo(f8::MsgHdr& hdr, const ss::SS_IM_UpdateUserInfo& msg);

View File

@ -34,4 +34,5 @@ enum SSMessageId_e
_SS_IM_FriendAgreeResponse = 1017; _SS_IM_FriendAgreeResponse = 1017;
_SS_IM_FriendDeleteRequest = 1018; _SS_IM_FriendDeleteRequest = 1018;
_SS_IM_FriendDeleteResponse = 1019; _SS_IM_FriendDeleteResponse = 1019;
_SS_IM_FriendApply = 1020;
} }

View File

@ -228,3 +228,9 @@ message SS_IM_FriendDeleteResponse
optional MFIMMsgConext context = 1; optional MFIMMsgConext context = 1;
optional string target_id = 3; optional string target_id = 3;
} }
message SS_IM_FriendApply
{
optional MFIMMsgConext context = 1;
optional string target_id = 3;
}