/// <summary> /// 修改资料 /// </summary> /// <param name="unick"></param> /// <param name="uface"></param> /// <param name="usex"></param> public void EditProfile(string unick, int uface, int usex) { if (unick.Length <= 0) { return; } if (uface < 0 || uface > 7) { return; } if (usex != 0 && usex != 1) { return; } _editProfileReq = new EditProfileReq { usex = usex, uface = uface, unick = unick }; NetworkMgr.Instance.SendProtobufCmd( (int)ServiceType.Auth, (int)LoginCmd.eEditProfileReq, _editProfileReq); }
public void edit_profile(string unick, int uface, int usex) { if (unick.Length <= 0) { return; } if (uface <= 0 || uface > 9) { return; } if (usex != 0 && usex != 1) { return; } //提交我们修改资料的请求 EditProfileReq req = new EditProfileReq(); req.unick = unick; req.uface = uface; req.usex = usex; this.tmp_req = req; Debug.LogError(unick + " " + uface + " " + usex); network.Instance.send_protobuf_cmd(Stype.Auth, Cmd.eEditProfileReq, req); //end }
public void EditProfile(string unick, int uface, int usex) { if (unick.Length <= 0) { return; } if (uface <= 0 || uface > 9) { return; } if (usex != 0 && usex != 1) { return; } //提交修改资料的请求 EditProfileReq req = new EditProfileReq(); req.unick = unick; req.uface = uface; req.usex = usex; this._tempReq = req; network.Instance.SendProtobufCmd((int)Stype.Auth, (int)Cmd .eEditProfileReq, req); }
void on_edit_profile_return(cmd_msg msg) { EditProfileRes res = proto_man.protobuf_deserialize <EditProfileRes>(msg.body); if (res == null) { return; } if (res.status != Respones.OK) { Debug.Log("edit profile status: " + res.status); return; } ugame.Instance.save_edit_profile(this.temp_req.unick, this.temp_req.uface, this.temp_req.usex); this.temp_req = null; event_manager.Instance.dispatch_event("sync_uinfo", null); }
private void OnEditProfileReturn(cmd_msg msg) { EditProfileRes res = proto_man .protobuf_deserialize <EditProfileRes>(msg.body); if (res == null) { return; } if (res.status != Response.OK) { Debug.Log("Edit Profile status:" + res.status); return; } UGame.Instance.SaveEditProfile(this._tempReq.unick, this ._tempReq.uface, this._tempReq.usex); this._tempReq = null; EventManager.Instance.DispatchEvent("sync_uinfo", null); }
/// <summary> /// 修改信息服务器回调 /// </summary> /// <param name="pk"></param> private void OnEditProfileReturn(CmdPackageProtocol.CmdPackage pk) { var res = CmdPackageProtocol.ProtobufDeserialize <EditProfileRes>(pk.body); if (null == res) { Debug.LogError("解码失败"); return; } if (res.status != Responce.Ok) { Debug.LogError("Error Status: " + res.status); return; } Assert.IsNotNull(_editProfileReq); NetInfo.SaveEditProfile(_editProfileReq.unick, _editProfileReq.uface, _editProfileReq.usex); _editProfileReq = null; //通知更新 CEventCenter.BroadMessage(Message.SyncAuthInfo); }
public void edit_profile(string unick, int uface, int usex) { if (unick.Length < 1) { return; } if (uface <= 0 || uface > 9) { return; } if (usex != 0 && usex != 1) { return; } EditProfileReq req = new EditProfileReq(); req.unick = unick; req.uface = uface; req.usex = usex; this.editProfileReq = req; network.Instance.send_protobuf_cmd((int)Stype.Auth, (int)Cmd.eEditProfileReq, req); }