private void ClickTicketSellInfo(IUIObject obj) { if (obj == null || obj.Data == null) { return; } if (this.m_fRequestTime > 0f && Time.time - this.m_fRequestTime < 1f) { string textFromNotify = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("508"); Main_UI_SystemMessage.ADDMessage(textFromNotify, SYSTEM_MESSAGE_TYPE.NORMAL_MESSAGE); return; } int solCount = SolRecruitDlg.GetSolCount(7); NkReadySolList readySolList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolList(); if (readySolList == null || readySolList.GetCount() + solCount - 1 >= 100) { string textFromNotify2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("507"); Main_UI_SystemMessage.ADDMessage(textFromNotify2, SYSTEM_MESSAGE_TYPE.NORMAL_MESSAGE); return; } int num = (int)obj.Data; TICKET_SELL_INFO ticketSellInfo = this.GetTicketSellInfo(num); if (ticketSellInfo == null) { return; } string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1699"); string textFromMessageBox = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("127"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref textFromMessageBox, new object[] { textFromMessageBox, "count", ticketSellInfo.i32HeartsNum }); MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI; if (msgBoxUI != null) { msgBoxUI.SetMsg(new YesDelegate(this.MsgBoxOKTicketSellInfo), num, null, null, textFromInterface, textFromMessageBox, eMsgType.MB_OK_CANCEL); } this.m_fRequestTime = Time.time; this.m_fScrollPosition = this.m_TicketList.ScrollPosition; }
private void ClickTicketSellInfoDetail(IUIObject obj) { int iCharKind = (int)obj.Data; TICKET_SELL_INFO ticketSellInfoFromCharKind = this.GetTicketSellInfoFromCharKind(iCharKind); if (ticketSellInfoFromCharKind == null) { return; } SolSlotData solSlotData = SolSlotData.GetSolSlotData(ticketSellInfoFromCharKind.i32CharKind, ticketSellInfoFromCharKind.i8Grade); SolDetail_Info_Dlg solDetail_Info_Dlg = (SolDetail_Info_Dlg)NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.SOLDETAIL_DLG); if (solDetail_Info_Dlg != null && solSlotData != null) { solDetail_Info_Dlg.SetSolKind(solSlotData); solDetail_Info_Dlg.SetTabButtonHide(SolDetail_Info_Dlg.eSOLTOOLBAR.eEIEMENTSOL); } }
private void MsgBoxOKTicketSellInfo(object obj) { if (COMMON_CONSTANT_Manager.GetInstance() == null) { return; } int iIndex = (int)obj; TICKET_SELL_INFO ticketSellInfo = this.GetTicketSellInfo(iIndex); if (ticketSellInfo == null) { return; } GS_TICKET_SELL_INFO_USE_REQ gS_TICKET_SELL_INFO_USE_REQ = new GS_TICKET_SELL_INFO_USE_REQ(); gS_TICKET_SELL_INFO_USE_REQ.i32CharKind = ticketSellInfo.i32CharKind; gS_TICKET_SELL_INFO_USE_REQ.i8Grade = ticketSellInfo.i8Grade; SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_TICKET_SELL_INFO_USE_REQ, gS_TICKET_SELL_INFO_USE_REQ); }
public void AddTicketSellInfo() { for (int i = 0; i < this.m_TicketSellInfoList.Count; i++) { TICKET_SELL_INFO tICKET_SELL_INFO = this.m_TicketSellInfoList[i]; NewListItem newListItem = new NewListItem(this.m_TicketList.ColumnNum, true, string.Empty); NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(tICKET_SELL_INFO.i32CharKind); if (charKindInfo != null) { if (NrTSingleton <ContentsLimitManager> .Instance.IsTicketSell(tICKET_SELL_INFO.i32CharKind)) { NkSoldierInfo nkSoldierInfo = new NkSoldierInfo(); nkSoldierInfo.SetCharKind(tICKET_SELL_INFO.i32CharKind); byte b = tICKET_SELL_INFO.i8Grade; b -= 1; nkSoldierInfo.SetGrade(b); EVENT_HERODATA eventHeroCharCode = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCharCode(tICKET_SELL_INFO.i32CharKind, tICKET_SELL_INFO.i8Grade); if (eventHeroCharCode != null) { newListItem.SetListItemData(0, "Win_I_EventSol", null, null, null); newListItem.SetListItemData(4, true); } else { UIBaseInfoLoader legendFrame = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendFrame(tICKET_SELL_INFO.i32CharKind, (int)tICKET_SELL_INFO.i8Grade); if (legendFrame != null) { newListItem.SetListItemData(0, legendFrame, null, null, null); } newListItem.SetListItemData(4, false); } string legendName = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendName(tICKET_SELL_INFO.i32CharKind, (int)tICKET_SELL_INFO.i8Grade, charKindInfo.GetName()); newListItem.SetListItemData(1, nkSoldierInfo.GetListSolInfo(false), null, null, null); string empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2211"), "rank", tICKET_SELL_INFO.i8Grade, "solname", legendName, "count", tICKET_SELL_INFO.i32HeartsNum }); newListItem.SetListItemData(2, empty, null, null, null); newListItem.SetListItemData(3, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("573"), i, new EZValueChangedDelegate(this.ClickTicketSellInfo), null); if (NkUserInventory.GetInstance().Get_First_ItemCnt(70000) < tICKET_SELL_INFO.i32HeartsNum) { newListItem.SetListItemEnable(3, false); } else { newListItem.SetListItemEnable(3, true); } newListItem.Data = eSolRecruitType.SOLRECRUIT_TICKET_SELL_INFO; newListItem.SetListItemData(5, string.Empty, tICKET_SELL_INFO.i32CharKind, new EZValueChangedDelegate(this.ClickTicketSellInfoDetail), null); this.m_TicketList.Add(newListItem); } } } }