public bool CheckAutoMoveKind() { QuestAutoPathInfo autoPathInfo = NrTSingleton <NkQuestManager> .Instance.GetAutoPathInfo(); if (autoPathInfo != null) { if (!autoPathInfo.m_bComplete) { autoPathInfo.m_kQuest.AfterAutoPath(); } else if (autoPathInfo.m_nCharKind > 0) { NrCharBase charByCharKind = NrTSingleton <NkCharManager> .Instance.GetCharByCharKind(autoPathInfo.m_nCharKind); if (charByCharKind != null) { if (!this.m_pkChar.IsCloseToTalkNPC(ref charByCharKind, 2f)) { return(false); } NrCharKindInfo charKindInfo = charByCharKind.GetCharKindInfo(); if (charKindInfo != null) { NpcTalkUI_DLG npcTalkUI_DLG = (NpcTalkUI_DLG)NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.NPCTALK_DLG); if (npcTalkUI_DLG != null) { npcTalkUI_DLG.SetNpcID(charKindInfo.GetCharKind(), charByCharKind.GetCharUnique()); npcTalkUI_DLG.Show(); } CHARKIND_NPCINFO cHARKIND_NPCINFO = charKindInfo.GetCHARKIND_NPCINFO(); if (cHARKIND_NPCINFO != null && !string.IsNullOrEmpty(cHARKIND_NPCINFO.SOUND_GREETING)) { TsAudioManager.Instance.AudioContainer.RequestAudioClip("NPC", cHARKIND_NPCINFO.SOUND_GREETING, "GREETING", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay)); } } if (charByCharKind.GetCharObject() != null) { Vector3 position = charByCharKind.GetCharObject().transform.position; this.m_pkChar.m_k3DChar.RequestLookAt(position.x, position.z); } return(true); } else { Debug.Log("null == npc"); } } NrTSingleton <NkQuestManager> .Instance.SetAutoPathInfo(null); } return(false); }
public void PushCharChat(NrCharBase charBase, string msg, CHAT_TYPE _ChatType) { this.CharChatQueue.Enqueue(new CharChat(charBase, msg, _ChatType)); if (80 <= this.ChatMsgList.Count) { this.ChatMsgList.Dequeue(); } if (charBase.GetCharName() == NrTSingleton <NkCharManager> .Instance.GetCharName()) { MainChatMsg item = new MainChatMsg(_ChatType, charBase.GetCharName(), msg, new ITEM(), string.Empty); this.ChatMsgList.Enqueue(item); } }
public static bool IsLoadedStage() { if (Scene.IsCurScene(Scene.Type.WORLD) && StageSystem.IsStable) { NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1); if (@char != null && @char.IsReady3DModel()) { return(true); } } return(false); }
public void MakeChar() { if (this.m_CenterChar == null || this._MakeCharCodes == null) { UnityEngine.Object.Destroy(base.gameObject); return; } this.MakeComplete = false; base.enabled = true; if (this.m_MakeNpcTable == null) { this.m_MakeNpcTable = new Dictionary <string, SubNpc>(); } for (int i = 0; i < this._MakeCharCodes.Count; i++) { float y = this.m_CenterChar.m_k3DChar.GetRootGameObject().transform.localEulerAngles.y; float num = 0f; int num2 = this._PositionList[i]; if (num2 == -1) { num = y + this.degreeTemp[this._GetEmptySlot()]; } else if (0 <= num2 && 5 > num2) { num = y + this.degreeTemp[num2]; } float f = num * 0.0174532924f; POS3D pOS3D = new POS3D(); pOS3D.x = this.m_CenterChar.GetPersonInfo().GetCharPos().x + 15f * Mathf.Sin(f); pOS3D.y = 0f; pOS3D.z = this.m_CenterChar.GetPersonInfo().GetCharPos().z + 15f * Mathf.Cos(f); float f2 = (num + 180f) * 0.0174532924f; POS3D pOS3D2 = new POS3D(); pOS3D2.x = 1f * Mathf.Sin(f2); pOS3D2.y = 0f; pOS3D2.z = 1f * Mathf.Cos(f2); NrCharBase nrCharBase = this._CreateClientNPC(this._MakeCharCodes[i], pOS3D, pOS3D2); if (nrCharBase != null) { SubNpc subNpc = new SubNpc(); subNpc.i32ID = nrCharBase.GetID(); subNpc.CharCode = nrCharBase.GetCharKindInfo().GetCode(); subNpc.i16CharUnique = nrCharBase.GetCharUnique(); if (!this.m_MakeNpcTable.ContainsKey(nrCharBase.GetCharKindInfo().GetCode())) { this.m_MakeNpcTable.Add(nrCharBase.GetCharKindInfo().GetCode(), subNpc); } } } }
private string GetCharName() { if (NrTSingleton <NkCharManager> .Instance == null) { return(string.Empty); } NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1); if (@char == null) { return(string.Empty); } return(@char.GetCharName()); }
private void OnMouseUpAsButton() { if (NkInputManager.GetMouseButtonUp(0)) { NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1); if (@char != null) { @char.m_kCharMove.HideMoveMark = true; @char.PickMoveStart(base.gameObject.transform.position.x, base.gameObject.transform.position.y, base.gameObject.transform.position.z); NrTSingleton <NkClientLogic> .Instance.SetPickingEnable(false); } } }
private void SetGuardAngelSkillButton() { NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1); for (int i = 0; i < 4; i++) { MYTHRAID_PERSON mythRaidPersonInfo = SoldierBatch.MYTHRAID_INFO.GetMythRaidPersonInfo(i); if (mythRaidPersonInfo != null) { if (@char.GetPersonID() == mythRaidPersonInfo.nPartyPersonID) { this.user_info[i].btn_Guardian_Select.Click = new EZValueChangedDelegate(this.OnClickGuardAngelSelect); this.user_info[i].btn_Guardian_Reselect.Click = new EZValueChangedDelegate(this.OnClickGuardAngelSelect); } if (mythRaidPersonInfo.selectedGuardianUnique >= 0) { this.user_info[i].btn_Guardian_Select.Visible = false; this.user_info[i].btn_Guardian_Reselect.Visible = true; this.user_info[i].dt_GuardianImg.Visible = true; this.user_info[i].dt_GuardianImg_Frame.Visible = true; MYTHRAID_GUARDIANANGEL_INFO mythRaidGuardAngelInfo = NrTSingleton <NrBaseTableManager> .Instance.GetMythRaidGuardAngelInfo(mythRaidPersonInfo.selectedGuardianUnique); this.user_info[i].dt_GuardianImg.SetTextureFromUISoldierBundle(eCharImageType.SMALL, mythRaidGuardAngelInfo.IMAGE); } else if (@char.GetPersonID() == mythRaidPersonInfo.nPartyPersonID) { this.user_info[i].btn_Guardian_Select.Visible = true; this.user_info[i].btn_Guardian_Reselect.Visible = false; this.user_info[i].dt_GuardianImg.Visible = false; this.user_info[i].dt_GuardianImg_Frame.Visible = false; } else if (mythRaidPersonInfo.nPartyPersonID > 0L) { this.user_info[i].btn_Guardian_Select.Visible = false; this.user_info[i].btn_Guardian_Reselect.Visible = false; this.user_info[i].dt_GuardianImg.Visible = true; this.user_info[i].dt_GuardianImg_Frame.Visible = false; this.user_info[i].dt_GuardianImg.SetTextureKey("Win_I_NotSelSol"); } else { this.user_info[i].btn_Guardian_Select.Visible = false; this.user_info[i].btn_Guardian_Reselect.Visible = false; this.user_info[i].dt_GuardianImg.Visible = false; this.user_info[i].dt_GuardianImg_Frame.Visible = false; } } } }
public bool SetMakeChar(NrCharBase CenterChar, string[] CharCodes, MakeSubNPC.LoadComplete CompleteFunc) { bool flag = false; if (this._MakeCharCodes == null) { this._MakeCharCodes = new List <string>(); } this.m_CenterChar = CenterChar; this._MakeCharCodes.Clear(); this._PositionList.Clear(); for (int i = 0; i < CharCodes.Length; i++) { string text = CharCodes[i]; if (!(text == string.Empty)) { if (!(text == "event")) { if (this.m_MakeNpcTable != null && this.m_MakeNpcTable.ContainsKey(text)) { SubNpc subNpc = this.m_MakeNpcTable[text]; if (subNpc != null) { subNpc.bDel = false; } } else if (!text.Equals(this.m_CenterChar.GetCharKindInfo().GetCode())) { this._MakeCharCodes.Add(text); this._PositionList.Add(-1); flag = true; } } } } if (this.m_MakeNpcTable != null) { this.DelChar(); foreach (SubNpc current in this.m_MakeNpcTable.Values) { current.bDel = true; } } if (flag) { this._CompleteFunc = CompleteFunc; } return(flag); }
private void CommandCharInfo(NrCommandInterpreter.NrCommand kCommand) { if (kCommand.m_arArg.Count < 1) { this.ErrorArgCount(); return; } short charunique = 0; try { charunique = Convert.ToInt16(kCommand.m_arArg[1]); } catch (Exception) { NrTSingleton <NrDebugConsole> .Instance.Print("convert error."); return; } NrCharBase charByCharUnique = NrTSingleton <NkCharManager> .Instance.GetCharByCharUnique(charunique); if (charByCharUnique == null) { NrTSingleton <NrDebugConsole> .Instance.Print("not found character."); return; } NrTSingleton <NrDebugConsole> .Instance.Print("========= " + charByCharUnique.GetCharName() + " ======================"); NrTSingleton <NrDebugConsole> .Instance.Print(charByCharUnique.Get3DChar().ToString()); NrTSingleton <NrDebugConsole> .Instance.Print("Pos : " + charByCharUnique.Get3DChar().GetRootGameObject().transform.position.ToString()); NrTSingleton <NrDebugConsole> .Instance.Print("Scale : " + charByCharUnique.Get3DChar().GetRootGameObject().transform.localScale.ToString()); NrTSingleton <NrDebugConsole> .Instance.Print("Fade state : " + charByCharUnique.m_fCurrentAlphaFadeLerp); NrTSingleton <NrDebugConsole> .Instance.Print("Build step : " + charByCharUnique.m_e3DCharStep); this.PrintObjectRenderStateReculsively(charByCharUnique.Get3DChar().GetRootGameObject().transform); CharacterController component = charByCharUnique.Get3DChar().GetRootGameObject().GetComponent <CharacterController>(); if (null != component) { NrTSingleton <NrDebugConsole> .Instance.Print("there's character controller."); } charByCharUnique.debugLog.PrintLogs(); charByCharUnique.m_k3DChar.debugLog.PrintLogs(); }
public void InitPickChar() { if (this.PickChar != null) { this.PickChar.CancelClickMe(); this.PickChar = null; } if (this.PickBattleChar != null) { this.PickBattleChar.CancelClickMe(); this.PickBattleChar = null; } this.PickCharTime = 0f; this.PickCharMousePos = Vector3.zero; }
public void UpatePotition() { if (this._kChar != null) { NrCharBase nrCharBase = this._kChar; if (nrCharBase == null) { return; } Vector3 pos = nrCharBase.GetNameDummy().position; pos = this.WorldToEZ(pos); pos.x -= base.GetSize().x / 2f; pos.y -= base.GetSize().y / 2f; base.SetLocation(pos.x, pos.y); } }
public void CharWarpRequest(int gateindex) { NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_bNoMove = true; if (gateindex > 0) { this.SetWarpGateIndex(gateindex); } this.BackMainCameraInfo(); NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1); if (@char != null) { @char.m_kCharMove.MoveStop(false, false); } NrTSingleton <UIManager> .Instance.ClearInputQueue(); }
public void SetNPCTalkState(bool talkstate) { this.bNPCTalkState = talkstate; if (talkstate) { if (this.IsWorldScene()) { NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1); if (@char != null) { @char.m_kCharMove.MoveStop(true, false); } } } }
private void OnClickUserPortraitChange(IUIObject obj) { if (this.bLeaderSol) { NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1); if (@char != null) { NrTSingleton <NkClientLogic> .Instance.SetOTPRequestInfo(eOTPRequestType.OTPREQ_CHARPORTRAIT); } } else { this.CloseForm(null); } }
public void Del() { if (this._Talk != null) { this._Talk.Close(); this._Talk = null; } if (this._Emoticon != null) { this._Emoticon.Close(); this._Emoticon = null; } this._ActorAction.Clear(); this._Actor.Dispose(); if (this._Actor.m_RealActor) { if (this._Actor.m_ActorBase != null) { this._Actor.m_ActorBase.SetShowHide3DModel(false, false, false); } NrTSingleton <NkCharManager> .Instance.DeleteChar(this._IDInfo.m_nClientID); } else { NrCharBase charBase = this.GetCharBase(); if (charBase != null) { GameObject charObject = charBase.GetCharObject(); if (MiniDramaActorController.EnableTypeList != null && MiniDramaActorController.EnableTypeList.Length > 0) { Type[] enableTypeList = MiniDramaActorController.EnableTypeList; for (int i = 0; i < enableTypeList.Length; i++) { Type type = enableTypeList[i]; MonoBehaviour monoBehaviour = charObject.GetComponent(type) as MonoBehaviour; if (monoBehaviour != null) { monoBehaviour.enabled = true; } } } this.Show(true); } UnityEngine.Object.Destroy(base.gameObject); } }
public void SetActor(NrCharBase kCharBase, string ActorName, bool RealActor, bool bShow) { this.m_ActorBase = kCharBase; if (this.m_ActorBase.Get3DChar() != null) { this.m_ActorBase.Get3DChar().SetMiniDramaChar(); } this.m_ActorBase.GetCharAnimation().ClearNextAni(); this.m_ActorName = ActorName; this.m_RealActor = RealActor; this.m_ActorShow = bShow; if (!this.m_RealActor && !this.m_ActorName.Equals(EventTriggerMiniDrama.ActorManager.GeneralName)) { this._PrePosition = kCharBase.GetCharObject().transform.localPosition; this._PreRotate = kCharBase.GetCharObject().transform.localRotation; } }
public void OnClickOK(IUIObject obj) { TsAudioManager.Instance.AudioContainer.RequestAudioClip("UI_SFX", "PLUNDER", "FORMATION-COMPLETE", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay)); SoldierBatch.SOLDIERBATCH.CheckSameBattlePos(SoldierBatch.SOLDIER_BATCH_MODE); if (!SoldierBatch.SOLDIERBATCH.IsHeroBatch()) { string empty = string.Empty; NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("124"), "charname", @char.GetCharName() }); Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE); return; } int solBatchNum = SoldierBatch.SOLDIERBATCH.GetSolBatchNum(); int num; if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_PVP_MAKEUP) { if (NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo == null) { return; } num = 6; } else if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_PVP_MAKEUP2) { num = 3; } else { num = SoldierBatch.SOLDIERBATCH.GetMaxSolArray(); } if (solBatchNum < num) { this.ShowMessageBox_NotEnough_SolNumBatch(new YesDelegate(this.OnCompleteBatch), solBatchNum, num); return; } this.OnCompleteBatch(null); }
private void Click_DailyDungeonStart(IUIObject Obj) { NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; if (nrCharUser == null) { return; } if (nrCharUser.GetPersonInfoUser() == null) { return; } if (!SoldierBatch.SOLDIERBATCH.IsHeroDailyDungeonBatch()) { string empty = string.Empty; NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("124"), "charname", @char.GetCharName() }); Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE); return; } int tempCount = SoldierBatch.SOLDIERBATCH.GetTempCount(); int num = 0; if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_DAILYDUNGEON) { if (NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo == null) { return; } num = 6; } if (tempCount < num) { this.ShowMessageBox_NotEnough_SolNumBatch(new YesDelegate(this.OnCompleteBatch_DailyDungeon), tempCount, num); return; } this.OnCompleteBatch_DailyDungeon(null); }
public string GetWeapon() { NrCharBase charBase = this.m_charBase; if (charBase != null) { eWEAPON_TYPE weaponType = (eWEAPON_TYPE)charBase.GetWeaponType(); string text = weaponType.ToString(); return(text.ToUpper()); } if (this.m_battleChar != null) { eWEAPON_TYPE attackCharWeaponType = (eWEAPON_TYPE)this.m_battleChar.GetAttackCharWeaponType(); string text2 = attackCharWeaponType.ToString(); return(text2.ToUpper()); } return("Null"); }
public void Set(NrCharBase pkTarget, string strName, float fTime, int nTextIndex) { this.m_TargetChar = pkTarget; this.m_lbCharName.SetText(strName); string textFromTBS = NrTSingleton <NrTextMgr> .Instance.GetTextFromTBS(nTextIndex.ToString()); this.m_lbTalk.Text = textFromTBS; float width = this.m_lbTalk.GetWidth(); float totalHeight = this.m_lbTalk.spriteText.TotalHeight; base.SetSize(base.GetSize().x, this.m_lbTalk.GetLocationY() + totalHeight + 14f); this.m_lbTalk.Setup(width, totalHeight); this.m_lbTalk.Text = textFromTBS; this.m_fEndTime = Time.time + fTime; NrTSingleton <ChatManager> .Instance.PushMsg(CHAT_TYPE.BATTLE, strName, NrTSingleton <NrTextMgr> .Instance.GetTextFromTBS(nTextIndex.ToString())); this.Show(); }
private bool ReadyCharInfo() { if (this.m_pkUserObj == null) { GameObject myCharObject = NrTSingleton <NkCharManager> .Instance.GetMyCharObject(); if (myCharObject == null) { this.m_Debugstring.Add("ReadyCharInfo: NOT FOUND USER "); return(false); } this.m_MainUser = NrTSingleton <NkCharManager> .Instance.GetChar(1); this.m_pkUserObj = myCharObject; this.m_pkCharMapInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_kCharMapInfo; } return(true); }
public bool AddChar(string ActorName, string CharKindCode, float X, float Y, int Angle, bool Hide) { if (string.IsNullOrEmpty(ActorName) || string.IsNullOrEmpty(CharKindCode)) { return(false); } if (this.IsActor(ActorName)) { TsLog.LogWarning(string.Format("[EventTriggerMiniDrama] ActorManager : Have Equal CharName {0}", ActorName), new object[0]); return(false); } NrCharKindInfo charKindInfoFromCode = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfoFromCode(CharKindCode); if (charKindInfoFromCode == null) { return(false); } NEW_MAKECHAR_INFO nEW_MAKECHAR_INFO = new NEW_MAKECHAR_INFO(); nEW_MAKECHAR_INFO.CharName = TKString.StringChar(charKindInfoFromCode.GetName()); nEW_MAKECHAR_INFO.CharPos.x = X; nEW_MAKECHAR_INFO.CharPos.y = EventTriggerGameHelper.GetGroundPosition(X, Y); nEW_MAKECHAR_INFO.CharPos.z = Y; float f = (float)Angle * 0.0174532924f; nEW_MAKECHAR_INFO.Direction.x = 1f * Mathf.Sin(f); nEW_MAKECHAR_INFO.Direction.y = 0f; nEW_MAKECHAR_INFO.Direction.z = 1f * Mathf.Cos(f); nEW_MAKECHAR_INFO.CharKind = charKindInfoFromCode.GetCharKind(); nEW_MAKECHAR_INFO.CharKindType = 3; nEW_MAKECHAR_INFO.CharUnique = NrTSingleton <NkQuestManager> .Instance.GetClientNpcUnique(); int id = NrTSingleton <NkCharManager> .Instance.SetChar(nEW_MAKECHAR_INFO, false, false); NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(id); NkCharIDInfo nkCharIDInfo = new NkCharIDInfo(); nkCharIDInfo.m_nClientID = @char.GetID(); nkCharIDInfo.m_nCharUnique = @char.GetCharUnique(); nkCharIDInfo.m_nWorldID = @char.GetWorldID(); @char.SetExceptHideForLoad(true); return(this.AddActor(ActorName, nkCharIDInfo, true, Hide)); }
public Vector3 FindFirstPath(short iBountyHuntUnique) { Vector3 result = Vector3.zero; NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo(); if (myCharInfo == null) { return(result); } int mapIndex = myCharInfo.m_kCharMapInfo.MapIndex; BountyInfoData bountyInfoDataFromUnique = this.GetBountyInfoDataFromUnique(iBountyHuntUnique); if (bountyInfoDataFromUnique == null) { return(result); } if (bountyInfoDataFromUnique.i32MapIndex != mapIndex) { this.IsWarp(iBountyHuntUnique, bountyInfoDataFromUnique.i32MapIndex); } else { BountyHuntNPCInfo bountyHuntNPCInfo = this.GetNPCInfo((int)bountyInfoDataFromUnique.i16Unique); if (bountyHuntNPCInfo == null) { bountyHuntNPCInfo = this.UpdateClientNpc(bountyInfoDataFromUnique.i32MapIndex); } if (bountyHuntNPCInfo != null) { int i32MapIndex = bountyInfoDataFromUnique.i32MapIndex; short destX = (short)bountyHuntNPCInfo.Pos.x; short destY = (short)bountyHuntNPCInfo.Pos.z; NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1); if (@char != null && @char.m_kCharMove != null) { result = @char.m_kCharMove.FindFirstPath(i32MapIndex, destX, destY, false); } } } NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.BOUNTYHUNTING_DLG); return(result); }
public void NoChangeMove() { if (this.bMouseCharMove) { NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1); if (@char == null) { return; } if (@char != null) { @char.m_kCharMove.MoveStop(true, true); @char.m_kCharMove.SendCharMovePacketForKeyBoardMove(true); } this.bMouseCharMove = false; this.SetSafeClickTime(-0.2f); } }
public void SetReady(GS_TOURNAMENT_PLAYER_STATE_NFY _NFY) { NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1); if (@char != null && @char.GetCharName().Equals(TKString.NEWString(_NFY.szPlayerName))) { NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo(); if (myCharInfo != null && myCharInfo.Tournament) { if (_NFY.nPlayerState != 3) { if (_NFY.nPlayerState == 2) { } } } } }
public override void OnTrigger() { if (this.TriggerOn) { return; } NrTSingleton <NkQuestManager> .Instance.IncreaseQuestParamVal(999, (long)this.EventTriggerUnique, 1L); NrTSingleton <NrEventTriggerInfoManager> .Instance.SendOnEventTrigger(this.EventTriggerUnique); NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1); if (@char != null) { @char.m_kCharMove.MoveStop(true, false); } EventTriggerMapManager.Instance.AddActionTrigger(this); base.OnTrigger(); }
public void OnPlunderStart(IUIObject obj) { if (!SoldierBatch.SOLDIERBATCH.IsHeroBatch()) { string empty = string.Empty; NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("124"), "charname", @char.GetCharName() }); Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE); return; } NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo(); long charSubData = myCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_PLUNDER_COOLTIME); long dueDateTick = PublicMethod.GetDueDateTick(charSubData); if (dueDateTick > 0L) { string textFromMessageBox = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("94"); string textFromMessageBox2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("24"); MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI; msgBoxUI.SetMsg(new YesDelegate(this.OnStartMatch), null, textFromMessageBox, textFromMessageBox2, eMsgType.MB_OK_CANCEL, 2); return; } int solBatchNum = SoldierBatch.SOLDIERBATCH.GetSolBatchNum(); int maxSolArray = SoldierBatch.SOLDIERBATCH.GetMaxSolArray(); if (solBatchNum < maxSolArray) { this.ShowMessageBox_NotEnough_SolNumBatch(new YesDelegate(this.OnStartMatch), solBatchNum, maxSolArray); return; } this.OnStartMatch(null); }
private void ReplaceGender(ref int m_iTextCount, ref StringBuilder refReplaceText, string content) { char[] separator = new char[] { '/' }; int num = 2; int i = m_iTextCount + 2; int length = content.Length; NrTSingleton <UIDataManager> .Instance.InitStringBuilder(); while (i < length) { i++; num++; if (content[i] == this.m_szTag[0]) { break; } NrTSingleton <UIDataManager> .Instance.AppendString(content[i]); } string[] array = NrTSingleton <UIDataManager> .Instance.GetString().Split(separator); if (2 <= array.Length) { NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1); if (@char != null) { if (@char.GetCharKindInfo().GetGender() == 1) { refReplaceText.Append(array[0]); } else if (@char.GetCharKindInfo().GetGender() == 2) { refReplaceText.Append(array[1]); } } } m_iTextCount += num + 2; }
private void SupporterDlgGuiSet() { NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1); if (@char != null) { string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1818"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref textFromInterface, new object[] { textFromInterface, "targetname1", this.m_strCharName, "targetname2", this.m_strCharName }); this.m_LB_Label01.SetText(textFromInterface); } }
public void SetFollowCharPersonID(long nPersonID, string Charname) { if (nPersonID == 0L) { NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_nFollowCharPersonID = 0L; NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_FollowCharName = string.Empty; NrTSingleton <FormsManager> .Instance.Hide(G_ID.DLG_FOLLOWCHAR); } else { NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_nFollowCharPersonID = nPersonID; NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_FollowCharName = Charname; NrCharBase charByPersonID = NrTSingleton <NkCharManager> .Instance.GetCharByPersonID(nPersonID); if (charByPersonID != null) { NrTSingleton <FormsManager> .Instance.ShowForm(G_ID.DLG_FOLLOWCHAR); } } }