1
This commit is contained in:
parent
15093454a3
commit
d83e8d047f
@ -611,7 +611,13 @@ void Player::_CMGroupRename(f8::MsgHdr& hdr, const cs::CMGroupRename& msg)
|
|||||||
|
|
||||||
void Player::_CMGuildInfo(f8::MsgHdr& hdr, const cs::CMGuildInfo& msg)
|
void Player::_CMGuildInfo(f8::MsgHdr& hdr, const cs::CMGuildInfo& msg)
|
||||||
{
|
{
|
||||||
|
cs::SMGuildInfo respmsg;
|
||||||
|
if (msg.guild_id() == 0 && GuildId() == 0) {
|
||||||
|
respmsg.set_errcode(1);
|
||||||
|
respmsg.set_errmsg("你还没有公会");
|
||||||
|
SendMsg(respmsg);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player::_CMGuildCreate(f8::MsgHdr& hdr, const cs::CMGuildCreate& msg)
|
void Player::_CMGuildCreate(f8::MsgHdr& hdr, const cs::CMGuildCreate& msg)
|
||||||
@ -852,6 +858,16 @@ void Player::ForwardGroupCMMsg(f8::MsgHdr& hdr, long long hash_code)
|
|||||||
MSConnMgr::Instance()->SendMsg(msg, hash_code);
|
MSConnMgr::Instance()->SendMsg(msg, hash_code);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Player::ForwardGuildCMMsg(f8::MsgHdr& hdr, long long hash_code)
|
||||||
|
{
|
||||||
|
ss::SS_IM_ForwardGuildCMMsg msg;
|
||||||
|
FillIMMsgConext(msg.mutable_context());
|
||||||
|
if (hdr.buflen > 0) {
|
||||||
|
msg.mutable_payload()->assign(hdr.buf, hdr.buflen);
|
||||||
|
}
|
||||||
|
MSConnMgr::Instance()->SendMsg(msg, hash_code);
|
||||||
|
}
|
||||||
|
|
||||||
void Player::FillMFUserInfo(cs::MFUserInfo* user_info)
|
void Player::FillMFUserInfo(cs::MFUserInfo* user_info)
|
||||||
{
|
{
|
||||||
TypeConvert::Convert(myself.base_data, *(user_info->mutable_base_data()));
|
TypeConvert::Convert(myself.base_data, *(user_info->mutable_base_data()));
|
||||||
@ -1143,6 +1159,11 @@ const std::string Player::AvatarUrl()
|
|||||||
return myself.base_data.avatar_url;
|
return myself.base_data.avatar_url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
long long Player::GuildId()
|
||||||
|
{
|
||||||
|
return myself.base_data.guild_id;
|
||||||
|
}
|
||||||
|
|
||||||
int Player::GetFriendNum()
|
int Player::GetFriendNum()
|
||||||
{
|
{
|
||||||
return friend_hash_.size();
|
return friend_hash_.size();
|
||||||
|
@ -127,12 +127,14 @@ class Player
|
|||||||
const std::string SessionId();
|
const std::string SessionId();
|
||||||
const std::string NickName();
|
const std::string NickName();
|
||||||
const std::string AvatarUrl();
|
const std::string AvatarUrl();
|
||||||
|
long long GuildId();
|
||||||
int GetFriendNum();
|
int GetFriendNum();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void FillFriendList(::google::protobuf::RepeatedPtrField< ::cs::MFUserInfo >* friend_list);
|
void FillFriendList(::google::protobuf::RepeatedPtrField< ::cs::MFUserInfo >* friend_list);
|
||||||
void FillBlackList(::google::protobuf::RepeatedPtrField< ::cs::MFUserInfo >* black_list);
|
void FillBlackList(::google::protobuf::RepeatedPtrField< ::cs::MFUserInfo >* black_list);
|
||||||
void ForwardGroupCMMsg(f8::MsgHdr& hdr, long long hash_code);
|
void ForwardGroupCMMsg(f8::MsgHdr& hdr, long long hash_code);
|
||||||
|
void ForwardGuildCMMsg(f8::MsgHdr& hdr, long long hash_code);
|
||||||
void SaveToDB(a8::XParams param, f8::AsyncDBOnOkFunc on_ok, f8::AsyncDBOnErrorFunc on_error);
|
void SaveToDB(a8::XParams param, f8::AsyncDBOnOkFunc on_ok, f8::AsyncDBOnErrorFunc on_error);
|
||||||
void FillApplyList(const cs::MFPaging& paging, cs::SMFriendApplyList& respmsg);
|
void FillApplyList(const cs::MFPaging& paging, cs::SMFriendApplyList& respmsg);
|
||||||
void MarkDirty();
|
void MarkDirty();
|
||||||
|
@ -347,7 +347,7 @@ message CMGuildInfo
|
|||||||
//获取公会信息返回
|
//获取公会信息返回
|
||||||
message SMGuildInfo
|
message SMGuildInfo
|
||||||
{
|
{
|
||||||
optional int32 errcode = 1; //1:公会已存在 2: 你已经有公会
|
optional int32 errcode = 1; //1:公会不存在
|
||||||
optional string errmsg = 2; //错误消息
|
optional string errmsg = 2; //错误消息
|
||||||
optional MFGuildBasic info = 3; //公会信息
|
optional MFGuildBasic info = 3; //公会信息
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user