123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- using System.Collections.Generic;
- using ET;
- namespace GFGGame
- {
- public static class RoleInfoSProxy
- {
- //请求个人信息
- public static async ETTask<bool> ReqPersonalInfo()
- {
- S2C_GetPersonalInfo response = null;
- response = (S2C_GetPersonalInfo)await MessageHelper.SendToServer(new C2S_GetPersonalInfo());
- if (response != null)
- {
- if (response.Error == ErrorCode.ERR_Success)
- {
- RoleDataManager.slogan = response.Signature;
- RoleDataManager.headId = response.HeadPortraitItemId;
- RoleDataManager.headBorderId = response.HeadPortraitBoxItemId;
- // RoleInfoManager.Instance.photoDatas=response.OpenAlbumList;
- return true;
- }
- }
- return false;
- }
- //请求其他玩家详细信息
- public static async ETTask<OtherRoleInfoDetailData> ReqOtherRoleDetailInfo(long friendId)
- {
- S2C_GetOtherRoleDetailInfo response = null;
- response = (S2C_GetOtherRoleDetailInfo)await MessageHelper.SendToServer(new C2S_GetOtherRoleDetailInfo() { RoleId = friendId });
- if (response != null)
- {
- if (response.Error == ErrorCode.ERR_Success)
- {
- OtherRoleInfoDetailData roleInfoDetail = new OtherRoleInfoDetailData();
- roleInfoDetail.slogan = response.Signature;
- roleInfoDetail.RoleLvl = response.RoleLvl;
- if (response.CustomSuit != null)
- {
- roleInfoDetail.customSuitData = new CustomSuitData(response.CustomSuit.Pos);
- roleInfoDetail.customSuitData.bg = response.CustomSuit.BgId;
- roleInfoDetail.customSuitData.suitId = response.CustomSuit.SuitId;
- roleInfoDetail.customSuitData.equipDatas = response.CustomSuit.EquipIds;
- roleInfoDetail.customSuitData.pic = response.CustomSuit.Pic;
- }
- return roleInfoDetail;
- }
- }
- return null;
- }
- //修改个人签名
- public static async ETTask<string> ReqModifySlogan(string slogan)
- {
- S2C_ModifySignature response = null;
- response = (S2C_ModifySignature)await MessageHelper.SendToServer(new C2S_ModifySignature() { Signature = slogan });
- if (response != null)
- {
- if (response.Error == ErrorCode.ERR_Success)
- {
- RoleDataManager.slogan = response.Signature;
- return RoleDataManager.slogan;
- }
- }
- return RoleDataManager.slogan;
- }
- //修改角色名称
- public static async ETTask<bool> ReqModifyRoleName(string name)
- {
- S2C_ModifyRoleName response = null;
- response = (S2C_ModifyRoleName)await MessageHelper.SendToServer(new C2S_ModifyRoleName() { Name = name });
- if (response != null)
- {
- if (response.Error == ErrorCode.ERR_Success)
- {
- RoleDataManager.roleName = response.Name;
- EventAgent.DispatchEvent(ConstMessage.CHANGE_ROLE_NAME);
- return true;
- }
- }
- return false;
- }
- //修改角色头像
- public static async ETTask<bool> ReqModifyRoleHead(int headId)
- {
- S2C_ModifyRoleName response = null;
- response = (S2C_ModifyRoleName)await MessageHelper.SendToServer(new C2S_ModifyRoleName() { });
- if (response != null)
- {
- if (response.Error == ErrorCode.ERR_Success)
- {
- RoleDataManager.roleName = response.Name;
- EventAgent.DispatchEvent(ConstMessage.CHANGE_ROLE_NAME);
- return true;
- }
- }
- return false;
- }
- //修改角色头像框
- public static async ETTask<bool> ReqModifyRoleHeadBorder(int HeadBorder)
- {
- S2C_ModifyRoleName response = null;
- response = (S2C_ModifyRoleName)await MessageHelper.SendToServer(new C2S_ModifyRoleName() { });
- if (response != null)
- {
- if (response.Error == ErrorCode.ERR_Success)
- {
- RoleDataManager.roleName = response.Name;
- EventAgent.DispatchEvent(ConstMessage.CHANGE_ROLE_NAME);
- return true;
- }
- }
- return false;
- }
- }
- }
|