public void SetUserTextureUpdate(Texture2D _Texture, long i64PersonID) { for (int i = 0; i < this.m_MemberList.Count; i++) { NewGuildMember newGuildMember = this.m_MemberList[i]; if (newGuildMember == null) { return; } if (i64PersonID == newGuildMember.GetPersonID()) { NewListItem newListItem = new NewListItem(this.m_nlbMember.ColumnNum, true, string.Empty); newListItem.SetListItemData(0, true); newListItem.SetListItemData(1, _Texture, null, null, null, null); newListItem.SetListItemData(2, newGuildMember.GetCharName(), null, null, null); newListItem.SetListItemData(3, string.Empty, newGuildMember, new EZValueChangedDelegate(this.ClickRightMenu), null); string empty = string.Empty; string empty2 = string.Empty; NewGuildMemberDlg.CurrentLocationName(newGuildMember, ref empty, ref empty2); newListItem.SetListItemData(4, NrTSingleton <CTextParser> .Instance.GetTextColor(empty2) + empty, null, null, null); string rankText = newGuildMember.GetRankText(); newListItem.SetListItemData(5, rankText, null, null, null); newListItem.SetListItemData(6, newGuildMember.GetLevel().ToString(), null, null, null); newListItem.SetListItemData(7, newGuildMember.GetContribute().ToString(), null, null, null); newListItem.Data = newGuildMember; this.m_nlbMember.RemoveAdd(i, newListItem); this.m_nlbMember.RepositionItems(); break; } } }
public void Set(NewGuildMember _guildmember) { this.strName = _guildmember.GetCharName(); this.i16Level = _guildmember.GetLevel(); this.i32WorldID_Connect = _guildmember.GetConnectedWorldID(); this.i64PersonID = _guildmember.GetPersonID(); this.bConnect = (_guildmember.GetMapUnique() > 0); this.i32MapUnique = _guildmember.GetMapUnique(); this.i32FaceCharKind = _guildmember.GetFaceCharKind(); this.i32CostumeUnique = _guildmember.GetCostumeUnique(); }
public bool SetGuildMemberUpdate(NewGuildMember GuildMember, int iIndex) { if (GuildMember == null) { return(false); } NewListItem newListItem = new NewListItem(this.m_nlbMember.ColumnNum, true, string.Empty); newListItem.SetListItemData(0, true); if (NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(GuildMember.GetFaceCharKind()) == null) { return(false); } EVENT_HERODATA eventHeroCharFriendCode = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCharFriendCode(GuildMember.GetFaceCharKind()); if (eventHeroCharFriendCode != null) { newListItem.SetListItemData(0, "Win_I_EventSol", null, null, null); newListItem.EventMark = true; } newListItem.SetListItemData(1, this.GetGuildMemberPortraitInfo(GuildMember), null, null, null); newListItem.SetListItemData(2, GuildMember.GetCharName(), null, null, null); newListItem.SetListItemData(3, string.Empty, GuildMember, new EZValueChangedDelegate(this.ClickRightMenu), null); string empty = string.Empty; string empty2 = string.Empty; bool result = NewGuildMemberDlg.CurrentLocationName(GuildMember, ref empty, ref empty2); newListItem.SetListItemData(4, NrTSingleton <CTextParser> .Instance.GetTextColor(empty2) + empty, null, null, null); string rankText = GuildMember.GetRankText(); newListItem.SetListItemData(5, rankText, null, null, null); newListItem.SetListItemData(6, GuildMember.GetLevel().ToString(), null, null, null); newListItem.SetListItemData(7, GuildMember.GetContribute().ToString(), null, null, null); newListItem.Data = GuildMember; this.m_nlbMember.Add(newListItem); this.m_nlbMember.RepositionItems(); return(result); }
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 CompareLevelASC(NewGuildMember a, NewGuildMember b) { return(a.GetLevel().CompareTo(b.GetLevel())); }
public void SetInfo() { NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo; if (kMyCharInfo == null) { return; } string text = string.Empty; string text2 = string.Empty; BABEL_GUILDBOSS babelGuildBossinfo = NrTSingleton <BabelTowerManager> .Instance.GetBabelGuildBossinfo(this.m_GuildBossFloor); if (babelGuildBossinfo == null) { return; } NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(babelGuildBossinfo.m_nBossKind); this.m_laGuildBossName.Text = charKindInfo.GetName(); this.m_dtBossImg.SetTexture(eCharImageType.LARGE, charKindInfo.GetCharKind(), -1, string.Empty); text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1808"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[] { text, "count1", ANNUALIZED.Convert(this.m_i32CurBossHp), "count2", ANNUALIZED.Convert(babelGuildBossinfo.m_nBossMaxHP) }); this.m_laGuildBossHp.Text = text2; float num = (float)this.m_i32CurBossHp / (float)babelGuildBossinfo.m_nBossMaxHP; this.m_dtBossCurHP.SetSize(this.BOSSHP_BAR_WIDTH * num, this.m_dtBossCurHP.GetSize().y); text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1697"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[] { text, "itemname", NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(babelGuildBossinfo.m_nBaseReward_ItemUnique), "count", babelGuildBossinfo.m_nBaseReward_ItemNum }); this.m_lbRewardBaseItemNum.Text = text2; int num2 = (babelGuildBossinfo.m_nReward_BaseMoney * kMyCharInfo.GetLevel() >= babelGuildBossinfo.m_nReward_BaseMoney_Max) ? babelGuildBossinfo.m_nReward_BaseMoney_Max : (babelGuildBossinfo.m_nReward_BaseMoney * kMyCharInfo.GetLevel()); this.m_laBasicReward.Text = ANNUALIZED.Convert(num2); this.m_dtRewardBaseItem.SetTexture(NrTSingleton <ItemManager> .Instance.GetItemTexture(babelGuildBossinfo.m_nBaseReward_ItemUnique)); this.SortMemberInfo(); int num3 = 1; bool flag = false; bool flag2 = false; this.m_lbGuildMemberList.Clear(); for (int i = 0; i < this.m_listMemberInfo.Count; i++) { NEWGUILD_BOSS_PLAYER_INFO nEWGUILD_BOSS_PLAYER_INFO = this.m_listMemberInfo[i]; NewGuildMember memberInfoFromPersonID = NrTSingleton <NewGuildManager> .Instance.GetMemberInfoFromPersonID(nEWGUILD_BOSS_PLAYER_INFO.i64PersonID); if (memberInfoFromPersonID != null) { if (this.m_byRoomState != 3 && nEWGUILD_BOSS_PLAYER_INFO.i64PersonID == NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_PersonID) { flag2 = true; } bool flag3 = false; NewListItem newListItem = new NewListItem(this.m_lbGuildMemberList.ColumnNum, true, string.Empty); Texture2D portrait = memberInfoFromPersonID.GetPortrait(); if (this.m_byRoomState == 3) { if (nEWGUILD_BOSS_PLAYER_INFO.i64PersonID == NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_PersonID) { flag = true; } if (nEWGUILD_BOSS_PLAYER_INFO.i64PersonID == this.ClearPersonID) { this.m_itClearUserFace.Visible = true; if (portrait != null) { this.m_itClearUserFace.SetTexture(portrait); } else { NkListSolInfo nkListSolInfo = new NkListSolInfo(); nkListSolInfo.SolCharKind = memberInfoFromPersonID.GetFaceCharKind(); nkListSolInfo.SolLevel = memberInfoFromPersonID.GetLevel(); nkListSolInfo.SolCostumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(memberInfoFromPersonID.GetCostumeUnique()); nkListSolInfo.SolGrade = -1; this.m_itClearUserFace.SetSolImageTexure(eCharImageType.SMALL, nkListSolInfo, false); } this.m_lbClearUserName.SetText(memberInfoFromPersonID.GetCharName()); this.m_lbClearUserName.Visible = true; newListItem.SetListItemData(21, true); newListItem.SetListItemData(8, false); flag3 = true; } } if (!flag3) { newListItem.SetListItemData(12, false); } newListItem.SetListItemData(2, memberInfoFromPersonID.GetCharName(), null, null, null); text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1915"); newListItem.SetListItemData(3, text2, null, null, null); float num4 = (float)nEWGUILD_BOSS_PLAYER_INFO.i32Damage / (float)babelGuildBossinfo.m_nBossMaxHP; float num5 = num4 * 340f; newListItem.SetListItemData(5, string.Empty, num5, null, null); text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1916"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[] { text, "count1", ANNUALIZED.Convert(nEWGUILD_BOSS_PLAYER_INFO.i32Damage), "count2", (int)(num4 * 100f) }); newListItem.SetListItemData(6, text2, null, null, null); if (portrait != null) { newListItem.SetListItemData(7, portrait, null, null, null, null); } else { newListItem.SetListItemData(7, new NkListSolInfo { SolCharKind = memberInfoFromPersonID.GetFaceCharKind(), SolLevel = memberInfoFromPersonID.GetLevel(), SolCostumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(memberInfoFromPersonID.GetCostumeUnique()), SolGrade = -1 }, null, null, null); } if (!flag3) { text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1186"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[] { text, "count", num3 }); newListItem.SetListItemData(9, text2, null, null, null); } else { newListItem.SetListItemData(9, false); } newListItem.SetListItemData(10, memberInfoFromPersonID.GetRankText(), null, null, null); this.m_lbGuildMemberList.Add(newListItem); num3++; } } this.m_lbGuildMemberList.RepositionItems(); if (flag2 && !flag) { this.m_btGuildBossStart.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3292")); } else { this.m_btGuildBossStart.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("633")); } if (!flag) { Button expr_596 = this.m_btGuildBossStart; expr_596.Click = (EZValueChangedDelegate)Delegate.Combine(expr_596.Click, new EZValueChangedDelegate(this.OnClickStart)); } else { this.m_btGuildBossStart.SetEnabled(false); } if (this.m_byRoomState == 3) { this.m_dtBossVictoyImg.Visible = true; this.m_dtClearUserBG.Visible = true; this.m_dtClearBG.Visible = true; } }
public void UpdateFloor(short floor) { NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo; short num = floor / 5; if (floor % 5 != 0) { num += 1; } short num2 = (floor - 1) % 5; NewListItem newListItem = this.CreateItem(num); if (newListItem != null) { bool flag = this.GuildBossRewardCheck(); if (flag) { this.m_dtNotice.Visible = true; } for (int i = 0; i < this.m_lbFloor.Count; i++) { IUIListObject item = this.m_lbFloor.GetItem(i); if (item != null && (short)item.Data == num) { NEWGUILD_MY_BOSS_ROOMINFO guildBossMyRoomInfo = kMyCharInfo.GetGuildBossMyRoomInfo(floor); bool guildBossRoomStateInfo = kMyCharInfo.GetGuildBossRoomStateInfo(floor); DrawTexture drawTexture = ((UIListItemContainer)item).GetElement((int)(51 + num2)) as DrawTexture; if (guildBossMyRoomInfo != null && guildBossMyRoomInfo.byRoomState != 0) { drawTexture.Visible = guildBossRoomStateInfo; drawTexture.SetTexture("Win_I_Notice04"); } UIButton uIButton = ((UIListItemContainer)item).GetElement((int)(num2 + 1)) as UIButton; DrawTexture drawTexture2 = ((UIListItemContainer)item).GetElement((int)(56 + num2 * 2)) as DrawTexture; if (drawTexture2 != null) { drawTexture2.Visible = false; } ItemTexture itemTexture = ((UIListItemContainer)item).GetElement((int)(56 + num2 * 2 + 1)) as ItemTexture; if (itemTexture != null) { itemTexture.Visible = false; } if (guildBossMyRoomInfo != null) { if (guildBossMyRoomInfo.i64PlayPersonID > 0L) { if (drawTexture2 != null) { drawTexture2.Visible = true; } if (itemTexture != null) { itemTexture.Visible = true; } NewGuildMember memberInfoFromPersonID = NrTSingleton <NewGuildManager> .Instance.GetMemberInfoFromPersonID(guildBossMyRoomInfo.i64PlayPersonID); if (memberInfoFromPersonID != null) { if (memberInfoFromPersonID.GetPortrait() != null) { itemTexture.SetTexture(memberInfoFromPersonID.GetPortrait()); itemTexture.AddValueChangedDelegate(new EZValueChangedDelegate(this.BtnClickMemberInfo)); itemTexture.Data = guildBossMyRoomInfo.i64PlayPersonID; } else { itemTexture.SetSolImageTexure(eCharImageType.SMALL, new NkListSolInfo { SolCharKind = memberInfoFromPersonID.GetFaceCharKind(), SolGrade = -1, SolLevel = memberInfoFromPersonID.GetLevel() }, false); itemTexture.AddValueChangedDelegate(new EZValueChangedDelegate(this.BtnClickMemberInfo)); itemTexture.Data = guildBossMyRoomInfo.i64PlayPersonID; } } } string effectKey = string.Empty; if (guildBossMyRoomInfo != null) { effectKey = this.GetRoomStateEffect(guildBossMyRoomInfo.byRoomState); } else { effectKey = this.GetRoomStateEffect(0); } if (uIButton != null) { uIButton.DeleteChildEffect(); NrTSingleton <FormsManager> .Instance.AttachEffectKey(effectKey, uIButton, uIButton.GetSize()); } } break; } } } }
public NewListItem CreateItem(short Column) { NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo; string text = string.Empty; string text2 = string.Empty; short num = Column * 5; bool flag = Column % 2 == 0; short guildBossLastFloor = NrTSingleton <ContentsLimitManager> .Instance.GetGuildBossLastFloor(); string columnData = string.Empty; if (flag) { columnData = string.Format("Mobile/DLG/GuildBoss/newlistbox_floor_columndata{0}", NrTSingleton <UIDataManager> .Instance.AddFilePath); } else { columnData = string.Format("Mobile/DLG/GuildBoss/newlistbox_floor1_columndata{0}", NrTSingleton <UIDataManager> .Instance.AddFilePath); } this.m_lbFloor.SetColumnData(columnData); NewListItem newListItem = new NewListItem(this.m_lbFloor.ColumnNum, true, string.Empty); if (!flag) { newListItem.SetListItemData(0, "UI/BabelTower/boss_main1", true, null, null); } else { newListItem.SetListItemData(0, "UI/BabelTower/boss_main2", true, null, null); } bool flag2 = this.GuildBossRewardCheck(); if (flag2) { this.m_dtNotice.Visible = true; } 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); newListItem.SetListItemData(i + 36, false); newListItem.SetListItemData(i + 41, false); newListItem.SetListItemData(i + 5 + 41, false); newListItem.SetListItemData(i + 1, false); newListItem.SetListItemData(51 + i, false); newListItem.SetListItemData(56 + i * 2, false); newListItem.SetListItemData(56 + i * 2 + 1, false); if (num <= guildBossLastFloor) { newListItem.SetListItemData(i + 1, true); if (num / 10 <= 0 && num % 10 > 0) { text = "Win_Number_" + num; newListItem.SetListItemData(i + 36, true); newListItem.SetListItemData(i + 36, text, null, null, null); } else { short num2 = num / 10; short num3 = num % 10; text = "Win_Number_" + num2; text2 = "Win_Number_" + num3; 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); } newListItem.SetListItemData(i + 1, string.Empty, num, new EZValueChangedDelegate(this.BtClickFloor), null); newListItem.SetListItemData(51 + i, false); newListItem.SetListItemData(51 + i, "Win_I_Notice04", null, null, null); NEWGUILD_MY_BOSS_ROOMINFO guildBossMyRoomInfo = kMyCharInfo.GetGuildBossMyRoomInfo(num); if (guildBossMyRoomInfo != null) { if (this.m_SelectFloor < num) { this.m_Selectindex = Column; this.m_SelectFloor = num; } if (guildBossMyRoomInfo.i64PlayPersonID > 0L) { newListItem.SetListItemData(56 + i * 2, true); newListItem.SetListItemData(56 + i * 2 + 1, true); NewGuildMember memberInfoFromPersonID = NrTSingleton <NewGuildManager> .Instance.GetMemberInfoFromPersonID(guildBossMyRoomInfo.i64PlayPersonID); if (memberInfoFromPersonID != null) { if (memberInfoFromPersonID.GetPortrait() != null) { newListItem.SetListItemData(56 + i * 2 + 1, memberInfoFromPersonID.GetPortrait(), guildBossMyRoomInfo.i64PlayPersonID, null, new EZValueChangedDelegate(this.BtnClickMemberInfo), null); } else { NkListSolInfo nkListSolInfo = new NkListSolInfo(); nkListSolInfo.SolCharKind = memberInfoFromPersonID.GetFaceCharKind(); nkListSolInfo.SolGrade = -1; nkListSolInfo.SolLevel = memberInfoFromPersonID.GetLevel(); newListItem.SetListItemData(56 + i * 2 + 1, nkListSolInfo, guildBossMyRoomInfo.i64PlayPersonID, new EZValueChangedDelegate(this.BtnClickMemberInfo), null); } } } } } num -= 1; } flag = !flag; newListItem.Data = Column; return(newListItem); }
public void AddGuildList() { this.m_nlbGiftTarget.Clear(); this.m_TargetInfoList.Clear(); for (int i = 0; i < NrTSingleton <NewGuildManager> .Instance.GetMemberCount(); i++) { NewGuildMember memberInfoFromIndex = NrTSingleton <NewGuildManager> .Instance.GetMemberInfoFromIndex(i); if (memberInfoFromIndex != null) { if (NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_PersonID != memberInfoFromIndex.GetPersonID()) { ItemGiftTargetDlg.TARGET_INFO tARGET_INFO = new ItemGiftTargetDlg.TARGET_INFO(); tARGET_INFO.SetInfo(memberInfoFromIndex.GetCharName(), memberInfoFromIndex.GetPersonID(), memberInfoFromIndex.GetLevel(), memberInfoFromIndex.GetFaceCharKind()); this.m_TargetInfoList.Add(tARGET_INFO); } } } if (0 < this.m_TargetInfoList.Count) { this.m_TargetInfoList.Sort(new Comparison <ItemGiftTargetDlg.TARGET_INFO>(this.CompareNameDESC)); for (int i = 0; i < this.m_TargetInfoList.Count; i++) { NewListItem newListItem = this.GetNewListItem(this.m_TargetInfoList[i]); if (newListItem != null) { this.m_nlbGiftTarget.Add(newListItem); } } } this.m_nlbGiftTarget.RepositionItems(); }