public void Update(USER_FRIEND_INFO userFriendInfo) { this.strName = TKString.NEWString(userFriendInfo.szName); this.i16Level = userFriendInfo.i16Level; this.i32WorldID = userFriendInfo.i32FriendWorldID; this.i32WorldID_Connect = userFriendInfo.i32WorldID_Connect; this.i64PersonID = userFriendInfo.nPersonID; this.i16BattleMatch = userFriendInfo.i16BattleMatch; this.bConnect = (userFriendInfo.i8Location > 0); this.byLocation = userFriendInfo.i8Location; this.i32MapUnique = userFriendInfo.i32MapUnique; this.i32FaceCharKind = userFriendInfo.i32FaceCharKind; this.byUserPlayState = userFriendInfo.i8UserPlayState; this.i32CostumeUnique = userFriendInfo.i32FaceCharCostumeUnique; this.Friend_HelpSolInfo = userFriendInfo.FriendHelpSolInfo; this.strPlatformName = TKString.NEWString(userFriendInfo.szPlatformName); this.i64LogoutTime = userFriendInfo.i64LogoutTIme; string[] array = TKString.NEWString(userFriendInfo.szGuildName).Split(new char[] { '_' }); this.strGuildName = array[0]; if (array.Length > 1) { this.bGuildWar = true; } this.i16ColosseumGrade = userFriendInfo.i16ColosseumGrade; this.ui8UserPortrait = userFriendInfo.ui8UserPortrait; if (userFriendInfo.ui8UserPortrait == 1 && this.i64PersonID > 0L && this.i64PersonID > 11L) { string userPortraitURL = NrTSingleton <NkCharManager> .Instance.GetUserPortraitURL(this.i64PersonID); WebFileCache.RequestImageWebFile(userPortraitURL, new WebFileCache.ReqTextureCallback(this.ReqWebUserImageCallback), this.UserPortrait); } }
public void SetFriendDetailInfo(GS_FRIEND_DETAILINFO_ACK ACK, NkDeserializePacket kDeserializePacket) { NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo; USER_FRIEND_INFO friend = kMyCharInfo.m_kFriendInfo.GetFriend(this.m_PersonID); this.Friend_Detail_Value[0] = ACK.FriendHelpCount; this.Friend_Detail_Value[1] = (int)ACK.ColosseumGrade; this.Friend_Detail_Value[2] = ACK.i32InfiRank; this.Friend_Detail_Value[3] = (int)ACK.i16BabelClearFloor; this.m_lbFriend_DetailInfo.Clear(); string text = string.Empty; string text2 = string.Empty; for (int i = 0; i < 4; i++) { NewListItem newListItem = new NewListItem(this.m_lbFriend_DetailInfo.ColumnNum, true, string.Empty); text2 = this.GetFriendDetailTitleText(i); newListItem.SetListItemData(0, text2, null, null, null); text = this.GetFriendDetailinfoText(i); if (i == 1) { text2 = NrTSingleton <NrTable_ColosseumRankReward_Manager> .Instance.GetGradeTextKey((short)this.Friend_Detail_Value[i]); } else if (i == 2) { if ((short)this.Friend_Detail_Value[i] == 0) { text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2225"); } else { NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[] { text, "count", this.Friend_Detail_Value[i] }); } } else { NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[] { text, "count", this.Friend_Detail_Value[i] }); } newListItem.SetListItemData(1, text2, null, null, null); this.m_lbFriend_DetailInfo.Add(newListItem); } this.m_lbFriend_DetailInfo.RepositionItems(); if (friend != null && TKString.NEWString(friend.szPlatformName) != string.Empty) { this.m_dtFriendFaceBookImg.Hide(false); this.m_laFriendFaceBookID.SetText(TKString.NEWString(friend.szPlatformName)); } }
public override void OnClose() { NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo; if (this.BabelInvitePersonInfo != null) { USER_FRIEND_INFO friend = kMyCharInfo.m_kFriendInfo.GetFriend(this.BabelInvitePersonInfo.ReqPersonID); string text = string.Empty; string empty = string.Empty; string text2 = string.Empty; if (this.BabelInvitePersonInfo.floortype == 2) { text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2784"); } string textFromMessageBox = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("96"); text = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("97"); if (friend != null) { NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { text, "charname", TKString.NEWString(friend.szName), "type", text2, "floor", this.BabelInvitePersonInfo.floor, "subfloor", (int)(this.BabelInvitePersonInfo.sub_floor + 1) }); } else { NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { text, "charname", TKString.NEWString(this.BabelInvitePersonInfo.ReqPersonName), "type", text2, "floor", this.BabelInvitePersonInfo.floor, "subfloor", (int)(this.BabelInvitePersonInfo.sub_floor + 1) }); } MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadGroupForm(G_ID.MSGBOX_DLG) as MsgBoxUI; msgBoxUI.SetMsg(new YesDelegate(NrReceiveGame.OnBabelInviteAccept), this.BabelInvitePersonInfo, new NoDelegate(NrReceiveGame.OnBabelInviteCancel), this.BabelInvitePersonInfo, textFromMessageBox, empty, eMsgType.MB_OK_CANCEL); msgBoxUI.SetButtonOKText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("317")); msgBoxUI.SetButtonCancelText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("318")); } base.OnClose(); }
public void BtClickWhisper(IUIObject obj) { USER_FRIEND_INFO uSER_FRIEND_INFO = obj.Data as USER_FRIEND_INFO; GS_WHISPER_REQ gS_WHISPER_REQ = new GS_WHISPER_REQ(); gS_WHISPER_REQ.RoomUnique = 0; TKString.StringChar(TKString.NEWString(uSER_FRIEND_INFO.szName), ref gS_WHISPER_REQ.Name); SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_WHISPER_REQ, gS_WHISPER_REQ); NrTSingleton <WhisperManager> .Instance.MySendRequest = true; }
public void UpdateFriend(USER_FRIEND_INFO kFriendInfo) { if (!this.m_dicFriendList.ContainsKey(kFriendInfo.nPersonID)) { return; } USER_FRIEND_INFO uSER_FRIEND_INFO = this.m_dicFriendList[kFriendInfo.nPersonID]; uSER_FRIEND_INFO.Update(kFriendInfo); }
public void AddFriend(USER_FRIEND_INFO kFriendInfo) { if (this.m_dicFriendList.ContainsKey(kFriendInfo.nPersonID)) { this.m_dicFriendList.Remove(kFriendInfo.nPersonID); } this.m_dicFriendList.Add(kFriendInfo.nPersonID, kFriendInfo); if (kFriendInfo.nPersonID > 10L && !this.m_dicFriendTextureData.ContainsKey(kFriendInfo.nPersonID)) { this.m_dicFriendTextureData.Add(kFriendInfo.nPersonID, null); string userPortraitURL = NrTSingleton <NkCharManager> .Instance.GetUserPortraitURL(kFriendInfo.nPersonID); WebFileCache.RequestImageWebFile(userPortraitURL, new WebFileCache.ReqTextureCallback(this.ReqWebUserImageCallback), kFriendInfo.nPersonID); } }
public void SetData(short nFloorIndex, short nFloorType) { string empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("649"), "floor", nFloorIndex.ToString() }); this.m_lbTitle.Text = empty; this.m_ListBox.Clear(); NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo; List <FRIEND_BABEL_CLEARINFO> babelFloor_FriendList = kMyCharInfo.m_kFriendInfo.GetBabelFloor_FriendList(nFloorIndex, nFloorType); if (babelFloor_FriendList != null) { for (int i = 0; i < babelFloor_FriendList.Count; i++) { USER_FRIEND_INFO friend = kMyCharInfo.m_kFriendInfo.GetFriend(babelFloor_FriendList[i].i64FriendPersonID); if (friend != null) { NewListItem newListItem = new NewListItem(5, true, string.Empty); Texture2D friendTexture = kMyCharInfo.GetFriendTexture(babelFloor_FriendList[i].i64FriendPersonID); if (friendTexture == null) { newListItem.SetListItemData(1, new NkListSolInfo { SolCharKind = friend.i32FaceCharKind, SolGrade = -1, SolLevel = friend.i16Level, SolCostumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(friend.i32FaceCharCostumeUnique) }, null, null, null); } else { newListItem.SetListItemData(1, friendTexture, null, null, null, null); } newListItem.SetListItemData(2, TKString.NEWString(friend.szName), null, null, null); newListItem.SetListItemData(3, "Lv." + friend.i16Level.ToString(), null, null, null); newListItem.SetListItemData(4, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("575"), friend, new EZValueChangedDelegate(this.BtClickWhisper), null); this.m_ListBox.Add(newListItem); } } } this.m_ListBox.RepositionItems(); }
public void UpdateFriendList(USER_FRIEND_INFO info) { COMMUNITY_USER_INFO cOMMUNITY_USER_INFO = new COMMUNITY_USER_INFO(); cOMMUNITY_USER_INFO.Set(info); foreach (COMMUNITY_USER_INFO current in this.m_CommunityUserList) { if (current.i64PersonID == info.nPersonID) { current.Update(info); break; } } if (cOMMUNITY_USER_INFO != null) { COMMUNITY_USER_INFO cOMMUNITY_USER_INFO2 = new COMMUNITY_USER_INFO(); cOMMUNITY_USER_INFO2.Set(info); this.m_CommunityUserList.Add(cOMMUNITY_USER_INFO2); } int a = this.m_CommunityUserList.Count / 14 + 1; this.LOADED_PAGE = Mathf.Max(a, this.LOADED_PAGE); }
public void SetList() { this.m_RecentBabelPlayerList.Clear(); for (int i = 0; i < 4; i++) { string s = string.Empty; s = PlayerPrefs.GetString("Babel JoinPlayer" + i, "0"); long num = long.Parse(s); if (num > 0L) { this.m_RecentBabelPlayerList.Add(num); } } NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo; NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); this.m_dicCommunityList.Clear(); foreach (USER_FRIEND_INFO uSER_FRIEND_INFO in kMyCharInfo.m_kFriendInfo.GetFriendInfoValues()) { if (!this.m_dicCommunityList.ContainsKey(uSER_FRIEND_INFO.nPersonID)) { if (0 >= SoldierBatch.BABELTOWER_INFO.BountHuntUnique || (int)uSER_FRIEND_INFO.i16Level >= COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_BOUNTY_INVITE_LEVEL)) { COMMUNITY_USER_INFO cOMMUNITY_USER_INFO = new COMMUNITY_USER_INFO(); cOMMUNITY_USER_INFO.Set(uSER_FRIEND_INFO); this.m_dicCommunityList.Add(uSER_FRIEND_INFO.nPersonID, cOMMUNITY_USER_INFO); } } } for (int j = 0; j < NrTSingleton <NewGuildManager> .Instance.GetMemberCount(); j++) { NewGuildMember memberInfoFromIndex = NrTSingleton <NewGuildManager> .Instance.GetMemberInfoFromIndex(j); if (memberInfoFromIndex != null) { if (memberInfoFromIndex.GetPersonID() != charPersonInfo.GetPersonID()) { if (!this.m_dicCommunityList.ContainsKey(memberInfoFromIndex.GetPersonID())) { if (0 >= SoldierBatch.BABELTOWER_INFO.BountHuntUnique || (int)memberInfoFromIndex.GetLevel() >= COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_BOUNTY_INVITE_LEVEL)) { COMMUNITY_USER_INFO cOMMUNITY_USER_INFO2 = new COMMUNITY_USER_INFO(); cOMMUNITY_USER_INFO2.Set(memberInfoFromIndex); this.m_dicCommunityList.Add(memberInfoFromIndex.GetPersonID(), cOMMUNITY_USER_INFO2); } } } } } foreach (BABEL_RNDINVITE_PERSON current in SoldierBatch.BABELTOWER_INFO.m_Babel_RndInvitePersonList) { if (!this.m_dicCommunityList.ContainsKey(current.i64PersonID)) { if (0 >= SoldierBatch.BABELTOWER_INFO.BountHuntUnique || (int)current.i16Level >= COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_BOUNTY_INVITE_LEVEL)) { USER_FRIEND_INFO uSER_FRIEND_INFO2 = new USER_FRIEND_INFO(); uSER_FRIEND_INFO2.nPersonID = current.i64PersonID; uSER_FRIEND_INFO2.szName = current.szCharName; uSER_FRIEND_INFO2.i16Level = current.i16Level; uSER_FRIEND_INFO2.i32WorldID_Connect = current.i32WorldID; uSER_FRIEND_INFO2.i32MapUnique = 1; COMMUNITY_USER_INFO cOMMUNITY_USER_INFO3 = new COMMUNITY_USER_INFO(); cOMMUNITY_USER_INFO3.Set(uSER_FRIEND_INFO2); this.m_dicCommunityList.Add(cOMMUNITY_USER_INFO3.i64PersonID, cOMMUNITY_USER_INFO3); } } } }
private int CompareFriendSolLevel(USER_FRIEND_INFO a, USER_FRIEND_INFO b) { return(b.FriendHelpSolInfo.iSolLevel.CompareTo(a.FriendHelpSolInfo.iSolLevel)); }
private bool CheckBattlePos() { if (this.m_nSelectStage <= 0 || this.m_nSubFloor < 0) { string textFromNotify = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("614"); Main_UI_SystemMessage.ADDMessage(textFromNotify, SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE); return(false); } NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo; BABELTOWER_DATA babelTowerData = NrTSingleton <BabelTowerManager> .Instance.GetBabelTowerData(this.m_nSelectStage, this.m_nSubFloor, this.m_nFloorType); if (babelTowerData == null) { TsLog.LogError("BABELTOWER_DATA == NULL FloorType ={0} Floor={1} SubFloor={2}", new object[] { this.m_nFloorType, this.m_nSelectStage, this.m_nSubFloor }); return(false); } if (!kMyCharInfo.IsEnableBattleUseActivityPoint(babelTowerData.m_nWillSpend)) { string textFromNotify2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("488"); Main_UI_SystemMessage.ADDMessage(textFromNotify2, SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE); return(false); } this.m_nMyBatchSolNum = 0; byte b; if (this.m_BatchUserSol != null) { b = 0; while ((int)b < this.MYSOL_NUM_MAX) { this.m_BatchUserSol[(int)b].Init(); b += 1; } } if (this.m_FriendBatch != null) { for (b = 0; b < 3; b += 1) { this.m_FriendBatch[(int)b].Init(); } } for (b = 1; b <= 20; b += 1) { if (this.m_nMyBatchSolNum >= this.MYSOL_NUM_MAX) { break; } if (b >= 17) { string value = "0"; PlayerPrefs.SetString(this.babel_solpos_string + b.ToString(), value); } else { string @string = PlayerPrefs.GetString(this.babel_solpos_string + b.ToString()); if (@string != string.Empty) { long num = long.Parse(@string); NkSoldierInfo soldierInfoFromSolID = charPersonInfo.GetSoldierInfoFromSolID(num); byte b2 = 0; byte nGridPos = 0; SoldierBatch.GetCalcBattlePos((long)b, ref b2, ref nGridPos); if (soldierInfoFromSolID != null) { if (soldierInfoFromSolID.GetSolPosType() == 1 || soldierInfoFromSolID.GetSolPosType() == 0 || soldierInfoFromSolID.GetSolPosType() == 2 || soldierInfoFromSolID.GetSolPosType() == 6) { this.m_BatchUserSol[this.m_nMyBatchSolNum].m_nSolID = num; this.m_BatchUserSol[this.m_nMyBatchSolNum].m_nGridPos = nGridPos; this.m_BatchUserSol[this.m_nMyBatchSolNum].m_bInjury = soldierInfoFromSolID.IsInjuryStatus(); this.m_nMyBatchSolNum++; } } } } } if (this.m_nMyBatchSolNum < this.MYSOL_NUM_MAX) { Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("610"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE); return(false); } List <byte> list = new List <byte>(); for (b = 0; b < 16; b += 1) { list.Add(b); } b = 0; while ((int)b < this.m_nMyBatchSolNum) { list.Remove(this.m_BatchUserSol[(int)b].m_nGridPos); b += 1; } this.m_kFriendSolList.Clear(); foreach (USER_FRIEND_INFO uSER_FRIEND_INFO in NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_kFriendInfo.GetFriendInfoValues()) { if (uSER_FRIEND_INFO.FriendHelpSolInfo.i64HelpSolID > 0L) { if (uSER_FRIEND_INFO.ui8HelpUse < 1) { this.m_kFriendSolList.Add(uSER_FRIEND_INFO); } } } this.m_kFriendSolList.Sort(new Comparison <USER_FRIEND_INFO>(this.CompareFriendSolLevel)); int num2 = 0; for (int i = 0; i < this.m_kFriendSolList.Count; i++) { if (num2 >= 3) { break; } USER_FRIEND_INFO uSER_FRIEND_INFO2 = this.m_kFriendSolList[i]; int index = UnityEngine.Random.Range(0, list.Count); byte b3 = list[index]; this.m_FriendBatch[num2].m_nPersonID = uSER_FRIEND_INFO2.nPersonID; this.m_FriendBatch[num2].m_nSolID = uSER_FRIEND_INFO2.FriendHelpSolInfo.i64HelpSolID; this.m_FriendBatch[num2].m_nGridPos = b3; this.m_FriendBatch[num2].m_bInjury = false; list.Remove(b3); num2++; } if (NrTSingleton <NkClientLogic> .Instance.IsWorldScene() && NrTSingleton <FormsManager> .Instance.GetForm(G_ID.BABELTOWER_REPEAT_MAIN_DLG) == null) { NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.BABELTOWER_REPEAT_MAIN_DLG); } return(true); }
public void ShowList() { this.m_bLoadComplete = false; this.m_kFloorInfo.Clear(); this.m_lbFloor.Clear(); bool flag = true; short num; if (this.m_nFloorType == 2) { TsAudioManager.Instance.AudioContainer.RequestAudioClip("BGM", "CHAOSTOWER", "HARDMODE", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay), string.Empty, true); TsAudioManager.Instance.AudioContainer.RequestAudioClip("AMB", "CHAOSTOWER", "HARDMODE", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay), string.Empty, true); num = (short)PlayerPrefs.GetInt(NrPrefsKey.LASTPLAY_BABELFLOOR_HARD, 1); this.m_laTitle.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2782")); NrTSingleton <FormsManager> .Instance.AttachEffectKey("FX_BABEL_MAIN_HARD", this.m_dtEffect, this.m_dtEffect.GetSize()); } else { TsAudioManager.Instance.AudioContainer.RequestAudioClip("BGM", "CHAOSTOWER", "START", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay), string.Empty, true); num = (short)PlayerPrefs.GetInt(NrPrefsKey.LASTPLAY_BABELFLOOR, 1); this.m_laTitle.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1377")); NrTSingleton <FormsManager> .Instance.AttachEffectKey("FX_BABEL_MAIN", this.m_dtEffect, this.m_dtEffect.GetSize()); } short num2 = NrTSingleton <BabelTowerManager> .Instance.GetLastFloor(this.m_nFloorType); int babelTowerLastFloor = NrTSingleton <ContentsLimitManager> .Instance.GetBabelTowerLastFloor(this.m_nFloorType); if (0 < babelTowerLastFloor && babelTowerLastFloor < (int)num2) { num2 = (short)babelTowerLastFloor; } NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo(); COMMON_CONSTANT_Manager instance = COMMON_CONSTANT_Manager.GetInstance(); int num3 = 0; if (instance != null) { num3 = instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_BABEL_REPEAT); } if (myCharInfo.GetLevel() < num3) { this.m_dtLock.Visible = true; } else { this.m_dtLock.Visible = false; } short num4 = num2 / 5; string text = string.Empty; string text2 = string.Empty; string text3 = string.Empty; NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo; for (short num5 = num4; num5 > 0; num5 -= 1) { string text4 = string.Empty; if (flag) { text4 = string.Format("Mobile/DLG/BabelTower/newlistbox_floor_columndata{0}", NrTSingleton <UIDataManager> .Instance.AddFilePath); } else { text4 = string.Format("Mobile/DLG/BabelTower/newlistbox_floor1_columndata{0}", NrTSingleton <UIDataManager> .Instance.AddFilePath); } this.m_lbFloor.SetColumnData(text4); NewListItem newListItem = new NewListItem(this.m_lbFloor.ColumnNum, true, string.Empty); newListItem.m_szColumnData = text4; if (!flag) { if (this.m_nFloorType == 2) { newListItem.SetListItemData(0, "UI/BabelTower/babel_hard_main1", true, null, null); } else { newListItem.SetListItemData(0, "UI/BabelTower/babel_main1", true, null, null); } } else if (this.m_nFloorType == 2) { newListItem.SetListItemData(0, "UI/BabelTower/babel_hard_main2", true, null, null); } else { newListItem.SetListItemData(0, "UI/BabelTower/babel_main2", true, null, null); } for (int i = 4; i >= 0; i--) { List <FRIEND_BABEL_CLEARINFO> babelFloor_FriendList = kMyCharInfo.m_kFriendInfo.GetBabelFloor_FriendList(num2, this.m_nFloorType); if (babelFloor_FriendList != null) { for (int j = 0; j < 3; j++) { if (babelFloor_FriendList.Count >= j + 1) { USER_FRIEND_INFO friend = kMyCharInfo.m_kFriendInfo.GetFriend(babelFloor_FriendList[j].i64FriendPersonID); if (friend != null) { Texture2D friendTexture = kMyCharInfo.GetFriendTexture(babelFloor_FriendList[j].i64FriendPersonID); if (friendTexture == null) { NkListSolInfo nkListSolInfo = new NkListSolInfo(); nkListSolInfo.SolCharKind = friend.i32FaceCharKind; nkListSolInfo.SolGrade = -1; nkListSolInfo.SolLevel = friend.i16Level; nkListSolInfo.SolCostumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(friend.i32FaceCharCostumeUnique); newListItem.SetListItemData(i * 6 + 7 + j * 2, nkListSolInfo, num2, new EZValueChangedDelegate(this.BtClickFloorFriendList), null); } else { newListItem.SetListItemData(i * 6 + 7 + j * 2, friendTexture, num2, null, new EZValueChangedDelegate(this.BtClickFloorFriendList), null); } newListItem.SetListItemData(i * 6 + 6 + j * 2, !flag); newListItem.SetListItemData(i * 6 + 7 + j * 2, !flag); } } else { newListItem.SetListItemData(i * 6 + 6 + j * 2, false); newListItem.SetListItemData(i * 6 + 7 + j * 2, false); } } } else { newListItem.SetListItemData(i * 6 + 6, false); newListItem.SetListItemData(i * 6 + 6 + 2, false); newListItem.SetListItemData(i * 6 + 6 + 4, false); newListItem.SetListItemData(i * 6 + 7, false); newListItem.SetListItemData(i * 6 + 7 + 2, false); newListItem.SetListItemData(i * 6 + 7 + 4, false); } newListItem.SetListItemData(i + 36, false); newListItem.SetListItemData(i + 41, false); newListItem.SetListItemData(i + 5 + 41, false); if (num2 / 100 >= 1) { short num6 = num2 / 100; short num7 = num2 / 10 % 10; short num8 = num2 % 10; text = "Win_Number_" + num6; text2 = "Win_Number_" + num7; text3 = "Win_Number_" + num8; newListItem.SetListItemData(i + 6 + 41, true); newListItem.SetListItemData(i + 6 + 41, text, null, null, null); newListItem.SetListItemData(i + 41, true); newListItem.SetListItemData(i + 41, text2, null, null, null); newListItem.SetListItemData(i + 5 + 41, true); newListItem.SetListItemData(i + 5 + 41, text3, null, null, null); } else if (num2 / 10 <= 0 && num2 % 10 > 0) { text = "Win_Number_" + num2; newListItem.SetListItemData(i + 36, true); newListItem.SetListItemData(i + 36, text, null, null, null); } else { short num9 = num2 / 10; short num10 = num2 % 10; text = "Win_Number_" + num9; text2 = "Win_Number_" + num10; newListItem.SetListItemData(i + 41, true); newListItem.SetListItemData(i + 41, text, null, null, null); newListItem.SetListItemData(i + 5 + 41, true); newListItem.SetListItemData(i + 5 + 41, text2, null, null, null); } byte babelFloorRankInfo = kMyCharInfo.GetBabelFloorRankInfo(num2, this.m_nFloorType); bool treasure = kMyCharInfo.IsBabelTreasure(num2, this.m_nFloorType); UIBaseInfoLoader loader = NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary(NrTSingleton <BabelTowerManager> .Instance.GetBabelRankImgText(babelFloorRankInfo, treasure)); newListItem.SetListItemData(i + 1, loader, num2, new EZValueChangedDelegate(this.BtClickFloor), null); if (num2 == num) { this.m_nSelectindex = num4 - num5; } num2 -= 1; } newListItem.Data = (int)(num5 - 1); flag = !flag; this.m_lbFloor.Add(newListItem); this.m_kFloorInfo.Add((int)num5); } this.m_lbFloor.RepositionItems(); if (!this.m_lbFloor.ReUse) { this.m_lbFloor.SetSelectedItem((int)this.m_nSelectindex); } }
public NewListItem MakeFloorInfo(short floor) { short num = floor * 5; string text = string.Empty; string text2 = string.Empty; string text3 = string.Empty; NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo; string text4 = string.Empty; bool flag = false; if (floor % 2 == 0) { flag = true; } if (flag) { text4 = string.Format("Mobile/DLG/BabelTower/newlistbox_floor_columndata{0}", NrTSingleton <UIDataManager> .Instance.AddFilePath); } else { text4 = string.Format("Mobile/DLG/BabelTower/newlistbox_floor1_columndata{0}", NrTSingleton <UIDataManager> .Instance.AddFilePath); } this.m_lbFloor.SetColumnData(text4); NewListItem newListItem = new NewListItem(this.m_lbFloor.ColumnNum, true, string.Empty); newListItem.m_szColumnData = text4; if (!flag) { if (this.m_nFloorType == 2) { newListItem.SetListItemData(0, "UI/BabelTower/babel_hard_main1", true, null, null); } else { newListItem.SetListItemData(0, "UI/BabelTower/babel_main1", true, null, null); } } else if (this.m_nFloorType == 2) { newListItem.SetListItemData(0, "UI/BabelTower/babel_hard_main2", true, null, null); } else { newListItem.SetListItemData(0, "UI/BabelTower/babel_main2", true, null, null); } for (int i = 4; i >= 0; i--) { newListItem.SetListItemData(i * 6 + 6, false); newListItem.SetListItemData(i * 6 + 6 + 2, false); newListItem.SetListItemData(i * 6 + 6 + 4, false); newListItem.SetListItemData(i * 6 + 7, false); newListItem.SetListItemData(i * 6 + 7 + 2, false); newListItem.SetListItemData(i * 6 + 7 + 4, false); List <FRIEND_BABEL_CLEARINFO> babelFloor_FriendList = kMyCharInfo.m_kFriendInfo.GetBabelFloor_FriendList(num, this.m_nFloorType); if (babelFloor_FriendList != null) { for (int j = 0; j < 3; j++) { if (babelFloor_FriendList.Count >= j + 1) { USER_FRIEND_INFO friend = kMyCharInfo.m_kFriendInfo.GetFriend(babelFloor_FriendList[j].i64FriendPersonID); if (friend != null) { Texture2D friendTexture = kMyCharInfo.GetFriendTexture(babelFloor_FriendList[j].i64FriendPersonID); if (friendTexture == null) { NkListSolInfo nkListSolInfo = new NkListSolInfo(); nkListSolInfo.SolCharKind = friend.i32FaceCharKind; nkListSolInfo.SolGrade = -1; nkListSolInfo.SolLevel = friend.i16Level; nkListSolInfo.SolCostumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(friend.i32FaceCharCostumeUnique); newListItem.SetListItemData(i * 6 + 7 + j * 2, nkListSolInfo, num, new EZValueChangedDelegate(this.BtClickFloorFriendList), null); } else { newListItem.SetListItemData(i * 6 + 7 + j * 2, friendTexture, num, null, new EZValueChangedDelegate(this.BtClickFloorFriendList), null); } newListItem.SetListItemData(i * 6 + 6 + j * 2, !flag); newListItem.SetListItemData(i * 6 + 7 + j * 2, !flag); } } else { newListItem.SetListItemData(i * 6 + 6 + j * 2, false); newListItem.SetListItemData(i * 6 + 7 + j * 2, false); } } } else { newListItem.SetListItemData(i * 6 + 6, false); newListItem.SetListItemData(i * 6 + 6 + 2, false); newListItem.SetListItemData(i * 6 + 6 + 4, false); newListItem.SetListItemData(i * 6 + 7, false); newListItem.SetListItemData(i * 6 + 7 + 2, false); newListItem.SetListItemData(i * 6 + 7 + 4, false); } newListItem.SetListItemData(i + 36, false); newListItem.SetListItemData(i + 41, false); newListItem.SetListItemData(i + 5 + 41, false); if (num / 100 >= 1) { short num2 = num / 100; short num3 = num / 10 % 10; short num4 = num % 10; text = "Win_Number_" + num2; text2 = "Win_Number_" + num3; text3 = "Win_Number_" + num4; newListItem.SetListItemData(i + 6 + 41, true); newListItem.SetListItemData(i + 6 + 41, text, null, null, null); newListItem.SetListItemData(i + 41, true); newListItem.SetListItemData(i + 41, text2, null, null, null); newListItem.SetListItemData(i + 5 + 41, true); newListItem.SetListItemData(i + 5 + 41, text3, null, null, null); } else if (num / 10 <= 0 && num % 10 > 0) { text = "Win_Number_" + num; newListItem.SetListItemData(i + 36, true); newListItem.SetListItemData(i + 36, text, null, null, null); newListItem.SetListItemData(i + 6 + 41, false); } else { short num5 = num / 10; short num6 = num % 10; text = "Win_Number_" + num5; text2 = "Win_Number_" + num6; newListItem.SetListItemData(i + 41, true); newListItem.SetListItemData(i + 41, text, null, null, null); newListItem.SetListItemData(i + 5 + 41, true); newListItem.SetListItemData(i + 5 + 41, text2, null, null, null); if (num6 == 0) { newListItem.SetListItemData(i + 6 + 41, false); } } if (num >= 9) { newListItem.SetListItemData(50, true); } byte babelFloorRankInfo = kMyCharInfo.GetBabelFloorRankInfo(num, this.m_nFloorType); bool treasure = kMyCharInfo.IsBabelTreasure(num, this.m_nFloorType); UIBaseInfoLoader loader = NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary(NrTSingleton <BabelTowerManager> .Instance.GetBabelRankImgText(babelFloorRankInfo, treasure)); newListItem.SetListItemData(i + 1, loader, num, new EZValueChangedDelegate(this.BtClickFloor), null); num -= 1; } return(newListItem); }