public void MakeGuildWarListItem(byte iRaidUnique) { NewListItem newListItem = new NewListItem(this.m_nlbGuildWarList.ColumnNum, true); newListItem.Data = iRaidUnique; bool flag = false; GUILDWAR_APPLY_INFO guildWarApplyInfo = this.GetGuildWarApplyInfo(NrTSingleton <NewGuildManager> .Instance.GetGuildID(), iRaidUnique); if (guildWarApplyInfo != null) { switch (guildWarApplyInfo.ui8MilitaryStatus) { case 0: newListItem.SetListItemData(0, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1323"), iRaidUnique, new EZValueChangedDelegate(this.ClickGuildWarApply), null); newListItem.SetListItemData(3, false); newListItem.SetListItemData(4, false); break; case 1: if (guildWarApplyInfo.i64MilitaryActionTime > 0L) { newListItem.SetListItemData(0, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1615"), iRaidUnique, new EZValueChangedDelegate(this.ClickGuildWarApplyCancel), null); this.m_strText = this.GetTimeToString(guildWarApplyInfo.i64MilitaryActionTime); if (this.m_strText != string.Empty) { this.m_strTime = string.Format("{0} : {1}", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1525"), this.m_strText); newListItem.SetListItemData(3, this.m_strTime, null, null, null); } else { newListItem.SetListItemData(3, false); } newListItem.SetListItemData(4, false); } else { newListItem.SetListItemData(0, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1615"), iRaidUnique, new EZValueChangedDelegate(this.ClickGuildWarApplyCancel), null); newListItem.SetListItemData(3, false); newListItem.SetListItemData(4, false); } break; case 2: newListItem.SetListItemData(0, false); if (guildWarApplyInfo.i64MilitaryActionTime > 0L) { this.m_strText = this.GetTimeToString(guildWarApplyInfo.i64MilitaryActionTime); if (this.m_strText != string.Empty) { this.m_strTime = string.Format("{0} : {1}", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1526"), this.m_strText); newListItem.SetListItemData(4, this.m_strTime, null, null, null); } else { newListItem.SetListItemData(4, false); } newListItem.SetListItemData(3, false); } else { newListItem.SetListItemData(3, false); newListItem.SetListItemData(4, false); } break; } this.m_strText = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1615"); if (guildWarApplyInfo.i64MilitaryActionTime > 0L) { NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2549"), "count", (int)(iRaidUnique + 1) }); } } else { newListItem.SetListItemData(0, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1323"), iRaidUnique, new EZValueChangedDelegate(this.ClickGuildWarApply), null); newListItem.SetListItemData(3, false); newListItem.SetListItemData(4, false); } if (!flag) { } NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2549"), "count", (int)(iRaidUnique + 1) }); newListItem.SetListItemData(1, this.m_strText, null, null, null); newListItem.SetListItemData(2, this.m_strText, null, null, null); newListItem.SetListItemData(5, string.Empty, iRaidUnique, new EZValueChangedDelegate(this.ClickMyMilitaryDetail), null); newListItem.SetListItemData(6, string.Empty, iRaidUnique, new EZValueChangedDelegate(this.ClickEnemyMilitaryDetail), null); int raidFaceCharKind = this.GetRaidFaceCharKind(NrTSingleton <NewGuildManager> .Instance.GetGuildID(), iRaidUnique); NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(raidFaceCharKind); if (charKindInfo != null) { newListItem.SetListItemData(7, raidFaceCharKind, null, null, null); } else { newListItem.SetListItemData(7, true); } int raidFaceCharKind2 = this.GetRaidFaceCharKind(NrTSingleton <GuildWarManager> .Instance.GuildWarGuildID, iRaidUnique); charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(raidFaceCharKind2); if (charKindInfo != null) { newListItem.SetListItemData(8, raidFaceCharKind2, null, null, null); } else { newListItem.SetListItemData(8, true); } NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1984"), "count1", this.GetRaidMilitaryCount(NrTSingleton <NewGuildManager> .Instance.GetGuildID(), iRaidUnique), "count2", 9 }); newListItem.SetListItemData(9, this.m_strText, null, null, null); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1984"), "count1", this.GetRaidMilitaryCount(NrTSingleton <GuildWarManager> .Instance.GuildWarGuildID, iRaidUnique), "count2", 9 }); newListItem.SetListItemData(10, this.m_strText, null, null, null); this.m_nlbGuildWarList.Add(newListItem); }
public void UpdateTime() { if (NrTSingleton <GuildWarManager> .Instance.GuildWarStartTime > 0L) { this.m_strText = this.GetTimeToString(NrTSingleton <GuildWarManager> .Instance.GuildWarStartTime); if (this.m_strText != string.Empty) { NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strTime, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1763"), "timestring", this.m_strText }); this.m_lbState.SetText(this.m_strTime); } else { this.m_lbState.SetText(string.Empty); } } else { this.m_lbState.SetText(string.Empty); } for (int i = 0; i < this.m_nlbGuildWarList.Count; i++) { UIListItemContainer uIListItemContainer = this.m_nlbGuildWarList.GetItem(i) as UIListItemContainer; if (!(uIListItemContainer == null)) { byte b = (byte)uIListItemContainer.Data; if ((short)b < NrTSingleton <GuildWarManager> .Instance.GuildWarRound) { GUILDWAR_APPLY_INFO guildWarApplyInfo = this.GetGuildWarApplyInfo(NrTSingleton <NewGuildManager> .Instance.GetGuildID(), b); if (guildWarApplyInfo != null) { eGUILDWAR_MILITARY_STATE ui8MilitaryStatus = (eGUILDWAR_MILITARY_STATE)guildWarApplyInfo.ui8MilitaryStatus; if (ui8MilitaryStatus != eGUILDWAR_MILITARY_STATE.eGUILDWAR_MILITARY_STATE_MOVE) { if (ui8MilitaryStatus == eGUILDWAR_MILITARY_STATE.eGUILDWAR_MILITARY_STATE_MOVECANCEL) { if (guildWarApplyInfo.i64MilitaryActionTime > 0L) { Label label = uIListItemContainer.GetElement(4) as Label; if (label != null) { this.m_strText = this.GetTimeToString(guildWarApplyInfo.i64MilitaryActionTime); if (this.m_strText != string.Empty) { this.m_strTime = string.Format("{0} : {1}", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1525"), this.m_strText); label.SetText(this.m_strTime); } else { label.SetText(string.Empty); } } } } } else if (guildWarApplyInfo.i64MilitaryActionTime > 0L) { Label label2 = uIListItemContainer.GetElement(3) as Label; if (label2 != null) { this.m_strText = this.GetTimeToString(guildWarApplyInfo.i64MilitaryActionTime); if (this.m_strText != string.Empty) { this.m_strTime = string.Format("{0} : {1}", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1525"), this.m_strText); label2.SetText(this.m_strTime); } else { label2.SetText(string.Empty); } } } } } } } }
public void AddApplyInfo(GUILDWAR_APPLY_INFO Info) { this.m_GuildWarApplyInfo.Add(Info); }