This commit is contained in:
aozhiwei 2022-05-19 11:57:00 +08:00
parent 80b1ab295e
commit d8df1702a5
5 changed files with 14 additions and 3 deletions

View File

@ -1528,6 +1528,9 @@ 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()));
TypeConvert::Convert(myself.temp_custom_data, *(user_info->mutable_temp_custom_data())); TypeConvert::Convert(myself.temp_custom_data, *(user_info->mutable_temp_custom_data()));
#if 1
user_info->mutable_base_data()->set_zid(zid);
#endif
{ {
int target_channel = f8::ExtractChannelIdFromAccountId(user_info->base_data().account_id()); int target_channel = f8::ExtractChannelIdFromAccountId(user_info->base_data().account_id());
App::Instance()->PreProcAvatarUrl App::Instance()->PreProcAvatarUrl

View File

@ -24,6 +24,7 @@ class Player
long ip_saddr = 0; long ip_saddr = 0;
int account_registertime = 0; int account_registertime = 0;
int red_point_flags_ = 0; int red_point_flags_ = 0;
int zid = 0;
int chat_channel = -1; int chat_channel = -1;
std::string private_target; std::string private_target;

View File

@ -286,6 +286,7 @@ void PlayerMgr::_CMLoginOld(f8::MsgHdr& hdr, const cs::CMLoginOld& msg)
new_msg.set_nickname(msg.nickname()); new_msg.set_nickname(msg.nickname());
new_msg.set_avatar_url(msg.avatar_url()); new_msg.set_avatar_url(msg.avatar_url());
new_msg.set_sex(msg.sex()); new_msg.set_sex(msg.sex());
//new_msg.set_zid(msg.zid());
_CMLogin(hdr, new_msg); _CMLogin(hdr, new_msg);
} }
@ -531,7 +532,8 @@ void PlayerMgr::AsyncLogin2(const cs::CMLogin& msg)
a8::XValue(data_set->at(0).at(10)).GetInt(), //guild_job a8::XValue(data_set->at(0).at(10)).GetInt(), //guild_job
a8::XValue(data_set->at(0).at(11)), //vip_lv a8::XValue(data_set->at(0).at(11)), //vip_lv
a8::XValue(data_set->at(0).at(12)), //head a8::XValue(data_set->at(0).at(12)), //head
a8::XValue(data_set->at(0).at(13)) //contribute a8::XValue(data_set->at(0).at(13)), //contribute
msg->zid() //zid
); );
} }
delete msg; delete msg;
@ -583,7 +585,8 @@ void PlayerMgr::AsyncLoginOnOk(const std::string& account_id,
int guild_job, int guild_job,
int vip_lv, int vip_lv,
int head, int head,
int contribute) int contribute,
int zid)
{ {
f8::MsgHdr* hdr = GetHdrByAccountId(account_id); f8::MsgHdr* hdr = GetHdrByAccountId(account_id);
if (hdr) { if (hdr) {
@ -605,6 +608,7 @@ void PlayerMgr::AsyncLoginOnOk(const std::string& account_id,
hum = new Player(); hum = new Player();
hum->socket_handle = hdr->socket_handle; hum->socket_handle = hdr->socket_handle;
hum->ip_saddr = hdr->ip_saddr; hum->ip_saddr = hdr->ip_saddr;
hum->zid = zid;
hum->gameid = f8::ExtractGameIdFromAccountId(account_id); hum->gameid = f8::ExtractGameIdFromAccountId(account_id);
hum->channel = f8::ExtractChannelIdFromAccountId(account_id); hum->channel = f8::ExtractChannelIdFromAccountId(account_id);
hum->myself.base_data.account_id = account_id; hum->myself.base_data.account_id = account_id;

View File

@ -104,7 +104,8 @@ class PlayerMgr : public a8::Singleton<PlayerMgr>
int guild_job, int guild_job,
int vip_lv, int vip_lv,
int head, int head,
int contribute); int contribute,
int zid);
void AsyncLoginOnError(const std::string& account_id, void AsyncLoginOnError(const std::string& account_id,
int step, int step,
int error_code, int error_code,

View File

@ -57,6 +57,7 @@ message MFBaseUserData
optional int32 vip_lv = 8 [default = 0]; // optional int32 vip_lv = 8 [default = 0]; //
optional int32 head = 9 [default = 0]; // optional int32 head = 9 [default = 0]; //
optional int32 contribute = 10 [default = 0]; // optional int32 contribute = 10 [default = 0]; //
optional int32 zid = 11 [default = 0]; //zid
optional int64 user_value1 = 50; //1 optional int64 user_value1 = 50; //1
optional int64 user_value2 = 51; //2 optional int64 user_value2 = 51; //2
@ -187,6 +188,7 @@ message CMLogin
optional string avatar_url = 7; // optional string avatar_url = 7; //
optional int32 vip_lv = 8; // optional int32 vip_lv = 8; //
optional int32 head = 9; // optional int32 head = 9; //
optional int32 zid = 10; //zid
} }
// //