1
This commit is contained in:
parent
42db9e92d0
commit
dfdaf261f5
@ -530,9 +530,9 @@ void Guild::_CMGuildKick(f8::MsgHdr& hdr, const cs::CMGuildKick& msg)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (sender == member) {
|
if (sender == member) {
|
||||||
SendErrorMsg(hdr.socket_handle, forward_msg->context(), TEXT("cant_kickout_self", "不能踢自己"));
|
SendErrorMsg(hdr.socket_handle, forward_msg->context(), TEXT("cannt_kickout_self", "不能踢自己"));
|
||||||
respmsg.set_errcode(3);
|
respmsg.set_errcode(3);
|
||||||
respmsg.set_errmsg(TEXT("cant_kickout_self", "不能踢自己"));
|
respmsg.set_errmsg(TEXT("cannt_kickout_self", "不能踢自己"));
|
||||||
GuildMgr::Instance()->ForwardGuildSMMsg(hdr.socket_handle,
|
GuildMgr::Instance()->ForwardGuildSMMsg(hdr.socket_handle,
|
||||||
forward_msg->context(),
|
forward_msg->context(),
|
||||||
respmsg);
|
respmsg);
|
||||||
@ -952,9 +952,9 @@ void Guild::_CMGuildMemberSetJob(f8::MsgHdr& hdr, const cs::CMGuildMemberSetJob&
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (sender == member) {
|
if (sender == member) {
|
||||||
SendErrorMsg(hdr.socket_handle, forward_msg->context(), TEXT("cant_setjob_self", "不能给自己任职"));
|
SendErrorMsg(hdr.socket_handle, forward_msg->context(), TEXT("cannt_setjob_self", "不能给自己任职"));
|
||||||
respmsg.set_errcode(3);
|
respmsg.set_errcode(3);
|
||||||
respmsg.set_errmsg(TEXT("cant_setjob_self", "不能给自己任职"));
|
respmsg.set_errmsg(TEXT("cannt_setjob_self", "不能给自己任职"));
|
||||||
GuildMgr::Instance()->ForwardGuildSMMsg(hdr.socket_handle,
|
GuildMgr::Instance()->ForwardGuildSMMsg(hdr.socket_handle,
|
||||||
forward_msg->context(),
|
forward_msg->context(),
|
||||||
respmsg);
|
respmsg);
|
||||||
|
@ -248,14 +248,14 @@ void Player::_CMFriendApply(f8::MsgHdr& hdr, const cs::CMFriendApply& msg)
|
|||||||
}
|
}
|
||||||
if (msg.friend_id() == AccountId()) {
|
if (msg.friend_id() == AccountId()) {
|
||||||
respmsg.set_errcode(2);
|
respmsg.set_errcode(2);
|
||||||
respmsg.set_errmsg(TEXT("cant_invite_self", "不能邀请自己"));
|
respmsg.set_errmsg(TEXT("cannt_invite_self", "不能邀请自己"));
|
||||||
SendMsg(respmsg);
|
SendMsg(respmsg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (f8::ExtractGameIdFromAccountId(AccountId()) !=
|
if (f8::ExtractGameIdFromAccountId(AccountId()) !=
|
||||||
f8::ExtractGameIdFromAccountId(msg.friend_id())) {
|
f8::ExtractGameIdFromAccountId(msg.friend_id())) {
|
||||||
respmsg.set_errcode(3);
|
respmsg.set_errcode(3);
|
||||||
respmsg.set_errmsg(TEXT("cant_invite_other_game_player", "不能邀请其他游戏玩家"));
|
respmsg.set_errmsg(TEXT("cannt_invite_other_game_player", "不能邀请其他游戏玩家"));
|
||||||
SendMsg(respmsg);
|
SendMsg(respmsg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -389,7 +389,7 @@ void Player::_CMFriendAgree(f8::MsgHdr& hdr, const cs::CMFriendAgree& msg)
|
|||||||
}
|
}
|
||||||
if (msg.apply().base_data().account_id() == AccountId()) {
|
if (msg.apply().base_data().account_id() == AccountId()) {
|
||||||
respmsg.set_errcode(2);
|
respmsg.set_errcode(2);
|
||||||
respmsg.set_errmsg(TEXT("cant_add_self", "不能添加自己"));
|
respmsg.set_errmsg(TEXT("cannt_add_self", "不能添加自己"));
|
||||||
SendMsg(respmsg);
|
SendMsg(respmsg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user