private bool OnPlayerDetailRsp(GetPlayerDetailDataRsp rsp) { if ((rsp.get_retcode() == null) && (this._playerUidToShow == rsp.get_detail().get_uid())) { this._playerUidToShow = -1; FriendDetailDataItem detailData = new FriendDetailDataItem(rsp.get_detail()); return(this.ShowFriendDetailInfo(detailData)); } return(false); }
public static GetPlayerDetailDataRsp GetFakePlayerDetailDataRsp(uint targetID) { GetPlayerDetailDataRsp rsp = new GetPlayerDetailDataRsp(); rsp.set_detail(new PlayerDetailData()); rsp.get_detail().set_uid(targetID); rsp.get_detail().set_leader_avatar(new AvatarDetailData()); rsp.get_detail().get_leader_avatar().set_avatar_id(0x65); WeaponDetailData data = new WeaponDetailData(); data.set_id((uint)AvatarMetaDataReader.GetAvatarMetaDataByKey((int)rsp.get_detail().get_leader_avatar().get_avatar_id()).initialWeapon); data.set_level(1); rsp.get_detail().get_leader_avatar().set_weapon(data); return(rsp); }
private bool OnGetPlayerDetailDataRsp(GetPlayerDetailDataRsp rsp) { if (rsp.get_retcode() == null) { PlayerDetailData playerDetailData = rsp.get_detail(); FriendDetailDataItem item = new FriendDetailDataItem(playerDetailData); this._playerDetialInfoCacheDict[(int)playerDetailData.get_uid()] = new CacheData <FriendDetailDataItem>(item); } return(false); }
private bool OnSearchFriendDetailInfoRsp(GetPlayerDetailDataRsp rsp) { switch (rsp.get_retcode()) { case 0: Singleton <MainUIManager> .Instance.ShowDialog(new SearchedFriendDetailDialogContext(new FriendDetailDataItem(rsp.get_detail()), false), UIType.Any); this.Close(); break; case 1: case 2: Singleton <MainUIManager> .Instance.ShowDialog(new GeneralHintDialogContext(LocalizationGeneralLogic.GetText("Err_TargetNotExist", new object[0]), 2f), UIType.Any); break; } return(false); }