1
This commit is contained in:
parent
8bed0f7052
commit
c8dbdbe5d6
@ -672,9 +672,15 @@ void Player::_CMGuildCreate(f8::MsgHdr& hdr, const cs::CMGuildCreate& msg)
|
|||||||
|
|
||||||
Player* hum = PlayerMgr::Instance()->GetPlayerBySocket(msg_context->socket_handle);
|
Player* hum = PlayerMgr::Instance()->GetPlayerBySocket(msg_context->socket_handle);
|
||||||
if (hum && hum->AccountId() == msg_context->account_id) {
|
if (hum && hum->AccountId() == msg_context->account_id) {
|
||||||
|
cs::SMGuildCreate respmsg;
|
||||||
|
respmsg.set_errcode(data.At("errcode")->AsXValue());
|
||||||
|
respmsg.set_errmsg(data.At("errmsg")->AsXValue());
|
||||||
|
if (data.At("errcode") == 0) {
|
||||||
hum->UpdateGuildData(msg_context->guild_id, kGuildOwner);
|
hum->UpdateGuildData(msg_context->guild_id, kGuildOwner);
|
||||||
hum->SaveToDB(a8::XParams(), nullptr, nullptr);
|
hum->SaveToDB(a8::XParams(), nullptr, nullptr);
|
||||||
cs::SMGuildCreate respmsg;
|
} else {
|
||||||
|
hum->ShowErrorMsg(data.At("errmsg")->AsXValue().GetString());
|
||||||
|
}
|
||||||
hum->SendMsg(respmsg);
|
hum->SendMsg(respmsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -686,8 +692,7 @@ void Player::_CMGuildCreate(f8::MsgHdr& hdr, const cs::CMGuildCreate& msg)
|
|||||||
|
|
||||||
Player* hum = PlayerMgr::Instance()->GetPlayerBySocket(msg_context->socket_handle);
|
Player* hum = PlayerMgr::Instance()->GetPlayerBySocket(msg_context->socket_handle);
|
||||||
if (hum && hum->AccountId() == msg_context->account_id) {
|
if (hum && hum->AccountId() == msg_context->account_id) {
|
||||||
cs::SMGuildCreate respmsg;
|
hum->ShowErrorMsg("服务器内部错误");
|
||||||
hum->SendMsg(respmsg);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
A8_SAFE_DELETE(msg_context);
|
A8_SAFE_DELETE(msg_context);
|
||||||
@ -823,10 +828,7 @@ void Player::_CMGuildSearch(f8::MsgHdr& hdr, const cs::CMGuildSearch& msg)
|
|||||||
|
|
||||||
Player* hum = PlayerMgr::Instance()->GetPlayerBySocket(msg_context->socket_handle);
|
Player* hum = PlayerMgr::Instance()->GetPlayerBySocket(msg_context->socket_handle);
|
||||||
if (hum && hum->AccountId() == msg_context->account_id) {
|
if (hum && hum->AccountId() == msg_context->account_id) {
|
||||||
cs::SMGuildSearch respmsg;
|
hum->ShowErrorMsg("服务器内部错误");
|
||||||
respmsg.set_errcode(1);
|
|
||||||
respmsg.set_errmsg("");
|
|
||||||
hum->SendMsg(respmsg);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
A8_SAFE_DELETE(msg_context);
|
A8_SAFE_DELETE(msg_context);
|
||||||
@ -888,11 +890,8 @@ void Player::_CMGuildRank(f8::MsgHdr& hdr, const cs::CMGuildRank& msg)
|
|||||||
MsgContext* msg_context = (MsgContext*)param.sender.GetUserData();
|
MsgContext* msg_context = (MsgContext*)param.sender.GetUserData();
|
||||||
|
|
||||||
Player* hum = PlayerMgr::Instance()->GetPlayerBySocket(msg_context->socket_handle);
|
Player* hum = PlayerMgr::Instance()->GetPlayerBySocket(msg_context->socket_handle);
|
||||||
if (hum) {
|
if (hum && hum->AccountId() == msg_context->account_id) {
|
||||||
cs::SMGuildRank respmsg;
|
hum->ShowErrorMsg("服务器内部错误");
|
||||||
respmsg.set_errcode(1);
|
|
||||||
respmsg.set_errmsg("");
|
|
||||||
hum->SendMsg(respmsg);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
A8_SAFE_DELETE(msg_context);
|
A8_SAFE_DELETE(msg_context);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user