public void MyCharMoveMouse() { NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1); if (@char == null) { return; } if (NkInputManager.GetMouseButton(0) && NkInputManager.GetMouseButton(1)) { NrCharUser nrCharUser = (NrCharUser)@char; if (nrCharUser.GetFollowCharPersonID() > 0L) { if (!(NrTSingleton <FormsManager> .Instance.GetForm(G_ID.DLG_STOPAUTOMOVE) is StopAutoMove)) { NrTSingleton <FormsManager> .Instance.ShowForm(G_ID.DLG_STOPAUTOMOVE); } return; } if (!this.bMouseCharMove) { nrCharUser.m_kCharMove.MoveStop(true, false); nrCharUser.m_kCharMove.SetIncreaseMove(); } nrCharUser.m_kCharMove.MouseMove(); this.bMouseCharMove = true; } else if (NkInputManager.GetMouseButtonUp(0)) { if (this.bMouseCharMove) { if (@char != null) { @char.m_kCharMove.MoveStop(true, true); @char.m_kCharMove.SendCharMovePacketForKeyBoardMove(true); } this.bMouseCharMove = false; this.SetSafeClickTime(-0.2f); return; } this.UpdateWalkEffect(false); if (NrTSingleton <FormsManager> .Instance.IsMouseOverForm()) { return; } 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)@char; if (nrCharUser2.GetFollowCharPersonID() > 0L) { NrTSingleton <FormsManager> .Instance.ShowForm(G_ID.DLG_STOPAUTOMOVE); } else { 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; } else if (this.bMouseCharMove) { if (@char != null) { @char.m_kCharMove.MoveStop(true, true); @char.m_kCharMove.SendCharMovePacketForKeyBoardMove(true); } this.bMouseCharMove = false; this.SetSafeClickTime(-0.2f); } }
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; }