private void UpdateMonsterIcon() { if (!this.isUpdate) { if (this.RespDataChatMessageDataResult.type != 3) { this.ngTX_USERNAME.text = this.RespDataChatMessageDataResult.userInfo.nickname; TitleDataMng.SetTitleIcon(this.RespDataChatMessageDataResult.userInfo.titleId, this.ngTITLE_ICON.GetComponent <UITexture>()); this.thumbMid = this.RespDataChatMessageDataResult.userInfo.monsterId; MonsterData monsterData = MonsterDataMng.Instance().CreateMonsterDataByMID(this.thumbMid); if (monsterData != null) { GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(monsterData, this.ngMONSTER_ICON.transform.localScale, this.ngMONSTER_ICON.transform.localPosition, this.ngMONSTER_ICON.transform.parent, true, true); guimonsterIcon.onTouchEnded += delegate(Touch touch, Vector2 pos, bool flag) { this.OnThumbnailClicked(); }; DepthController depthController = guimonsterIcon.GetDepthController(); depthController.AddWidgetDepth(guimonsterIcon.transform, 1200); } } if (this.RespDataChatMessageDataResult.type == 4 && DataMng.Instance().UserId != this.RespDataChatMessageDataResult.userId) { this.ngMULTICODE_BCOL.size = new Vector3(this.ngMULTICODE_BCOL.size.x, this.ngMULTICODE_BCOL.size.y, 5f); } this.isUpdate = true; } }
private void SetParams() { if (DataMng.Instance().RespDataUS_PlayerInfo == null || DataMng.Instance().RespDataUS_PlayerInfo.playerInfo == null) { return; } GameWebAPI.RespDataUS_GetPlayerInfo.PlayerInfo playerInfo = DataMng.Instance().RespDataUS_PlayerInfo.playerInfo; this.userName.text = playerInfo.nickname; TitleDataMng.SetTitleIcon(playerInfo.titleId, this.titleIcon); UserStamina componentInChildren = this.userStaminaPrefabFolder.Target.GetComponentInChildren <UserStamina>(); if (null != componentInChildren) { componentInChildren.RefreshParams(); } this.userDigiStone.text = playerInfo.point.ToString(); this.userCluster.text = StringFormat.Cluster(playerInfo.gamemoney); this.userMeat.text = string.Format(StringMaster.GetString("SystemFraction"), playerInfo.meatNum, playerInfo.meatLimitMax); this.stoneShopButton.onTouchEnded += delegate(Touch touch, Vector2 pos, bool flag) { if (flag) { this.OpenStoneShop(); } }; }
public void OnEquipTitle() { RestrictionInput.StartLoad(RestrictionInput.LoadType.LARGE_IMAGE_MASK_ON); TitleListItem[] titles = this.titleList.GetComponentsInChildren <TitleListItem>(true); TitleListItem currentEquipedTitle = titles.FirstOrDefault((TitleListItem _title) => _title.GetTitleId() == this.currentSelectedTitleId); APIRequestTask apirequestTask = new APIRequestTask(); apirequestTask.Add(TitleDataMng.RequestUpdateEquipedTitle(this.currentSelectedTitleId, false)); base.StartCoroutine(apirequestTask.Run(delegate { RestrictionInput.EndLoad(); TitleListItem[] titles; foreach (TitleListItem titleListItem in titles) { titleListItem.unequip(); } currentEquipedTitle.equip(); currentEquipedTitle.OnSelectTitle(); GUIPlayerStatus.RefreshParams_S(false); CMD_Profile.RefreshParams(); }, delegate(Exception nop) { RestrictionInput.EndLoad(); }, null)); }
public void OnSelectTitle(TitleListItem titleItem) { GameWebAPI.RespDataMA_TitleMaster.TitleM titleM = TitleDataMng.GetDictionaryTitleM()[titleItem.GetTitleId()]; this.titleName.text = titleM.name; this.titleDetail.text = titleM.detail; TitleDataMng.SetTitleIcon(titleM.titleId, this.titleIcon); if (titleItem.GetEquiped() || !titleItem.GetOwned()) { this.equipBtn.GetComponent <UISprite>().spriteName = "Common02_Btn_Gray"; this.equipBtnLbl.color = ConstValue.DEACTIVE_BUTTON_LABEL; this.equipBtn.GetComponent <BoxCollider>().enabled = false; } else { this.equipBtn.GetComponent <UISprite>().spriteName = "Common02_Btn_Green"; this.equipBtnLbl.color = Color.white; this.equipBtn.GetComponent <BoxCollider>().enabled = true; } if (titleItem.GetEquiped()) { this.titleNameLbl.text = StringMaster.GetString("CurrentUserTitle"); } else { this.titleNameLbl.text = StringMaster.GetString("SelectedUserTitle"); } this.currentSelectedTitleId = titleItem.GetTitleId(); }
private IEnumerator Init(Action <int> f, float sizeX, float sizeY, float aT) { GUICollider.DisableAllCollider("CMD_TitleSelect"); RestrictionInput.StartLoad(RestrictionInput.LoadType.LARGE_IMAGE_MASK_ON); base.HideDLG(); base.PartsTitle.SetTitle(StringMaster.GetString("EditUserTitle")); this.titleIcon.mainTexture = null; this.titleNameLbl.text = string.Empty; this.titleName.text = string.Empty; this.titleDetail.text = string.Empty; this.equipBtnLbl.text = StringMaster.GetString("EquipUserTitle"); this.equipBtn.GetComponent <UISprite>().spriteName = "Common02_Btn_Gray"; this.equipBtnLbl.color = ConstValue.DEACTIVE_BUTTON_LABEL; this.equipBtn.GetComponent <BoxCollider>().enabled = false; this.titleListOriginalItem.SetActive(true); GameWebAPI.RespDataMA_TitleMaster.TitleM[] titles = TitleDataMng.GetAvailableTitleM(); this.CreateTitleList(this.titleList, titles.Length); this.SetTitleDetail(this.titleList, titles); this.titleListOriginalItem.SetActive(false); base.ShowDLG(); base.Show(f, sizeX, sizeY, aT); RestrictionInput.EndLoad(); yield return(null); yield break; }
private void ShowParam() { this.md_favo = MonsterDataMng.Instance().CreateMonsterDataByMID(CMD_PartsFriendCheckScreen.data.monsterData.monsterId); GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(this.md_favo, this.goMN_ICON.transform.localScale, this.goMN_ICON.transform.localPosition, this.goMN_ICON.transform.parent, true, false); this.goMN_ICON_2 = guimonsterIcon.gameObject; this.goMN_ICON_2.SetActive(true); guimonsterIcon.Data = this.md_favo; guimonsterIcon.SetTouchAct_S(new Action <MonsterData>(this.actMIconLong)); guimonsterIcon.SetTouchAct_L(new Action <MonsterData>(this.actMIconLong)); UIWidget component = this.goMN_ICON.GetComponent <UIWidget>(); UIWidget component2 = guimonsterIcon.gameObject.GetComponent <UIWidget>(); if (component != null && component2 != null) { int add = component.depth - component2.depth; DepthController component3 = guimonsterIcon.gameObject.GetComponent <DepthController>(); component3.AddWidgetDepth(guimonsterIcon.transform, add); } this.goMN_ICON.SetActive(false); TitleDataMng.SetTitleIcon(CMD_PartsFriendCheckScreen.data.userData.titleId, this.goTITLE_ICON.GetComponent <UITexture>()); this.ngTX_NICKNAME.text = CMD_PartsFriendCheckScreen.data.userData.nickname; this.ngTX_EXP.text = CMD_PartsFriendCheckScreen.data.userData.description; this.ngTX_LAST_LOGIN.text = StringMaster.GetString("Friend-12") + CMD_PartsFriendCheckScreen.data.userData.loginTime; }
public override void ShowGUI() { base.ShowGUI(); if (this.isDestroy) { return; } this.ngTX_NAME = this.goTX_NAME.GetComponent <UILabel>(); this.ngTX_LOGIN = this.goTX_LOGIN.GetComponent <UILabel>(); this.ngTX_COMMENT = this.goTX_COMMENT.GetComponent <UILabel>(); this.ngMONSTER_ICON = this.goMONSTER_ICON; this.ngTITLE_ICON = this.goTITLE_ICON; if (this.goMemberExpulsionBtn != null) { this.goMemberExpulsionBtn.SetActive(false); } this.selectedListSprite.color = this.defaultListColor; this.userTypeIcon.SetActive(false); if (CMD_ChatMenu.instance.openMemberListType == 1) { this.ngTX_NAME.text = this.FriendData.userData.nickname; TitleDataMng.SetTitleIcon(this.FriendData.userData.titleId, this.ngTITLE_ICON.GetComponent <UITexture>()); this.ngTX_LOGIN.text = this.FriendData.userData.loginTime; this.ngTX_COMMENT.text = this.FriendData.userData.description; this.thumbMid = this.FriendData.monsterData.monsterId; } else { this.ngTX_NAME.text = this.Data.userInfo.nickname; TitleDataMng.SetTitleIcon(this.Data.userInfo.titleId, this.ngTITLE_ICON.GetComponent <UITexture>()); this.ngTX_LOGIN.text = string.Format(StringMaster.GetString("ChatUserLastLogin"), this.Data.userInfo.loginTime); this.ngTX_COMMENT.text = this.Data.userInfo.description; this.thumbMid = this.Data.userInfo.monsterId; if (this.Data.userId == DataMng.Instance().UserId) { this.selectedListSprite.color = this.activeListColor; this.userTypeIconSprite = this.userTypeIcon.GetComponent <UISprite>(); this.userTypeIconSprite.spriteName = "ListStatus_Waku_Green"; this.userTypeLabel.text = StringMaster.GetString("ListUsertype_You"); this.userTypeIcon.SetActive(true); } else if (BlockManager.instance().blockList != null && BlockManager.instance().CheckBlock(this.Data.userId)) { this.selectedListSprite.color = this.blockListColor; this.userTypeIconSprite = this.userTypeIcon.GetComponent <UISprite>(); this.userTypeIconSprite.spriteName = "ListStatus_Waku_Red"; this.userTypeLabel.text = StringMaster.GetString("ListUsertype_Blocked"); this.userTypeIcon.SetActive(true); if (ClassSingleton <ChatData> .Instance.CurrentChatInfo.isMaster && CMD_ChatMenu.instance.openMemberListType == 3 && this.goMemberExpulsionBtn != null) { this.goMemberExpulsionBtn.SetActive(true); } } else if (ClassSingleton <ChatData> .Instance.CurrentChatInfo.isMaster && CMD_ChatMenu.instance.openMemberListType == 3 && this.goMemberExpulsionBtn != null) { this.goMemberExpulsionBtn.SetActive(true); } } }
protected override void RefreshComponents() { this.userProfile = DataMng.Instance().RespDataPRF_Profile; this.labelUserID.text = this.userProfile.userData.userCode; this.labelCollection.text = string.Format(StringMaster.GetString("SystemFraction"), this.userProfile.collection.possessionNum, this.userProfile.collection.totalNum); this.inputComment.value = this.userProfile.userData.description; this.inputNickName.value = this.userProfile.userData.nickname; TitleDataMng.SetTitleIcon(this.userProfile.userData.titleId, this.titleIcon); }
private void ShowData() { if (this.data == null) { return; } this.SetDigimonIcon(); if (this.data.userId.ToString() == DataMng.Instance().RespDataCM_Login.playerInfo.userId) { this.SetMine(true); } else { this.SetMine(false); } this.lbTX_UserName.text = this.data.nickname; TitleDataMng.SetTitleIcon(this.data.titleId, this.goTITLE_ICON.GetComponent <UITexture>()); this.lbTX_DuelPoint.text = this.data.point.ToString(); int rank = this.data.rank; switch (rank) { case 1: this.spRankingIcon.gameObject.SetActive(true); this.spRankingIcon.spriteName = "PvP_Ranking_1"; this.lbTX_RankingNumber.text = string.Empty; break; case 2: this.spRankingIcon.gameObject.SetActive(true); this.spRankingIcon.spriteName = "PvP_Ranking_2"; this.lbTX_RankingNumber.text = string.Empty; break; case 3: this.spRankingIcon.gameObject.SetActive(true); this.spRankingIcon.spriteName = "PvP_Ranking_3"; this.lbTX_RankingNumber.text = string.Empty; break; default: this.spRankingIcon.gameObject.SetActive(false); if (1 <= rank && rank <= this.limitRank) { this.lbTX_RankingNumber.text = rank.ToString(); } else { this.lbTX_RankingNumber.text = StringMaster.GetString("ColosseumRankOutside"); } break; } }
public void SetDetail(GameWebAPI.RespDataMA_TitleMaster.TitleM titleMaster, bool owned, bool equiped, Action <TitleListItem> touchEvent) { this.titleId = int.Parse(titleMaster.titleId); this.owned = owned; this.equiped = equiped; this.onSelectTitle = touchEvent; this.equipedIcon.SetActive(this.equiped); TitleDataMng.SetTitleIcon(titleMaster.titleId, base.GetComponent <UITexture>()); if (!this.owned) { base.GetComponent <UITexture>().color = Util.convertColor(109f, 109f, 109f, 255f); } }
private void SetInitLabel() { this.lbUserName.text = this.data.ownerName; this.lbComment.text = this.data.introduction; TitleDataMng.SetTitleIcon(this.data.titleId, this.goTitleIcon.GetComponent <UITexture>()); GameWebAPI.RespDataMA_GetWorldStageM.WorldStageM[] worldStageM = MasterDataMng.Instance().RespDataMA_WorldStageM.worldStageM; GameWebAPI.RespDataMA_GetWorldStageM.WorldStageM worldStageM2 = worldStageM.SingleOrDefault((GameWebAPI.RespDataMA_GetWorldStageM.WorldStageM x) => x.worldStageId == this.data.worldStageId); this.lbQuestName.text = worldStageM2.name + "\n" + this.data.dungeonName; string moodType = this.data.moodType; if (moodType != null) { if (moodType == "1") { this.lbMoodType.text = StringMaster.GetString("RecruitRule-06"); goto IL_125; } if (moodType == "2") { this.lbMoodType.text = StringMaster.GetString("RecruitRule-07"); goto IL_125; } if (!(moodType == "3")) { } } this.lbMoodType.text = StringMaster.GetString("RecruitRule-08"); IL_125: this.lbNowMemberNum.text = string.Format(StringMaster.GetString("SystemFraction"), this.data.memberCount, 3); if (!this.isOpenedQuest) { this.bgFrame.color = ConstValue.DEFAULT_COLOR; this.lbUserName.color = ConstValue.DEACTIVE_BUTTON_LABEL; this.lbQuestName.color = ConstValue.DEACTIVE_BUTTON_LABEL; this.lbComment.color = ConstValue.DEACTIVE_BUTTON_LABEL; } if (this.data.ownerMonsterId != null) { MonsterData monsterData = MonsterDataMng.Instance().CreateMonsterDataByMID(this.data.ownerMonsterId); if (monsterData != null) { GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(monsterData, this.goMasterIcon.transform.localScale, this.goMasterIcon.transform.localPosition, this.goMasterIcon.transform.parent, true, false); UIWidget component = base.gameObject.GetComponent <UIWidget>(); if (component != null) { DepthController depthController = guimonsterIcon.GetDepthController(); depthController.AddWidgetDepth(guimonsterIcon.transform, component.depth + 2); } } } }
private void ShowParam() { string str = string.Empty; if (!this.data.userData.loginTime.Contains(StringMaster.GetString("Friend-13"))) { str = StringMaster.GetString("Friend-13"); } this.ngTX_NICKNAME.text = this.data.userData.nickname; TitleDataMng.SetTitleIcon(this.data.userData.titleId, this.goTL_ICON.GetComponent <UITexture>()); this.ngTX_EXP.text = this.data.userData.description; this.ngTX_LAST_LOGIN.text = StringMaster.GetString("Friend-12") + this.data.userData.loginTime + str; this.lastLoginTime = this.data.userData.loginTime; }
private void SetInitLabel() { this.lbUserName.text = this.friendData.userData.nickname; this.lbUserComment.text = this.friendData.userData.description; this.lbLastLogin.text = this.friendData.userData.loginTime; TitleDataMng.SetTitleIcon(this.friendData.userData.titleId, this.goTitleIcon.GetComponent <UITexture>()); MonsterData monsterData = MonsterDataMng.Instance().CreateMonsterDataByMID(this.friendData.monsterData.monsterId); if (monsterData != null) { GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(monsterData, this.goMonsterIcon.transform.localScale, this.goMonsterIcon.transform.localPosition, this.goMonsterIcon.transform.parent, true, false); DepthController depthController = guimonsterIcon.GetDepthController(); depthController.AddWidgetDepth(guimonsterIcon.transform, 1800); } }
public void ClearCache() { AlertMaster.ClearCache(); StringMaster.ClearCache(); EvolutionMaterialData.ClearCache(); ChipDataMng.ClearCache(); TitleDataMng.ClearCache(); DataMng.Instance().StageGimmick.ZeroClear(); MasterBase[] array = this.masterList.Values.ToArray <MasterBase>(); for (int i = 0; i < array.Length; i++) { array[i].ClearData(); } MonsterPicturebookData.Initialize(); }
public void SetStatusInfo(string user_id, string user_name, int leader_lv, string leader_monster_id, string title_id, BattleResultFriendReqInfo.FRIEND_TYPE friend_type) { this.userId = user_id; this.TXT_NAME.text = user_name; this.TXT_LV.text = leader_lv.ToString(); TitleDataMng.SetTitleIcon(title_id, this.titleIcon); MonsterData monsterData = MonsterDataMng.Instance().CreateMonsterDataByMID(leader_monster_id); GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(monsterData, this.iconAnchor.localScale, this.iconAnchor.localPosition, this.iconAnchor.parent, true, false); guimonsterIcon.name = "DigimonIcon"; UIWidget[] componentsInChildren = guimonsterIcon.GetComponentsInChildren <UIWidget>(); foreach (UIWidget uiwidget in componentsInChildren) { uiwidget.depth += 1000; } this.ButtonSetActive(friend_type); }
public static void SetTitleIcon(string titleId, UITexture targetTex) { if (titleId != null) { GameWebAPI.RespDataMA_TitleMaster.TitleM titleM = TitleDataMng.GetDictionaryTitleM()[int.Parse(titleId)]; if (titleM != null) { string imagePath = TitleDataMng.GetImagePath(titleM); TitleIconCacheBuffer.Instance().LoadAndCacheObj(imagePath, delegate(UnityEngine.Object obj) { if (obj != null) { Texture2D mainTexture = obj as Texture2D; targetTex.mainTexture = mainTexture; } }); } } }
private void ShowData() { this.SetDigimonIcon(); this.lbTX_UserName.text = this.data.nickname; TitleDataMng.SetTitleIcon(this.data.titleId, this.goTITLE_ICON.GetComponent <UITexture>()); this.lbTX_DuelPoint.text = this.data.score; this.lbTX_NextPoint.text = this.nextPoint.ToString(); int num = int.Parse(this.data.rank); switch (num) { case 1: this.spRankingIcon.gameObject.SetActive(true); this.spRankingIcon.spriteName = "PvP_Ranking_1"; this.lbTX_RankingNumber.text = string.Empty; break; case 2: this.spRankingIcon.gameObject.SetActive(true); this.spRankingIcon.spriteName = "PvP_Ranking_2"; this.lbTX_RankingNumber.text = string.Empty; break; case 3: this.spRankingIcon.gameObject.SetActive(true); this.spRankingIcon.spriteName = "PvP_Ranking_3"; this.lbTX_RankingNumber.text = string.Empty; break; default: this.spRankingIcon.gameObject.SetActive(false); if (1 <= num && num <= this.limitRank) { this.lbTX_RankingNumber.text = num.ToString(); } else { this.lbTX_RankingNumber.text = StringMaster.GetString("ColosseumRankOutside"); } break; } }
public void ShowFriendFarm(GameWebAPI.FriendList friendData, Action onFriendProfile, Action onFriendList, Action onBackFarm, Action callback = null) { if (this.farmVisitFace == null) { this.farmVisitFace = FarmVisitFace.Create(); } this.farmVisitFace.friendUserName = friendData.userData.nickname; TitleDataMng.SetTitleIcon(friendData.userData.titleId, this.farmVisitFace.friendUserTitleIcon); this.farmVisitFace.onFriendProfile = onFriendProfile; this.farmVisitFace.onFriendList = onFriendList; this.farmVisitFace.onBackFarm = onBackFarm; if (this.visitFriendData != null && this.visitFriendData.userData.userId == friendData.userData.userId) { this.ChangeFriendFarmMode(true, callback); } else { this.visitFriendData = new GameWebAPI.FriendList(); this.visitFriendData.monsterData = new GameWebAPI.FriendList.MonsterData(); this.visitFriendData.monsterData.monsterId = friendData.monsterData.monsterId; this.visitFriendData.userData = new GameWebAPI.FriendList.UserData(); this.visitFriendData.userData.userId = friendData.userData.userId; this.visitFriendData.userData.nickname = friendData.userData.nickname; this.visitFriendData.userData.description = friendData.userData.description; this.visitFriendData.userData.loginTime = friendData.userData.loginTime; this.visitFriendData.userData.loginTimeSort = friendData.userData.loginTimeSort; APIRequestTask task = Singleton <UserDataMng> .Instance.RequestUserFacilityData(int.Parse(this.visitFriendData.userData.userId), true); Action onSuccess = delegate() { FarmRoot.Instance.SelectObject.ResetSelectedFarmObject(); FarmRoot.Instance.farmUI.DestroyALLUI(); FarmRoot.Instance.Scenery.DestroyAllFarmObject(); FarmRoot.Instance.Scenery.InitializeFarmObject(); FarmRoot.Instance.DigimonManager.CreateFriendDigimonGameObject(Singleton <UserDataMng> .Instance.monsterIdsInFarm, delegate { this.ChangeFriendFarmMode(true, callback); }); }; base.StartCoroutine(task.Run(onSuccess, null, null)); } }
private void SetInitLabel() { this.lbUserName.text = this.data.userInfo.nickname; this.lbComment.text = string.Format(StringMaster.GetString("ColosseumMockInvitation"), this.data.userInfo.nickname); TitleDataMng.SetTitleIcon(this.data.userInfo.titleId, this.goTitleIcon.GetComponent <UITexture>()); if (this.data.userInfo.monsterId != null) { MonsterData monsterData = MonsterDataMng.Instance().CreateMonsterDataByMID(this.data.userInfo.monsterId); if (monsterData != null) { GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(monsterData, this.goMasterIcon.transform.localScale, this.goMasterIcon.transform.localPosition, this.goMasterIcon.transform.parent, true, false); UIWidget component = base.gameObject.GetComponent <UIWidget>(); if (component != null) { DepthController depthController = guimonsterIcon.GetDepthController(); depthController.AddWidgetDepth(guimonsterIcon.transform, component.depth + 2); } } } }
private void SetTitleDetail(GUISelectPanelTitle listUI, GameWebAPI.RespDataMA_TitleMaster.TitleM[] titleData) { TitleListItem[] componentsInChildren = listUI.GetComponentsInChildren <TitleListItem>(true); if (componentsInChildren == null) { return; } GameWebAPI.RespDataTL_GetUserTitleList.UserTitleList equipedUserTitle = TitleDataMng.GetEquipedUserTitle(); int num = 0; for (int i = 0; i < componentsInChildren.Length; i++) { bool owned = null != TitleDataMng.GetUserTitleByMasterId(titleData[i].titleId); bool flag = equipedUserTitle != null && equipedUserTitle.titleId == titleData[i].titleId; componentsInChildren[i].SetDetail(titleData[i], owned, flag, new Action <TitleListItem>(this.OnSelectTitle)); if (flag) { num = i; } } componentsInChildren[num].OnSelectTitle(); }
private void SetUserInfo(MultiBattleData.PvPUserData userData, PvPVersusInfo6Icon.UserDataUI ui) { ui.name.text = userData.userStatus.nickname; TitleDataMng.SetTitleIcon(userData.userStatus.titleId, ui.title); ui.rank.spriteName = MultiTools.GetPvPRankSpriteName(userData.userStatus.colosseumRankId); ui.koTitle.text = StringMaster.GetString("ColosseumScoreTitle"); ui.koValue.text = string.Format(StringMaster.GetString("ColosseumScore"), userData.userStatus.winTotal, userData.userStatus.loseTotal); ui.dpTitle.text = StringMaster.GetString("ColosseumDuelPoint"); ui.dpValue.text = userData.userStatus.score.ToString(); for (int i = 0; i < userData.monsterData.Length; i++) { GUIMonsterIcon guimonsterIcon = ui.icons[i]; if (ClassSingleton <MonsterUserDataMng> .Instance.GetUserMonster(userData.monsterData[i].userMonsterId) != null) { guimonsterIcon.Data = ClassSingleton <MonsterUserDataMng> .Instance.GetUserMonster(userData.monsterData[i].userMonsterId); } else { guimonsterIcon.Data = userData.monsterData[i].ToMonsterData(); } guimonsterIcon.SetTouchAct_L(null); guimonsterIcon.SetTouchAct_S(null); } }
public override void ShowGUI() { base.ShowGUI(); this.ngTX_GRPNAME = this.goTX_GRPNAME.GetComponent <UILabel>(); this.ngTX_MEMBER = this.goTX_MEMBER.GetComponent <UILabel>(); this.ngTX_NUMBER = this.goTX_NUMBER.GetComponent <UILabel>(); this.ngTX_MASTER = this.goTX_MASTER.GetComponent <UILabel>(); this.ngTX_NAME = this.goTX_NAME.GetComponent <UILabel>(); this.ngICON_TITLE = this.goICON_TITLE.GetComponent <UITexture>(); this.ngTX_APPROVALTYPE = this.goTX_APPROVALTYPE.GetComponent <UILabel>(); this.ngTX_COMMENT = this.goTX_COMMENT.GetComponent <UILabel>(); this.ngTX_CATEGORY = this.goICON_CATEGORY.GetComponent <UILabel>(); this.ngTX_MASTER.text = StringMaster.GetString("ChatMaster"); if (this.Data != null) { this.ngTX_CATEGORY.text = StringMaster.GetString(ChatConstValue.SPRITE_GROUP_CATEGORY[int.Parse(this.Data.categoryId)]); this.ngTX_GRPNAME.text = this.Data.groupName; if (ChatConstValue.CHAT_GROUP_MEMBER_MAX_NUM > int.Parse(this.Data.memberNum)) { this.ngTX_MEMBER.text = StringMaster.GetString("ChatMember"); } this.ngTX_NUMBER.text = string.Format(StringMaster.GetString("SystemFraction"), this.Data.memberNum, ChatConstValue.CHAT_GROUP_MEMBER_MAX_NUM); if (CMD_ChatTop.instance != null && !CMD_ChatTop.instance.searchFieldTypeSearch.activeSelf) { if (ClassSingleton <FaceChatNotificationAccessor> .Instance.faceChatNotification.prefsLastHistoryList != null && ClassSingleton <FaceChatNotificationAccessor> .Instance.faceChatNotification.prefsLastHistoryList.Count > 0) { var <> __AnonType = ClassSingleton <FaceChatNotificationAccessor> .Instance.faceChatNotification.prefsLastHistoryList.Where((FaceChatNotification.UserPrefsHistoryIdList item) => item.historyData.chatGroupId == this.Data.chatGroupId).Select((FaceChatNotification.UserPrefsHistoryIdList item) => new { item.historyData.chatGroupId, item.historyData.chatMessageHistoryId }).SingleOrDefault(); if (< > __AnonType == null) { this.newIcon.SetActive(true); } else if (this.Data.chatMessageHistoryId != < > __AnonType.chatMessageHistoryId && this.Data.chatMessageHistoryId != null) { this.newIcon.SetActive(true); } } else { this.newIcon.SetActive(true); } } if (int.Parse(this.Data.approvalType) == 2) { this.ngTX_APPROVALTYPE.text = StringMaster.GetString("ChatCategory-01"); } else { this.ngTX_APPROVALTYPE.text = StringMaster.GetString("ChatCategory-02"); } if (DataMng.Instance().UserId == this.Data.ownerUserId) { this.groupMasterIcon.SetActive(true); } this.ngTX_NAME.text = this.Data.ownerInfo.nickname; TitleDataMng.SetTitleIcon(this.Data.ownerInfo.titleId, this.ngICON_TITLE); this.ngTX_COMMENT.text = this.Data.comment; }
public void AddInitLabel(string nickname, string titleId, CMD_MultiRecruitPartyWait.USER_TYPE playerNum, bool leaderFlg) { this.lbTXT_NICKNAME.text = nickname; TitleDataMng.SetTitleIcon(titleId, this.goTITLE_ICON.GetComponent <UITexture>()); this.spTAG_PLAYER.spriteName = "MultiBattle_P" + ((int)(playerNum + 1)).ToString(); }
public override IEnumerator AfterInitializeUI() { this.CreateBattleRoundEnd(); NGUITools.SetActiveSelf(this.battleDialog.gameObject, true); base.AfterInitializeUIBefore(); this.HideAlertDialog(); for (int i = 0; i < this.ui.skillSelectUi.monsterButton.Length; i++) { BattleInputUtility.AddEvent(this.ui.skillSelectUi.monsterButton[i].playerMonsterDescriptionSwitch.onHoldWaitPress, new Action <int>(base.input.OnPressMonsterButton), i); BattleInputUtility.AddEvent(this.ui.skillSelectUi.monsterButton[i].playerMonsterDescriptionSwitch.onDisengagePress, new Action(base.input.OffPressMonsterButton)); } for (int j = 0; j < this.ui.skillSelectUi.skillButton.Length; j++) { if (j > 0) { this.ui.skillSelectUi.skillButton[j].SetClickCallback(new Action <int>(base.input.OnClickSkillButton), j); this.ui.skillSelectUi.skillButton[j].SetHoldWaitPressCallback(new Action <int>(base.input.OnPressSkillButton), j); this.ui.skillSelectUi.skillButton[j].SetDisengagePressCallback(new Action <int>(base.input.OffPressSkillButton), j); } else { this.ui.skillSelectUi.skillButton[j].SetButtonCallback(new Action <int>(base.input.OnClickSkillButton), j); } this.ui.skillSelectUi.skillButton[j].SetRotationEffectCallback(new Action <int>(base.input.OnSkillButtonRotateAfter), j); } BattleInputUtility.AddEvent(this.ui.menuButton.onClick, new Action(this.inputPvP.OnPvPShowMenu)); this.ui.dialogRetire.AddEvent(new Action(this.inputPvP.OnClickPvPRetireDialogOkButton), new Action(base.input.OnClickRetireDialogCancelButton)); this.ui.initialInduction.AddEvent(new Action(base.input.OnClickCloseInitialInductionButton)); BattleInputUtility.AddEvent(this.ui.winNextButton.onClick, new Action(base.input.OnClickSkipWinnerAction)); IEnumerator hitIconInitialize = base.stateManager.uiControl.HitIconInitialize(); while (hitIconInitialize.MoveNext()) { yield return(null); } IEnumerator hudInitialize = base.stateManager.uiControl.HUDInitialize(); while (hudInitialize.MoveNext()) { yield return(null); } IEnumerator manualSelectTargetInitialize = base.stateManager.uiControl.ManualSelectTargetInitialize(); while (manualSelectTargetInitialize.MoveNext()) { yield return(null); } this.ui.rootPanel.RebuildAllDrawCalls(); base.InstantiateGimmickStatusEffect(); base.stateManager.uiControl.ApplyHideHitIcon(); base.stateManager.uiControl.ApplyDroppedItemHide(); base.stateManager.uiControlPvP.ApplySetAlwaysUIObject(false); this.ui.itemInfoField.ApplyDroppedItemIconHide(); this.SetupEmotion(); this.SetupTimer(); string playerName = base.stateManager.pvpFunction.GetPlayerName(); string enemyName = base.stateManager.pvpFunction.GetEnemyName(); this.ui.playerNameLabel.text = playerName; this.ui.enemyNameLabel.text = enemyName; string playerTitleId = base.stateManager.pvpFunction.GetPlayerTitleId(); string enemyTitleId = base.stateManager.pvpFunction.GetEnemyTitleId(); TitleDataMng.SetTitleIcon(playerTitleId, this.ui.playerTitleIcon); TitleDataMng.SetTitleIcon(enemyTitleId, this.ui.enemyTitleIcon); yield break; }
public void SetDetail(GameWebAPI.RespDataMS_MissionInfoLogic.Result.Mission missionInfo, Action <MissionItem> touchEvent) { this.rewardTagLabel.text = StringMaster.GetString("Mission-09"); this.arTagLabel.text = StringMaster.GetString("Mission-05"); int.TryParse(missionInfo.detail.missionId, out this.missionId); this.missionCategoryId = missionInfo.missionCategoryId; this.lastStepFlg = missionInfo.lastStepFlg; int categoryId = int.Parse(this.missionCategoryId); this.onPushedButton = touchEvent; int missionType = -1; int.TryParse(missionInfo.displayGroup, out missionType); int status = missionInfo.status; this.SetButton(status, missionType, categoryId); int num = 0; foreach (GameWebAPI.RespDataMS_MissionInfoLogic.Result.Mission.Reward reward2 in missionInfo.reward) { if (reward2.viewFlg == "1") { num++; } } if (num > 1) { this.rewardDetaildButton.SetActive(true); this.hiddenRewardNum.text = string.Format(StringMaster.GetString("MissionRewardHiddenNum"), num - 1); } else { this.rewardDetaildButton.SetActive(false); this.hiddenRewardNum.text = null; } this.tblBtnLayout.Reposition(); this.rightBlackPlate.SetActive(true); this.conditionTitle.text = missionInfo.detail.missionDetail; string text = string.Empty; int num2 = 0; string text2 = string.Empty; string text3 = string.Empty; GameWebAPI.RespDataMS_MissionInfoLogic.Result.Mission.Reward[] reward3 = missionInfo.reward; foreach (GameWebAPI.RespDataMS_MissionInfoLogic.Result.Mission.Reward reward4 in reward3) { if (reward4.viewFlg == "1") { int.TryParse(reward4.assetCategoryId, out num2); text = DataMng.Instance().GetAssetTitle(reward4.assetCategoryId, reward4.assetValue); text2 = reward4.assetValue; text3 = reward4.assetNum; break; } } AppCoroutine.Start(this.csItem.SetItemWithWaitASync(num2.ToString(), text2, text3, false, delegate { }), false); if (num2 == 19) { GameWebAPI.RespDataMA_TitleMaster.TitleM titleM; TitleDataMng.GetDictionaryTitleM().TryGetValue(int.Parse(text2), out titleM); this.lbRewardDetail.text = ((titleM == null) ? StringMaster.GetString("AlertDataErrorTitle") : titleM.name); this.lbRewardDetail.gameObject.SetActive(true); this.GoOperatorMsg.SetActive(false); this.quantity.gameObject.SetActive(false); } else { this.quantity.text = ((!(this.rewardIcon.spriteName == "Common02_Icon_Chip")) ? text3 : StringFormat.Cluster(text3)); this.lbRewardDetail.gameObject.SetActive(false); this.GoOperatorMsg.SetActive(true); this.quantity.gameObject.SetActive(true); } int num3 = 0; string missionValue = missionInfo.detail.missionValue; int.TryParse(missionValue, out num3); int num4 = Mathf.Clamp(missionInfo.nowValue, 0, num3); if (status != 2) { if (num3 != 0) { this.achievementRate.text = string.Format(StringMaster.GetString("SystemFraction"), num4, missionValue); } else { this.achievementRate.text = StringMaster.GetString("SystemNoneHyphen"); } this.achievementRate.spacingX = 0; this.achievementRate.color = Label.NOT_COMPLETE_COLOR; } else { this.achievementRate.text = StringMaster.GetString("Mission-06"); this.achievementRate.spacingX = -1; this.achievementRate.color = Label.COMPLETE_COLOR; } }
private static string GetAssetValueName(int assetCategoryId, string assetValue) { string result = string.Empty; switch (assetCategoryId) { case 14: { GameWebAPI.RespDataMA_GetSoulM.SoulM soulMasterBySoulId = VersionUpMaterialData.GetSoulMasterBySoulId(assetValue); if (soulMasterBySoulId != null) { result = soulMasterBySoulId.soulName; } break; } default: if (assetCategoryId != 1) { if (assetCategoryId == 6) { GameWebAPI.RespDataMA_GetItemM.ItemM itemM = MasterDataMng.Instance().RespDataMA_ItemM.GetItemM(assetValue); if (itemM != null) { result = itemM.name; } } } else { GameWebAPI.RespDataMA_GetMonsterMS.MonsterM simple = MonsterMaster.GetMonsterMasterByMonsterId(assetValue).Simple; if (simple != null) { GameWebAPI.RespDataMA_GetMonsterMG.MonsterM group = MonsterMaster.GetMonsterMasterByMonsterGroupId(simple.monsterGroupId).Group; if (group != null) { result = group.monsterName; } } } break; case 16: { FacilityKeyM facilityKeyMaster = FarmDataManager.GetFacilityKeyMaster(assetValue); if (facilityKeyMaster != null) { result = facilityKeyMaster.facilityKeyName; } break; } case 17: { int chipId = int.Parse(assetValue); GameWebAPI.RespDataMA_ChipM.Chip chipMaster = ChipDataMng.GetChipMaster(chipId); if (chipMaster != null) { result = chipMaster.name; } break; } case 18: { GameWebAPI.RespDataMA_DungeonTicketMaster.DungeonTicketM dungeonTicketM = MasterDataMng.Instance().RespDataMA_DungeonTicketMaster.dungeonTicketM.FirstOrDefault((GameWebAPI.RespDataMA_DungeonTicketMaster.DungeonTicketM x) => assetValue == x.dungeonTicketId); if (dungeonTicketM != null) { result = dungeonTicketM.name; } break; } case 19: { GameWebAPI.RespDataMA_TitleMaster.TitleM titleM = TitleDataMng.GetDictionaryTitleM()[int.Parse(assetValue)]; if (titleM != null) { result = titleM.name; } break; } } return(result); }
public override void ClosePanel(bool animation = true) { if (this.isReceived) { RestrictionInput.StartLoad(RestrictionInput.LoadType.LARGE_IMAGE_MASK_OFF); APIRequestTask apirequestTask = Singleton <UserDataMng> .Instance.RequestPlayerInfo(true); apirequestTask.Add(Singleton <UserDataMng> .Instance.RequestUserSoulData(true)).Add(this.RequestUserMonster()).Add(DataMng.Instance().RequestMyPageData(true)).Add(ChipDataMng.RequestAPIChipList(true)).Add(ChipDataMng.RequestAPIMonsterSlotInfoList(true)).Add(TitleDataMng.RequestAPIUsetTitleList(true)); base.StartCoroutine(apirequestTask.Run(delegate { GUIPlayerStatus.RefreshParams_S(true); ClassSingleton <FacePresentAccessor> .Instance.facePresent.SetBadgeOnly(); ClassSingleton <GUIMonsterIconList> .Instance.RefreshList(MonsterDataMng.Instance().GetMonsterDataList()); RestrictionInput.EndLoad(); this.< ClosePanel > __BaseCallProxy0(animation); }, null, null));
private string GetPresentName(GameWebAPI.RespDataMA_GetAssetCategoryM.AssetCategoryM masterAssetCategory, string objectId) { string result = StringMaster.GetString("Present-10"); if (masterAssetCategory != null) { result = masterAssetCategory.assetTitle; } MasterDataMng.AssetCategory assetCategory = (MasterDataMng.AssetCategory)masterAssetCategory.assetCategoryId.ToInt32(); switch (assetCategory) { case MasterDataMng.AssetCategory.FACILITY_KEY: { FacilityKeyM facilityKeyMaster = FarmDataManager.GetFacilityKeyMaster(objectId); if (facilityKeyMaster != null) { result = facilityKeyMaster.facilityKeyName; } break; } default: if (assetCategory != MasterDataMng.AssetCategory.MONSTER) { if (assetCategory == MasterDataMng.AssetCategory.ITEM) { GameWebAPI.RespDataMA_GetItemM.ItemM itemM = MasterDataMng.Instance().RespDataMA_ItemM.GetItemM(objectId); if (itemM != null) { result = itemM.name; } } } else { GameWebAPI.RespDataMA_GetMonsterMS.MonsterM simple = MonsterMaster.GetMonsterMasterByMonsterId(objectId).Simple; if (simple != null) { GameWebAPI.RespDataMA_GetMonsterMG.MonsterM group = MonsterMaster.GetMonsterMasterByMonsterGroupId(simple.monsterGroupId).Group; if (group != null) { result = group.monsterName; } } } break; case MasterDataMng.AssetCategory.DUNGEON_TICKET: { GameWebAPI.RespDataMA_DungeonTicketMaster.DungeonTicketM dungeonTicketM = MasterDataMng.Instance().RespDataMA_DungeonTicketMaster.dungeonTicketM.FirstOrDefault((GameWebAPI.RespDataMA_DungeonTicketMaster.DungeonTicketM x) => objectId == x.dungeonTicketId); if (dungeonTicketM != null) { result = dungeonTicketM.name; } break; } case MasterDataMng.AssetCategory.TITLE: { GameWebAPI.RespDataMA_TitleMaster.TitleM titleM = TitleDataMng.GetDictionaryTitleM()[int.Parse(objectId)]; if (titleM != null) { result = titleM.name; } break; } } return(result); }
public static GameWebAPI.RespDataMA_TitleMaster.TitleM[] GetAvailableTitleM() { IEnumerable <GameWebAPI.RespDataMA_TitleMaster.TitleM> source = MasterDataMng.Instance().RespDataMA_TitleMaster.titleM.Where((GameWebAPI.RespDataMA_TitleMaster.TitleM _title) => _title.dispFlg == "1" || TitleDataMng.GetUserTitleByMasterId(_title.titleId) != null); return(source.ToArray <GameWebAPI.RespDataMA_TitleMaster.TitleM>()); }