private void askReconnectionFailed() { this.bRequestRelogin = true; if (!TsPlatform.IsWeb && !TsPlatform.IsEditor && !TsPlatform.IsAndroid && !TsPlatform.IsIPhone) { this.m_eAutoReloginState = NkAutoRelogin.eAUTORELOGIN_STATE.E_AUTORELOGIN_STATE_RECONNECTING; return; } string textFromMessageBox = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("162"); string textFromMessageBox2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("79"); MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI; if (TsPlatform.IsWeb || TsPlatform.IsEditor) { msgBoxUI.SetMsg(new YesDelegate(this.Yes_Delegate), null, new NoDelegate(this.No_Delegate), null, textFromMessageBox, textFromMessageBox2, eMsgType.MB_OK); msgBoxUI.SetButtonCancelText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("216")); } else if (TsPlatform.IsIPhone) { msgBoxUI.SetMsg(new YesDelegate(this.Yes_Delegate), null, textFromMessageBox, textFromMessageBox2, eMsgType.MB_OK, 2); msgBoxUI.SetButtonOKText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2083")); } else { msgBoxUI.SetMsg(new YesDelegate(this.Yes_Delegate), null, new NoDelegate(this.No_Delegate), null, textFromMessageBox, textFromMessageBox2, eMsgType.MB_OK_CANCEL); msgBoxUI.SetButtonOKText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2083")); msgBoxUI.SetButtonCancelText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("216")); } }
private void OnClickLocaldMapToMapIcon(IUIObject obj) { this.m_selectMap = NrTSingleton <NrBaseTableManager> .Instance.GetMapInfo(((int)obj.Data).ToString()); if (!NrTSingleton <NkClientLogic> .Instance.ShowDownLoadUI(0, this.m_selectMap.MAP_INDEX)) { return; } TsAudioManager.Instance.AudioContainer.RequestAudioClip("UI_SFX", "MAP", "CLICK", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay)); string textFromMap = NrTSingleton <NrTextMgr> .Instance.GetTextFromMap(this.m_selectMap.TEXTKEY); if (textFromMap != string.Empty) { MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI; if (msgBoxUI == null) { return; } string empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("4"), "mapname", textFromMap }); msgBoxUI.SetMsg(new YesDelegate(this.OnOKStart), null, NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("3"), empty, eMsgType.MB_OK_CANCEL, 2); msgBoxUI.SetButtonOKText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("109")); msgBoxUI.SetButtonCancelText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("11")); } this.HideUIGuide(); }
private void OnCalcle(IUIObject obj) { if (this.m_eQuestState == QUEST_CONST.eQUESTSTATE.QUESTSTATE_ONGOING || this.m_eQuestState == QUEST_CONST.eQUESTSTATE.QUESTSTATE_COMPLETE) { MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI; if (msgBoxUI != null) { msgBoxUI.SetMsg(new YesDelegate(this.CancelQuest), this.m_Quest, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("799"), NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("126"), eMsgType.MB_OK_CANCEL, 2); msgBoxUI.SetButtonOKText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("320")); msgBoxUI.SetButtonCancelText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("321")); } } else if (this.m_eQuestState == QUEST_CONST.eQUESTSTATE.QUESTSTATE_ACCEPTABLE) { NrTSingleton <NkQuestManager> .Instance.QuestAutoMove(this.m_Quest.GetQuestUnique()); G_ID parentFormID = base.InteractivePanel.parentFormID; QuestList_DLG questList_DLG = NrTSingleton <FormsManager> .Instance.GetForm(parentFormID) as QuestList_DLG; if (questList_DLG != null) { questList_DLG.CloseDlg = true; } } else { this.Close(); } }
public void ClickOK(IUIObject obj) { if (this.m_SelectSoldierInfo != null) { if (this.m_SelectSoldierInfo.IsEquipItem()) { MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI; if (msgBoxUI == null) { return; } msgBoxUI.SetMsg(new YesDelegate(AuctionSellCheckDlg.MessageBoxEquipItem), this.m_SelectSoldierInfo, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1107"), NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("189"), eMsgType.MB_OK_CANCEL, 2); msgBoxUI.SetButtonOKText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("980")); msgBoxUI.Show(); return; } else if (0L < this.m_SelectSoldierInfo.GetFriendPersonID()) { MsgBoxUI msgBoxUI2 = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI; if (msgBoxUI2 == null) { return; } msgBoxUI2.SetMsg(new YesDelegate(this.MsgBoxOKUnsetSolHelp), this.m_SelectSoldierInfo, NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("156"), NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("155"), eMsgType.MB_OK_CANCEL, 2); msgBoxUI2.Show(); return; } } if (!this.IsRegister()) { NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.AUCTION_SELLCHECK_DLG); return; } GS_AUCTION_REGISTER_REQ gS_AUCTION_REGISTER_REQ = new GS_AUCTION_REGISTER_REQ(); if (this.m_SelectItem != null) { gS_AUCTION_REGISTER_REQ.i32ItemPos = this.m_SelectItem.m_nItemPos; gS_AUCTION_REGISTER_REQ.i32PosType = this.m_SelectItem.m_nPosType; } if (this.m_SelectSoldierInfo != null) { gS_AUCTION_REGISTER_REQ.i64SolID = this.m_SelectSoldierInfo.GetSolID(); } if (this.m_ePayType == AuctionDefine.ePAYTYPE.ePAYTYPE_GOLD) { gS_AUCTION_REGISTER_REQ.i64CostMoney = this.m_lSellCost; gS_AUCTION_REGISTER_REQ.i64DirectCostMoney = this.m_lSellDirectCost; } else { gS_AUCTION_REGISTER_REQ.i32CostHearts = (int)this.m_lSellCost; gS_AUCTION_REGISTER_REQ.i32DirectCostHearts = (int)this.m_lSellDirectCost; } SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_AUCTION_REGISTER_REQ, gS_AUCTION_REGISTER_REQ); this.SetEnableControl(false); }
public void SetLeaveGuild() { NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); if (charPersonInfo == null) { return; } if (charPersonInfo.GetSoldierInfo(0) == null) { return; } string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("592"); string textFromMessageBox = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("56"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref textFromMessageBox, new object[] { textFromMessageBox, "targetname", NrTSingleton <NewGuildManager> .Instance.GetGuildName() }); MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI; if (msgBoxUI != null) { msgBoxUI.SetMsg(new YesDelegate(this.MsgBoxOKEvent), null, null, null, textFromInterface, textFromMessageBox, eMsgType.MB_OK_CANCEL); msgBoxUI.SetButtonOKText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("10")); msgBoxUI.SetButtonCancelText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("11")); } }
public void OnClickApply(IUIObject obj) { MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI; if (msgBoxUI != null) { switch (NrTSingleton <GuildWarManager> .Instance.GetWarState()) { case eGUILDWAR_STATE.eGUILDWAR_STATE_NONE: { string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2976"); string textFromMessageBox = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("289"); msgBoxUI.SetMsg(new YesDelegate(this.MsgBoxOKApply), eGUILDWAR_STATE.eGUILDWAR_STATE_WAR, null, null, textFromInterface, textFromMessageBox, eMsgType.MB_OK_CANCEL); msgBoxUI.SetButtonOKText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2976")); msgBoxUI.SetButtonCancelText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("11")); break; } case eGUILDWAR_STATE.eGUILDWAR_STATE_WAR: { string textFromInterface2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2977"); string textFromMessageBox2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("290"); msgBoxUI.SetMsg(new YesDelegate(this.MsgBoxOKApply), eGUILDWAR_STATE.eGUILDWAR_STATE_RESERVATION_CANCEL, null, null, textFromInterface2, textFromMessageBox2, eMsgType.MB_OK_CANCEL); msgBoxUI.SetButtonOKText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2977")); msgBoxUI.SetButtonCancelText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("11")); break; } case eGUILDWAR_STATE.eGUILDWAR_STATE_RESERVATION_CANCEL: { string textFromInterface3 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2987"); string textFromMessageBox3 = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("291"); msgBoxUI.SetMsg(new YesDelegate(this.MsgBoxOKApply), eGUILDWAR_STATE.eGUILDWAR_STATE_WAR, null, null, textFromInterface3, textFromMessageBox3, eMsgType.MB_OK_CANCEL); msgBoxUI.SetButtonOKText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2987")); msgBoxUI.SetButtonCancelText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("11")); break; } } } }
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 static void ShowMessageBoxEquipItem() { MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI; if (msgBoxUI == null) { return; } msgBoxUI.SetMsg(new YesDelegate(CharChangeMainDlg.MessageBoxEquipItem), null, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("951"), NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("91"), eMsgType.MB_OK_CANCEL, 2); msgBoxUI.SetButtonOKText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("980")); msgBoxUI.Show(); }
public void SetHP_AuthMessageBox() { MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI; if (msgBoxUI != null) { string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2264"); string textFromInterface2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2265"); msgBoxUI.SetMsg(new YesDelegate(this.MsgBoxOKEvent), null, null, null, textFromInterface, textFromInterface2, eMsgType.MB_OK_CANCEL); msgBoxUI.SetButtonOKText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2269")); msgBoxUI.SetButtonCancelText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("415")); } }
private bool IsWarp(short iBountyHuntUnique, int destMapIndex) { string mapName = NrTSingleton <MapManager> .Instance.GetMapName(destMapIndex); if (!(mapName != string.Empty)) { return(false); } MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI; if (msgBoxUI == null) { return(false); } ICollection gateInfo_Col = NrTSingleton <NrBaseTableManager> .Instance.GetGateInfo_Col(); if (gateInfo_Col == null) { return(false); } int num = 0; foreach (GATE_INFO gATE_INFO in gateInfo_Col) { if (destMapIndex == gATE_INFO.DST_MAP_IDX) { num = gATE_INFO.GATE_IDX; } } string empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("4"), "mapname", mapName }); msgBoxUI.SetMsg(new YesDelegate(this.MapWarp), num, new NoDelegate(this.MsgCancel), null, NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("3"), empty, eMsgType.MB_OK_CANCEL); msgBoxUI.SetButtonOKText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("109")); msgBoxUI.SetButtonCancelText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("11")); this.m_nAutoMoveMapIndex = destMapIndex; this.m_nAutoMoveGateIndex = num; this.m_iAutoMoveBountyHuntUnique = iBountyHuntUnique; return(true); }
public void DeleteStoryChat(IUIObject obj) { if (obj == null) { return; } long num = (long)obj.Data; MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI; if (msgBoxUI == null) { return; } msgBoxUI.SetMsg(new YesDelegate(this.RequestDeleteStoryChat), num, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3184"), NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("75"), eMsgType.MB_OK_CANCEL, 2); msgBoxUI.SetButtonOKText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("10")); msgBoxUI.SetButtonCancelText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("11")); }
public void ClickOK(IUIObject obj) { if (NrTSingleton <NewGuildManager> .Instance.IsRankChange(NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_PersonID)) { NewGuildDefine.eNEWGUILD_MEMBER_RANK rank = this.m_GuildMember.GetRank(); MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI; if (msgBoxUI != null) { string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1833"); string textFromMessageBox = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("140"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref textFromMessageBox, new object[] { textFromMessageBox, "targetname", this.m_GuildMember.GetCharName(), "position1", NrTSingleton <NewGuildManager> .Instance.GetRankText(rank), "position2", NrTSingleton <NewGuildManager> .Instance.GetRankText(this.m_eSelectRank) }); msgBoxUI.SetMsg(new YesDelegate(this.MsgBoxOKEvent), this.m_eSelectRank, new NoDelegate(this.MsgBoxCancelEvent), null, textFromInterface, textFromMessageBox, eMsgType.MB_OK_CANCEL); msgBoxUI.SetButtonOKText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("10")); msgBoxUI.SetButtonCancelText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("11")); } } else { string textFromNotify = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("110"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref textFromNotify, new object[] { textFromNotify, "position", NrTSingleton <NewGuildManager> .Instance.GetRankText(NewGuildDefine.eNEWGUILD_MEMBER_RANK.eNEWGUILD_MEMBER_RANK_SUB_MASTER) }); Main_UI_SystemMessage.ADDMessage(textFromNotify, SYSTEM_MESSAGE_TYPE.ADMIN_SYSTEM_MESSAGE); base.CloseNow(); } }
private void ClickDownLoad(IUIObject obj) { if (!this.bDown) { NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.CONVER_PLATFORMID_DLG); } else { MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI; if (msgBoxUI == null) { return; } msgBoxUI.SetMsg(new YesDelegate(this.OnOKDownStart), null, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2458"), NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("213"), eMsgType.MB_OK_CANCEL, 2); msgBoxUI.SetButtonOKText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("10")); msgBoxUI.SetButtonCancelText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("11")); } }
public void ClickCancelQuest(IUIObject obj) { if (obj == null) { return; } CQuest cQuest = (CQuest)obj.Data; if (cQuest == null) { return; } MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI; if (msgBoxUI != null) { msgBoxUI.SetMsg(new YesDelegate(this.CancelQuest), cQuest, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("799"), NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("126"), eMsgType.MB_OK_CANCEL, 2); msgBoxUI.SetButtonOKText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("320")); msgBoxUI.SetButtonCancelText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("321")); } }
public void DrawAdventure() { if (AdventureDlg.m_CurrentIndex == 0) { this.m_PrevButton.Visible = false; } if (Launcher.Instance.LocalPatchLevel != Launcher.Instance.PatchLevelMax) { if (0 < AdventureDlg.m_CurrentIndex) { MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI; if (msgBoxUI == null) { return; } msgBoxUI.SetMsg(new YesDelegate(this.OnOKDownStart), null, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2458"), NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("213"), eMsgType.MB_OK_CANCEL, 2); msgBoxUI.SetButtonOKText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("10")); msgBoxUI.SetButtonCancelText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("11")); } this.m_NextButton.Visible = false; } if (NrTSingleton <NkAdventureManager> .Instance.TotalCount() - 1 == AdventureDlg.m_CurrentIndex) { this.m_NextButton.Visible = false; } else { int index = AdventureDlg.m_CurrentIndex + 1; Adventure adventureFromIndex = NrTSingleton <NkAdventureManager> .Instance.GetAdventureFromIndex(index); if (adventureFromIndex != null && adventureFromIndex.GetAdventureUnique() == NrTSingleton <ContentsLimitManager> .Instance.GetLimitAdventure()) { this.m_NextButton.Visible = false; } } this.ShowBackImage(AdventureDlg.m_CurrentAdventure); this.ShowNpcImage(AdventureDlg.m_CurrentAdventure); }
private void ClickStart(IUIObject obj) { NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1); if (@char == null) { return; } if (!NrTSingleton <NkClientLogic> .Instance.IsMovable()) { return; } NrTSingleton <NrAutoPath> .Instance.ResetData(); Vector3 lhs = Vector3.zero; Vector2 zero = Vector2.zero; if (@char.m_kCharMove == null) { return; } int num = 0; if (this.m_CurrentQuest != null) { num = this.m_CurrentQuest.GetQuestCommon().iCastleUnique; NrCharKindInfo charKindInfoFromCode = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfoFromCode(this.m_CurrentQuest.GetQuestCommon().GiveQuestCharCode); if (charKindInfoFromCode != null) { NrClientNpcPosList clientNpcPosList = NrTSingleton <NkQuestManager> .Instance.GetClientNpcPosList(num); if (clientNpcPosList != null) { for (int i = 0; i < clientNpcPosList.ClientNpcPosList.Count; i++) { NrClientNpcInfo nrClientNpcInfo = clientNpcPosList.ClientNpcPosList[i]; if (nrClientNpcInfo != null && NrTSingleton <NkQuestManager> .Instance.ClinetNpcCreateCheck(nrClientNpcInfo.kStartCon, nrClientNpcInfo.kEndCon) && charKindInfoFromCode.GetCode() == nrClientNpcInfo.strCharCode && num == nrClientNpcInfo.i32MapIndex) { NrCharBase char2 = NrTSingleton <NkCharManager> .Instance.GetChar(1); if (char2 != null && char2.m_kCharMove != null) { lhs = char2.m_kCharMove.FindFirstPath(num, (short)nrClientNpcInfo.fFixPosX, (short)nrClientNpcInfo.fFixPosY, false); zero.x = nrClientNpcInfo.fFixPosX; zero.y = nrClientNpcInfo.fFixPosY; } } } } if (lhs == Vector3.zero) { NrNpcPos npcPos = NrTSingleton <NrNpcPosManager> .Instance.GetNpcPos(charKindInfoFromCode.GetPosKey(), charKindInfoFromCode.GetCharKind(), num); if (npcPos != null && @char.m_kCharMove != null) { lhs = @char.m_kCharMove.FindFirstPath(npcPos.nMapIndex, (short)npcPos.kPos.x, (short)npcPos.kPos.z, false); zero.x = npcPos.kPos.x; zero.y = npcPos.kPos.z; } } } } else { num = this.m_CurrentAdventureInfo.mapIndex; lhs = @char.m_kCharMove.FindFirstPath(num, (short)this.m_CurrentAdventureInfo.destX, (short)this.m_CurrentAdventureInfo.destY, false); zero.x = (float)this.m_CurrentAdventureInfo.destX; zero.y = (float)this.m_CurrentAdventureInfo.destY; } if (!NrTSingleton <NkClientLogic> .Instance.ShowDownLoadUI(0, num)) { return; } NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo(); if (myCharInfo == null) { return; } int mapIndex = myCharInfo.m_kCharMapInfo.MapIndex; if (num == mapIndex) { if (lhs != Vector3.zero) { GS_CHAR_FINDPATH_REQ gS_CHAR_FINDPATH_REQ = new GS_CHAR_FINDPATH_REQ(); gS_CHAR_FINDPATH_REQ.DestPos.x = lhs.x; gS_CHAR_FINDPATH_REQ.DestPos.y = lhs.y; gS_CHAR_FINDPATH_REQ.DestPos.z = lhs.z; SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_CHAR_FINDPATH_REQ, gS_CHAR_FINDPATH_REQ); TsAudioManager.Instance.AudioContainer.RequestAudioClip("UI_SFX", "QUEST", "AUTOMOVE", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay)); } if (NrTSingleton <FormsManager> .Instance.IsShow(G_ID.ADVENTURECOLLECT_DLG)) { NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.ADVENTURECOLLECT_DLG); } base.CloseForm(null); NrTSingleton <FormsManager> .Instance.GetForm(G_ID.ADVENTURE_DLG).CloseForm(null); } else { string mapName = NrTSingleton <MapManager> .Instance.GetMapName(num); if (mapName != string.Empty) { MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI; if (msgBoxUI == null) { return; } ICollection gateInfo_Col = NrTSingleton <NrBaseTableManager> .Instance.GetGateInfo_Col(); if (gateInfo_Col == null) { return; } int num2 = 0; foreach (GATE_INFO gATE_INFO in gateInfo_Col) { if (num == gATE_INFO.DST_MAP_IDX) { num2 = gATE_INFO.GATE_IDX; } } string empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("4"), "mapname", mapName }); msgBoxUI.SetMsg(new YesDelegate(this.MapWarp), num2, NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("3"), empty, eMsgType.MB_OK_CANCEL, 2); msgBoxUI.SetButtonOKText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("109")); msgBoxUI.SetButtonCancelText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("11")); this.m_nAutoMoveMapIndex = num; this.m_nAutoMoveGateIndex = num2; NrTSingleton <NkQuestManager> .Instance.AutoMoveMapIndex = this.m_nAutoMoveMapIndex; NrTSingleton <NkQuestManager> .Instance.AutoMove = true; NrTSingleton <NkQuestManager> .Instance.AutoMoveDestPos = zero; } } }
private void BtnDoubleClickQuestList(object sender) { UI_UIGuide uI_UIGuide = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.UIGUIDE_DLG) as UI_UIGuide; if (uI_UIGuide != null) { uI_UIGuide.CloseUI = true; } if (string.Empty != this.m_szSelectQuestUnique) { CQuest questByQuestUnique = NrTSingleton <NkQuestManager> .Instance.GetQuestByQuestUnique(this.m_szSelectQuestUnique); if (questByQuestUnique == null) { string text = this.m_szSelectQuestUnique.Replace(this.m_ChallengeUniqueDistinguish, string.Empty); if (string.IsNullOrEmpty(text)) { return; } short unique = short.Parse(text); ChallengeTable challengeTable = NrTSingleton <ChallengeManager> .Instance.GetChallengeTable(unique); if (challengeTable == null) { return; } this.ShowClickQuestOpenDlg(challengeTable.m_szOpenUI, challengeTable.m_nUnique); return; } else { QUEST_CONST.eQUESTSTATE questState = NrTSingleton <NkQuestManager> .Instance.GetQuestState(questByQuestUnique.GetQuestUnique()); if (questState == QUEST_CONST.eQUESTSTATE.QUESTSTATE_ONGOING) { for (int i = 0; i < 3; i++) { if (questByQuestUnique.GetQuestCommon().cQuestCondition[i].i32QuestCode == 155) { MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI; if (msgBoxUI != null) { string empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1533"), "targetname", NrTSingleton <NrCharKindInfoManager> .Instance.GetName((int)questByQuestUnique.GetQuestCommon().cQuestCondition[1].i64Param) }); msgBoxUI.SetMsg(new YesDelegate(NrTSingleton <NkQuestManager> .Instance.OpenQuestBattle), questByQuestUnique, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1532"), empty, eMsgType.MB_OK_CANCEL, 2); msgBoxUI.SetButtonOKText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("320")); msgBoxUI.SetButtonCancelText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("321")); return; } } } } NrTSingleton <NkQuestManager> .Instance.QuestAutoMove(this.m_szSelectQuestUnique); if (null != this.m_Touch) { this.m_Touch.RenderEnabled = false; this.bClickTouch = true; } } } }
public void TabCharMove() { if (!NrTSingleton <NkQuestManager> .Instance.IsCompletedFirstQuest()) { return; } NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; if (nrCharUser != null) { if (!NrTSingleton <NkClientLogic> .Instance.IsMovable()) { nrCharUser.m_kCharMove.MoveStop(true, true); return; } if (this.bMouseCharMove) { nrCharUser.m_kCharMove.MoveStop(true, true); nrCharUser.m_kCharMove.SendCharMovePacketForKeyBoardMove(true); this.bMouseCharMove = false; this.SetSafeClickTime(-0.2f); return; } } this.UpdateWalkEffect(false); if (!NrTSingleton <NkClientLogic> .Instance.IsPickingEnable()) { NrTSingleton <NkClientLogic> .Instance.SetPickingEnable(true); return; } if (!NrTSingleton <NkClientLogic> .Instance.IsMovable()) { return; } if (this.fSafeClickTime > 0f && Time.time - this.fSafeClickTime < 0.5f) { return; } NrCharUser nrCharUser2 = nrCharUser; if (nrCharUser == null) { return; } if (nrCharUser2.GetFollowCharPersonID() > 0L) { NrTSingleton <FormsManager> .Instance.ShowForm(G_ID.DLG_STOPAUTOMOVE); } else { if (Launcher.Instance.LocalPatchLevel != Launcher.Instance.PatchLevelMax && NrTSingleton <NrAutoPath> .Instance.IsAutoMoving()) { string textFromMessageBox = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("168"); string textFromMessageBox2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("240"); MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI; msgBoxUI.SetMsg(new YesDelegate(this.OnAutoMoveStop), null, textFromMessageBox, textFromMessageBox2, eMsgType.MB_OK_CANCEL, 2); msgBoxUI.SetButtonOKText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("320")); msgBoxUI.SetButtonCancelText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("321")); return; } NrCharBase pickChar = NrTSingleton <NkClientLogic> .Instance.GetPickChar(); if (pickChar != null) { if (NrTSingleton <NkClientLogic> .Instance.GetFocusChar() == null) { pickChar.CancelClickMe(); nrCharUser2.m_kCharMove.SetTargetChar(null); } else { pickChar.SetClickMe(); if (!pickChar.IsCharKindATB(32L)) { nrCharUser2.m_kCharMove.SetTargetChar(pickChar); } else { nrCharUser2.m_kCharMove.SetTargetChar(null); } } } else { NrCharBase targetChar = nrCharUser2.m_kCharMove.GetTargetChar(); if (targetChar != null) { targetChar.CancelClickMe(); } nrCharUser2.m_kCharMove.SetTargetChar(null); } nrCharUser2.PickingMove(); } Dlg_Collect dlg_Collect = (Dlg_Collect)NrTSingleton <FormsManager> .Instance.GetForm(G_ID.DLG_COLLECT); if (dlg_Collect != null) { dlg_Collect.OnClose(); } this.fSafeClickTime = 0f; }