public void SendItemSet(ITEM item) { ImageSlot srcSlot = new ImageSlot(); ReforgeMainDlg.SetImageSlotFromItem(ref srcSlot, item, 0); this.OnItemDragDrop(srcSlot); }
public void OnClickOK(IUIObject a_oObject) { ReforgeMainDlg reforgeMainDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.REFORGEMAIN_DLG) as ReforgeMainDlg; if (reforgeMainDlg != null && reforgeMainDlg.IsCheck()) { reforgeMainDlg.ActionReforge(); } this.HideUIGuide(); this.Close(); }
public void OnItemClick(IUIObject obj) { ITEM iTEM = (ITEM)this.m_ListBox.SelectedItem.Data; if (iTEM != null) { this.m_SelectItem = iTEM; ReforgeMainDlg reforgeMainDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.REFORGEMAIN_DLG) as ReforgeMainDlg; reforgeMainDlg.Set_Value(this.m_SelectItem); reforgeMainDlg.SetSolID(this.m_SolID); this.Close(); } }
public void OnItemConfirm(IUIObject obj) { if (this.m_SelectItem != null) { ReforgeMainDlg reforgeMainDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.REFORGEMAIN_DLG) as ReforgeMainDlg; reforgeMainDlg.Set_Value(this.m_SelectItem); reforgeMainDlg.SetSolID(this.m_SolID); this.Close(); } else { TsLog.Log("m_SelectItem == null", new object[0]); } }
public override void Hide() { ReforgeMainDlg reforgeMainDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.REFORGEMAIN_DLG) as ReforgeMainDlg; if (reforgeMainDlg != null) { reforgeMainDlg.ReFreshItem(); } base.OnClose(); if (null != this.SlotEffect) { UnityEngine.Object.DestroyImmediate(this.SlotEffect); } Resources.UnloadUnusedAssets(); base.Hide(); }
public void SetItem(ImageView IvItem, ITEM Item) { if (Item != null && 0 < Item.m_nItemUnique) { IvItem.Visible = true; ImageSlot slot = new ImageSlot(); ReforgeMainDlg.SetImageSlotFromItem(ref slot, Item, 0); IvItem.Clear(); IvItem.SetImageSlot(0, slot, null, null, null, null); IvItem.RepositionItems(); } else { IvItem.Visible = false; } }
private void ClickItemUpgrade(IUIObject obj) { if (!NrTSingleton <FormsManager> .Instance.IsShow(G_ID.REFORGEMAIN_DLG)) { ReforgeMainDlg reforgeMainDlg = (ReforgeMainDlg)NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.REFORGEMAIN_DLG); if (!reforgeMainDlg.Visible) { reforgeMainDlg.Show(); } } else { NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.REFORGEMAIN_DLG); } }
public void OnNewListClick(IUIObject obj) { if (this.m_ShowType == ReforgeSelectDlg.SHOWTYPE.SOLDER) { NkSoldierInfo nkSoldierInfo = (NkSoldierInfo)this.m_NewListBox.SelectedItem.Data; if (nkSoldierInfo != null) { this.m_SelectSol = nkSoldierInfo; this.m_SolID = nkSoldierInfo.GetSolID(); ItemSelectDlg itemSelectDlg = base.SetChildForm(G_ID.REFORGESELECTITEM_DLG, Form.ChildLocation.LEFT) as ItemSelectDlg; if (itemSelectDlg != null) { itemSelectDlg.SetData(this.m_SolID); } } } else if (this.m_ShowType == ReforgeSelectDlg.SHOWTYPE.ITEM || this.m_ShowType == ReforgeSelectDlg.SHOWTYPE.SOLITEM) { if (null == this.m_NewListBox.SelectedItem) { return; } ITEM iTEM = (ITEM)this.m_NewListBox.SelectedItem.Data; if (iTEM != null) { this.m_SelectItem = iTEM; NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.REFORGERESULT_DLG); ReforgeMainDlg reforgeMainDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.REFORGEMAIN_DLG) as ReforgeMainDlg; if (reforgeMainDlg != null) { reforgeMainDlg.Set_Value(this.m_SelectItem); reforgeMainDlg.SetSolID(this.m_SolID); } } } }
public void SetData(GS_ENHANCEITEM_ACK pPacket) { NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_Money = pPacket.LeftMoney; ReforgeMainDlg reforgeMainDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.REFORGEMAIN_DLG) as ReforgeMainDlg; ITEM item = NkUserInventory.GetInstance().GetItem(pPacket.nItemType, pPacket.nItemPos); if (item == null) { if (reforgeMainDlg == null) { return; } NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; if (nrCharUser == null) { return; } NkSoldierInfo soldierInfoFromSolID = nrCharUser.GetPersonInfo().GetSoldierInfoFromSolID(reforgeMainDlg.GetSolID()); if (soldierInfoFromSolID != null) { item = soldierInfoFromSolID.GetEquipItemInfo().GetItem(pPacket.nItemPos); } } this.m_Item = item; this.m_txItemAfter.SetItemTexture(item); string name = NrTSingleton <ItemManager> .Instance.GetName(item); this.m_lbItemAfterName.Text = ItemManager.RankTextColor(pPacket.nCurRank) + name; this.m_lbItemGrade.Text = ItemManager.RankTextColor(pPacket.nCurRank) + ItemManager.RankText(pPacket.nCurRank); this.m_txItemBG.SetTexture("Win_I_Frame" + ItemManager.ChangeRankToString(pPacket.nCurRank)); this.GetStatString(item.m_nItemUnique, pPacket); this.LoadSolComposeSuccessBundle(); if (pPacket.i8ItemEnchantSuccess == 1 && pPacket.nLastRank < pPacket.nCurRank) { TsAudioManager.Container.RequestAudioClip("UI_SFX", "EQUIPMENT-UP", "SUCCESS", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay)); this.m_bItemUpgradeSuccess = true; this.FacebookButtonSet(false); if (pPacket.nItemType != 10) { ReforgeSelectDlg reforgeSelectDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.REFORGESELECT_DLG) as ReforgeSelectDlg; if (reforgeSelectDlg != null) { reforgeSelectDlg.UpdateData(pPacket.nItemPos, pPacket.nItemType, pPacket.i64ItemID); } } } else { TsAudioManager.Container.RequestAudioClip("UI_SFX", "EQUIPMENT-UP", "FAIL", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay)); this.m_bItemUpgradeSuccess = false; this.FacebookButtonSet(false); } TsLog.Log("Packet SolID ={0}", new object[] { pPacket.i64SolID }); if (reforgeMainDlg != null) { reforgeMainDlg.bSendRequest = false; } }
public void GetChallengeOpenUi(string OpenUi, short unique) { NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo; if (kMyCharInfo == null) { return; } string a = "e" + OpenUi; if (a == "0") { return; } if (a == eChallenge_OpenUi.ePLUNDERMAIN.ToString()) { if (!NrTSingleton <FormsManager> .Instance.IsShow(G_ID.PLUNDERMAIN_DLG)) { GS_INFIBATTLE_RANK_GET_REQ gS_INFIBATTLE_RANK_GET_REQ = new GS_INFIBATTLE_RANK_GET_REQ(); gS_INFIBATTLE_RANK_GET_REQ.i64PersonID = kMyCharInfo.m_PersonID; SendPacket.GetInstance().SendObject(2017, gS_INFIBATTLE_RANK_GET_REQ); } else { NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.PLUNDERMAIN_DLG); } } else if (a == eChallenge_OpenUi.eBOUNTYHUNTING.ToString()) { if (!NrTSingleton <FormsManager> .Instance.IsShow(G_ID.BOUNTYHUNTING_DLG)) { BountyHuntingDlg bountyHuntingDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.BOUNTYHUNTING_DLG) as BountyHuntingDlg; if (bountyHuntingDlg != null) { bountyHuntingDlg.SetData(); } } } else if (a == eChallenge_OpenUi.eBABELTOWER_MODESELECT.ToString()) { int level = kMyCharInfo.GetLevel(); int value = COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_BABELTOWER_LIMITLEVEL); if (level < value) { string empty = string.Empty; string textFromNotify = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("129"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { textFromNotify, "level", value.ToString() }); Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE); return; } if (kMyCharInfo.m_kFriendInfo.GetFriendCount() > 0 && kMyCharInfo.m_kFriendInfo.GetFriendsBaBelDataCount() == 0) { GS_FRIENDS_BABELTOWER_CLEARINFO_REQ obj = new GS_FRIENDS_BABELTOWER_CLEARINFO_REQ(); SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_FRIENDS_BABELTOWER_CLEARINFO_REQ, obj); } int value2 = COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_BABEL_HARD_LEVEL); if (!NrTSingleton <FormsManager> .Instance.IsShow(G_ID.BABELTOWERMAIN_DLG)) { if (level < value2) { DirectionDLG directionDLG = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.DLG_DIRECTION) as DirectionDLG; if (directionDLG != null) { directionDLG.ShowDirection(DirectionDLG.eDIRECTIONTYPE.eDIRECTION_BABEL, 1); } } else { NrTSingleton <FormsManager> .Instance.ShowForm(G_ID.BABELTOWER_MODESELECT_DLG); } } else { NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.BABELTOWERMAIN_DLG); } } else if (a == eChallenge_OpenUi.eMYTHRAID_MODESELECT.ToString()) { if (kMyCharInfo != null) { int num = COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_MYTHRAID_LIMITLEVEL); if (num == 0) { num = 50; } if (kMyCharInfo.GetLevel() < num) { string textFromNotify2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("908"); if (string.IsNullOrEmpty(textFromNotify2)) { return; } Main_UI_SystemMessage.ADDMessage(textFromNotify2, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE); return; } } DirectionDLG directionDLG2 = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.DLG_DIRECTION) as DirectionDLG; if (directionDLG2 != null) { directionDLG2.ShowDirection(DirectionDLG.eDIRECTIONTYPE.eDIRECTION_MYTHRAID, 0); } } else if (a == eChallenge_OpenUi.eMINE_SEARCH.ToString()) { if (0L >= NrTSingleton <NewGuildManager> .Instance.GetGuildID() || !NrTSingleton <ContentsLimitManager> .Instance.IsMineApply((short)NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetLevel())) { string textFromNotify3 = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("763"); Main_UI_SystemMessage.ADDMessage(textFromNotify3, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE); return; } long charSubData = kMyCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_MINE_TUTORIAL_STEP); if (charSubData == 1L) { MineTutorialStepDlg mineTutorialStepDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MINE_TUTORIAL_STEP_DLG) as MineTutorialStepDlg; if (mineTutorialStepDlg != null) { mineTutorialStepDlg.SetStep(1L); } } else { NrTSingleton <MineManager> .Instance.Send_GS_MINE_GUILD_CURRENTSTATUS_INFO_GET_REQ(1, 1, 0L); } } else if (a == eChallenge_OpenUi.eCOLOSSEUMMAIN.ToString()) { if (!NrTSingleton <FormsManager> .Instance.IsShow(G_ID.COLOSSEUMMAIN_DLG)) { NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.COLOSSEUMMAIN_DLG); } else { NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.COLOSSEUMMAIN_DLG); } } else if (a == eChallenge_OpenUi.eBABEL_GUILDBOSS_MAIN.ToString()) { if (!NrTSingleton <ContentsLimitManager> .Instance.IsGuildBoss()) { return; } if (NrTSingleton <NewGuildManager> .Instance.GetGuildID() <= 0L) { Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("545"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE); return; } BabelGuildBossDlg babelGuildBossDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.BABEL_GUILDBOSS_MAIN_DLG) as BabelGuildBossDlg; if (babelGuildBossDlg != null) { babelGuildBossDlg.Show(); } } else if (a == eChallenge_OpenUi.eREFORGEMAIN.ToString()) { if (!NrTSingleton <FormsManager> .Instance.IsShow(G_ID.REFORGEMAIN_DLG)) { NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.REFORGERESULT_DLG); ReforgeMainDlg reforgeMainDlg = (ReforgeMainDlg)NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.REFORGEMAIN_DLG); reforgeMainDlg.Show(); } } else if (a == eChallenge_OpenUi.eSOLEXTRACT_DUMMY.ToString()) { if (!NrTSingleton <FormsManager> .Instance.IsShow(G_ID.HEROCOLLECT_CHALLENGEQUEST_DLG)) { HeroCollect_DLG_challengequest heroCollect_DLG_challengequest = (HeroCollect_DLG_challengequest)NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.HEROCOLLECT_CHALLENGEQUEST_DLG); if (heroCollect_DLG_challengequest != null) { heroCollect_DLG_challengequest._ChallengeQuestUnique = (int)unique; heroCollect_DLG_challengequest.SetDummyUI(); heroCollect_DLG_challengequest.Show(); } } else { NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.HEROCOLLECT_CHALLENGEQUEST_DLG); } } else if (a == eChallenge_OpenUi.eSOLTRANSCENDENCE_DUMMY.ToString()) { if (!NrTSingleton <FormsManager> .Instance.IsShow(G_ID.HEROCOLLECT_CHALLENGEQUEST_DLG)) { HeroCollect_DLG_challengequest heroCollect_DLG_challengequest2 = (HeroCollect_DLG_challengequest)NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.HEROCOLLECT_CHALLENGEQUEST_DLG); if (heroCollect_DLG_challengequest2 != null) { heroCollect_DLG_challengequest2._ChallengeQuestUnique = (int)unique; heroCollect_DLG_challengequest2.SetDummyUI(); heroCollect_DLG_challengequest2.Show(); } } else { NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.HEROCOLLECT_CHALLENGEQUEST_DLG); } } else if (a == eChallenge_OpenUi.eSOLCOMPOSE_DUMMY.ToString()) { if (!NrTSingleton <FormsManager> .Instance.IsShow(G_ID.HEROCOLLECT_CHALLENGEQUEST_DLG)) { HeroCollect_DLG_challengequest heroCollect_DLG_challengequest3 = (HeroCollect_DLG_challengequest)NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.HEROCOLLECT_CHALLENGEQUEST_DLG); if (heroCollect_DLG_challengequest3 != null) { heroCollect_DLG_challengequest3._ChallengeQuestUnique = (int)unique; heroCollect_DLG_challengequest3.SetDummyUI(); heroCollect_DLG_challengequest3.Show(); } } else { NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.HEROCOLLECT_CHALLENGEQUEST_DLG); } } else if (a == eChallenge_OpenUi.eSOLRECRUIT_DUMMY.ToString()) { if (!NrTSingleton <FormsManager> .Instance.IsShow(G_ID.SOLRECRUIT_CHALLENGEQUEST_DLG)) { SolRecruitDlg_ChallengeQuest solRecruitDlg_ChallengeQuest = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.SOLRECRUIT_CHALLENGEQUEST_DLG) as SolRecruitDlg_ChallengeQuest; solRecruitDlg_ChallengeQuest.SetTicketList(); } } else if (a == eChallenge_OpenUi.eSOLRECRUIT.ToString()) { GS_TICKET_SELL_INFO_REQ obj2 = new GS_TICKET_SELL_INFO_REQ(); SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_TICKET_SELL_INFO_REQ, obj2); } else if (a == eChallenge_OpenUi.eSTORYCHAT.ToString()) { if (!NrTSingleton <FormsManager> .Instance.IsShow(G_ID.STORYCHAT_DLG)) { NrTSingleton <FormsManager> .Instance.ShowForm(G_ID.STORYCHAT_DLG); } else { NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.STORYCHAT_DLG); } } else if (a == eChallenge_OpenUi.eBABELTOWERMAIN.ToString()) { int level2 = kMyCharInfo.GetLevel(); int value3 = COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_BABELTOWER_LIMITLEVEL); if (level2 < value3) { string empty2 = string.Empty; string textFromNotify4 = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("129"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty2, new object[] { textFromNotify4, "level", value3.ToString() }); Main_UI_SystemMessage.ADDMessage(empty2, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE); return; } BabelTowerMainDlg babelTowerMainDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.BABELTOWERMAIN_DLG) as BabelTowerMainDlg; if (babelTowerMainDlg != null) { babelTowerMainDlg.Show(); } } else if (a == eChallenge_OpenUi.eREDUCEMAIN.ToString()) { NrTSingleton <NkQuestManager> .Instance.NPCAutoMove(125); NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.CHALLENGE_DLG); } else if (a == eChallenge_OpenUi.eITEMSKILL.ToString()) { NrTSingleton <NkQuestManager> .Instance.NPCAutoMove(109); } else if (a == eChallenge_OpenUi.eSOLDETAIL.ToString()) { GS_SOLGUIDE_INFO_REQ gS_SOLGUIDE_INFO_REQ = new GS_SOLGUIDE_INFO_REQ(); gS_SOLGUIDE_INFO_REQ.bElementMark = false; gS_SOLGUIDE_INFO_REQ.i32CharKind = 1053; SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_SOLGUIDE_INFO_REQ, gS_SOLGUIDE_INFO_REQ); NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.CHALLENGE_DLG); } else if (a == eChallenge_OpenUi.eITEMMALL_DUMMY.ToString()) { ItemMallDlg_ChallengeQuest itemMallDlg_ChallengeQuest = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.ITEMMALL_CHALLENGEQUEST_DLG) as ItemMallDlg_ChallengeQuest; if (itemMallDlg_ChallengeQuest != null) { itemMallDlg_ChallengeQuest._ChallengeQuestUnique = (int)unique; itemMallDlg_ChallengeQuest.SetShowMode(ItemMallDlg.eMODE.eMODE_VOUCHER_HERO); itemMallDlg_ChallengeQuest.InitDummyUI(); } NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.CHALLENGE_DLG); } else if (a == eChallenge_OpenUi.eSOLEVOLUTION_DUMMY.ToString()) { Myth_Evolution_Main_DLG_ChallengeQuest myth_Evolution_Main_DLG_ChallengeQuest = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MYTH_EVOLUTION_MAIN_CHALLENGEQUEST_DLG) as Myth_Evolution_Main_DLG_ChallengeQuest; if (myth_Evolution_Main_DLG_ChallengeQuest != null) { myth_Evolution_Main_DLG_ChallengeQuest.ChallengeQuestUnique = (int)unique; myth_Evolution_Main_DLG_ChallengeQuest.InitDummyUI(); } } else if (a == eChallenge_OpenUi.eDAILYDUNGEON.ToString()) { DailyDungeon_Select_Dlg dailyDungeon_Select_Dlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.DAILYDUNGEON_SELECT) as DailyDungeon_Select_Dlg; if (dailyDungeon_Select_Dlg != null) { dailyDungeon_Select_Dlg.SetData(); } } else if (a == eChallenge_OpenUi.eNEWEXPLORATION.ToString()) { NewExplorationMainDlg newExplorationMainDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.NEWEXPLORATION_MAIN_DLG) as NewExplorationMainDlg; if (newExplorationMainDlg != null) { newExplorationMainDlg.SetInfo(); } } else if (a == eChallenge_OpenUi.eSOLCOMPOSE.ToString()) { SolComposeMainDlg solComposeMainDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.SOLCOMPOSE_MAIN_DLG) as SolComposeMainDlg; } if (NrTSingleton <EventConditionHandler> .Instance.OpenUIByChallenge != null) { NrTSingleton <EventConditionHandler> .Instance.OpenUIByChallenge.OnTrigger(unique); } }