public void On_ClickOK(IUIObject a_cObject) { if (this.m_TextField_NameInput.Text.Length <= 0) { return; } NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; if (this.m_TextField_NameInput.Text == nrCharUser.GetCharName()) { Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("51"), SYSTEM_MESSAGE_TYPE.NORMAL_MESSAGE); return; } if (COMMON_CONSTANT_Manager.GetInstance() == null) { TsLog.LogWarning("!!!!!!!!!!!!!!!!!!!!! NOT Error Common_Constant", new object[0]); return; } SupporterDlg supporterDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.SUPPORTER_DLG) as SupporterDlg; if (supporterDlg != null) { string charName = supporterDlg.GetCharName(); if (charName != string.Empty) { WS_SUPPORTER_ADD_REQ wS_SUPPORTER_ADD_REQ = new WS_SUPPORTER_ADD_REQ(); TKString.StringChar(this.m_TextField_NameInput.Text, ref wS_SUPPORTER_ADD_REQ.szCharName_Target); SendPacket.GetInstance().SendObject(16777287, wS_SUPPORTER_ADD_REQ); } } }
public void ReFreshItem() { if (this.m_SetItem == null) { return; } ITEM iTEM = new ITEM(); if (this.m_SetItem.m_nPosType == 10) { NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; if (nrCharUser == null) { return; } NkSoldierInfo soldierInfoFromSolID = nrCharUser.GetPersonInfo().GetSoldierInfoFromSolID(this.m_SolID); if (soldierInfoFromSolID != null) { iTEM = soldierInfoFromSolID.GetEquipItemInfo().GetItem(this.m_SetItem.m_nItemPos); } } else { iTEM = NkUserInventory.GetInstance().GetItem(this.m_SetItem.m_nPosType, this.m_SetItem.m_nItemPos); this.m_SolID = 0L; } this.m_SetItem = iTEM; this.SetSolID(this.m_SolID); this.Set_Value(iTEM); }
private void ClickGroupList(eWHISPERMENU _type) { if (_type != eWHISPERMENU.eEWHISPERMENU_FRIEND_ADD) { if (_type != eWHISPERMENU.eWHISPERMENU_USER_KICK) { if (_type == eWHISPERMENU.eEWHISPERMENU_SHOW_DETAIL_INFO) { GS_OTHERCHAR_INFO_PERMIT_REQ gS_OTHERCHAR_INFO_PERMIT_REQ = new GS_OTHERCHAR_INFO_PERMIT_REQ(); gS_OTHERCHAR_INFO_PERMIT_REQ.nPersonID = this.m_WhisperUser.PersonID; SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_OTHERCHAR_INFO_PERMIT_REQ, gS_OTHERCHAR_INFO_PERMIT_REQ); } } } else { NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; if (nrCharUser.GetCharName().CompareTo(this.m_WhisperUser.Name) != 0) { GS_FRIEND_APPLY_REQ gS_FRIEND_APPLY_REQ = new GS_FRIEND_APPLY_REQ(); gS_FRIEND_APPLY_REQ.i32WorldID = 0; TKString.StringChar(this.m_WhisperUser.Name, ref gS_FRIEND_APPLY_REQ.name); SendPacket.GetInstance().SendObject(904, gS_FRIEND_APPLY_REQ); } } }
private static int CompareLevel(long x, long y) { NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; if (nrCharUser == null) { return(-1); } NrPersonInfoBase personInfo = nrCharUser.GetPersonInfo(); if (personInfo == null) { return(-1); } NkSoldierInfo soldierInfoFromSolID = personInfo.GetSoldierInfoFromSolID(x); NkSoldierInfo soldierInfoFromSolID2 = personInfo.GetSoldierInfoFromSolID(y); if (soldierInfoFromSolID.GetLevel() < soldierInfoFromSolID2.GetLevel()) { return(1); } if (soldierInfoFromSolID.GetLevel() == soldierInfoFromSolID2.GetLevel()) { if (soldierInfoFromSolID.GetCharKind() > soldierInfoFromSolID2.GetCharKind()) { return(1); } if (soldierInfoFromSolID.GetCharKind() == soldierInfoFromSolID2.GetCharKind()) { return(0); } } return(-1); }
public static void LinkTextProcessorRightClick(LinkText.TYPE linkTextType, string strText, string strTextKey, object objData) { if (linkTextType == LinkText.TYPE.PLAYER) { int startIndex = strText.IndexOf('[') + 1; int num = strText.LastIndexOf(']') - 1; if (num < 0) { num = strText.Length; } string text = strText.Substring(startIndex, num); NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; if (nrCharUser == null) { return; } NrPersonInfoBase personInfo = nrCharUser.GetPersonInfo(); if (personInfo == null) { return; } string charName = personInfo.GetCharName(); if (string.IsNullOrEmpty(charName)) { return; } if (text.Equals(charName)) { return; } NrTSingleton <CRightClickMenu> .Instance.CreateUI(0L, 0, text, CRightClickMenu.KIND.CHAT_USER_LINK_TEXT, CRightClickMenu.TYPE.NAME_SECTION_2, false); } }
public void ChangeNameAck(long nResult) { if (nResult == 0L) { TsLog.Log("이름 변경 성공", new object[0]); NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; NrPersonInfoBase personInfo = nrCharUser.GetPersonInfo(); personInfo.SetCharName(this.m_newName); NrTSingleton <NrMainSystem> .Instance.SetLatestPersonID(personInfo.GetPersonID().ToString()); MsgHandler.Handle("Req_CONNECT_GAMESERVER_REQ", new object[] { personInfo.GetPersonID() }); FacadeHandler.MoveStage(Scene.Type.PREPAREGAME); NrTSingleton <NkQuestManager> .Instance.SortingQuestInGroup(); NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.CHANGENAME_DLG); } else if (nResult == -20L) { Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("90")); this.m_btOk.SetEnabled(true); } else { Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("91")); this.m_btOk.SetEnabled(true); } }
public void DisplayNames(bool bMakeName) { for (short num = 1; num <= 3; num += 1) { int charID = NrTSingleton <NkCharManager> .Instance.m_kCharAccountInfo.GetCharID((int)num); NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(charID) as NrCharUser; if (nrCharUser == null) { this.ShowHideCharName((int)num, false); } else { this.ShowHideCharName((int)num, true); if (bMakeName) { this.SetCharName((int)num, nrCharUser.GetPersonInfo().GetLevel(0L), nrCharUser.GetPersonInfo().GetCharName(), nrCharUser.GetCharKindInfo().GetCHARKIND_INFO().CharTribe, nrCharUser.GetPersonInfo().GetPersonID(), nrCharUser.GetCharKindInfo().GetCHARKIND_INFO().CHARKIND); } else { TsLog.Log("Test bMakeName == false", new object[0]); this.ShowHideCharName((int)num, bMakeName); } } } }
public void BothCharMove() { NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1); if (@char == null) { return; } 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; }
public void ProcessByTargetChar() { if (this.m_pkChar.GetID() == 1) { NrCharUser nrCharUser = (NrCharUser)this.m_pkChar; if (nrCharUser.GetFollowCharPersonID() > 0L) { NrCharBase followChar = this.GetFollowChar(nrCharUser.GetFollowCharPersonID()); if (followChar != null && followChar.GetCharObject() != null && Vector3.Distance(this.m_vFollowCharLastPos, followChar.GetCharObject().transform.position) > 60f) { int nMapIndex = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_kCharMapInfo.m_nMapIndex; this.m_vFollowCharLastPos = new Vector3(followChar.GetCharObject().transform.position.x, followChar.GetCharObject().transform.position.y, followChar.GetCharObject().transform.position.z); float d = 6f; Vector3 lhs = followChar.GetCharObject().transform.position + d * -followChar.GetCharObject().transform.forward; if (lhs != Vector3.zero) { this.m_pkChar.m_kCharMove.AutoMoveTo(nMapIndex, (short)lhs.x, (short)lhs.z, true); NrTSingleton <NkQuestManager> .Instance.SetAutoPathInfo(null); } return; } } } if (this.CheckTargetPositionChanged()) { Vector3 charPos = this.m_pkTargetChar.GetPersonInfo().GetCharPos(); this.MoveTo(charPos.x, charPos.y, charPos.z); } }
public bool AutoMoveTo(int DestMapIndex, short DestX, short DestY, bool bFollowChar) { if (this.m_pkChar == null || this.m_pkChar.GetID() != 1) { return(false); } if (!NrTSingleton <NkClientLogic> .Instance.IsMovable()) { return(false); } if (!bFollowChar && this.m_pkChar != null && this.m_pkChar.IsCharKindATB(1L)) { NrCharUser nrCharUser = (NrCharUser)this.m_pkChar; if (nrCharUser.GetFollowCharPersonID() > 0L) { NrTSingleton <FormsManager> .Instance.ShowForm(G_ID.DLG_STOPAUTOMOVE); return(false); } } DestMapIndex = NrTSingleton <MapManager> .Instance.GetAutoMoveDestMapIndex(DestMapIndex); if (NrTSingleton <NrAutoPath> .Instance.Generate(DestMapIndex, DestX, DestY, bFollowChar) == 0) { return(false); } Vector3 lhs = NrTSingleton <NrAutoPath> .Instance.PopMovePath(); if (lhs != Vector3.zero) { this.MoveTo(lhs.x, lhs.y, lhs.z); } return(true); }
public void SetTabMoveInfoForMobile(bool bStart, eCharAnimationType anitype) { NrCharUser nrCharUser = this.m_pkChar as NrCharUser; Nr3DCharActor nr3DCharActor = nrCharUser.Get3DChar() as Nr3DCharActor; if (nr3DCharActor == null) { return; } if (bStart) { this.ProcessIncreaseMove(); this.SetCharPos(nr3DCharActor.GetRootGameObject()); this.SendCharMovePacketForKeyBoardMove(false); this.m_bArrived = false; this.m_bKeyboardMove = false; this.m_bMouseMove = false; this.m_bJoyStickMove = true; } else { this.MoveStop(false, false); } nrCharUser.SetAnimation(anitype); }
public void CharacterSelect(NrCharUser pkChar, bool bConnectServer) { this.m_kSelectedChar = pkChar; if (bConnectServer) { this._ConnectGameServer(); } }
public override void Update() { if (NrTSingleton <NkCharManager> .Instance.CharacterListSetComplete) { NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(NrTSingleton <NkCharManager> .Instance.SelectedCharID); if (@char != null) { NrCharUser nrCharUser = @char as NrCharUser; if (nrCharUser != null && nrCharUser.IsShaderRecovery() && NrTSingleton <NkCharManager> .Instance.SelectedCharID != 0) { this.CharacterSelect(nrCharUser, false); } } } if (this.m_CameraAniPlay == null) { return; } E_CHAR_SELECT_STEP e_CHAR_SELECT_STEP = this.m_CameraAniPlay.Update(); if (e_CHAR_SELECT_STEP != E_CHAR_SELECT_STEP.NONE) { this.m_SelectStep = e_CHAR_SELECT_STEP; } E_CHAR_SELECT_STEP selectStep = this.m_SelectStep; if (selectStep != E_CHAR_SELECT_STEP.INTRO) { if (selectStep != E_CHAR_SELECT_STEP.CREATE_SELECT) { if (this.m_CharselInput != null) { NrTSingleton <NrMainSystem> .Instance.m_kInputManager.RemoveInputCommandLayer(this.m_CharselInput); this.m_CharselInput = null; } } else if (this.m_CharselInput == null) { this.m_CharselInput = new CharSelectCommandLayer(); NrTSingleton <NrMainSystem> .Instance.m_kInputManager.AddInputCommandLayer(this.m_CharselInput); } } else if (NkInputManager.GetMouseButtonUp(0)) { if (NrTSingleton <FormsManager> .Instance.IsForm(G_ID.TOASTMSG_DLG)) { NrTSingleton <CCameraAniPlay> .Instance.SkipEvent(); } else { ToastMsgDlg toastMsgDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.TOASTMSG_DLG) as ToastMsgDlg; toastMsgDlg.SetMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromPreloadText("24")); } } }
public int Generate(int DestMapIndex, short DestX, short DestY, bool bFollowChar) { if (!this.ReadyCharInfo()) { return(0); } if (!bFollowChar && this.m_MainUser != null && this.m_MainUser.IsCharKindATB(1L)) { NrCharUser nrCharUser = (NrCharUser)this.m_MainUser; if (nrCharUser.GetFollowCharPersonID() > 0L) { NrTSingleton <FormsManager> .Instance.ShowForm(G_ID.DLG_STOPAUTOMOVE); return(0); } } if (this.m_pkUserObj == null) { this.m_Debugstring.Add("ERROR USER NOT FOUND"); } if (this.m_cGxRoadPointMgr == null) { this.m_Debugstring.Add("ERROR M_CGXROADPOINTMGR NOT FOUND"); } int nMapIndex = this.m_pkCharMapInfo.m_nMapIndex; this.m_Debugstring.Add(string.Concat(new object[] { "AUTOPATH \n STARTMAP: ", nMapIndex, "\tDESTMAP:", DestMapIndex, " \nDEST POSX:", DestX, " POSY:", DestY })); NrTSingleton <NkQuestManager> .Instance.IncreaseQuestParamVal(2, 0L, 1L); Vector3 v3Dest = new Vector3((float)DestX, 0f, (float)DestY); this.m_v3Dest = v3Dest; this.m_iDestMapIdx = DestMapIndex; if (nMapIndex == DestMapIndex) { this.CurrentMapMove(DestX, DestY); } else { this.NextMapMove(nMapIndex, this.DestMapIdx); } this.ClearUserData(); if (this.MovePathCount() > 0) { return(1); } return(0); }
public void ClickUseFullElixir(IUIObject obj) { if (!NrTSingleton <ContentsLimitManager> .Instance.IsWillSpend()) { return; } NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo; if (kMyCharInfo != null) { long num = kMyCharInfo.m_nMaxActivityPoint - kMyCharInfo.m_nActivityPoint; if (num <= 0L) { string textFromNotify = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("784"); Main_UI_SystemMessage.ADDMessage(textFromNotify, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE); return; } if (0 >= NkUserInventory.GetInstance().Get_First_ItemCnt(70005)) { string empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("168"), "targetname", NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(70005) }); Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE); return; } ITEM item = NkUserInventory.GetInstance().GetItem(70005); if (item != null) { NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; NkSoldierInfo userSoldierInfo = nrCharUser.GetUserSoldierInfo(); long solID = userSoldierInfo.GetSolID(); GS_ITEM_SUPPLY_USE_REQ gS_ITEM_SUPPLY_USE_REQ = new GS_ITEM_SUPPLY_USE_REQ(); gS_ITEM_SUPPLY_USE_REQ.m_nItemUnique = item.m_nItemUnique; gS_ITEM_SUPPLY_USE_REQ.m_nDestSolID = solID; if ((long)item.m_nItemNum < num) { gS_ITEM_SUPPLY_USE_REQ.m_shItemNum = item.m_nItemNum; } else { gS_ITEM_SUPPLY_USE_REQ.m_shItemNum = (int)num; } gS_ITEM_SUPPLY_USE_REQ.m_byPosType = item.m_nPosType; gS_ITEM_SUPPLY_USE_REQ.m_shPosItem = item.m_nItemPos; SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_ITEM_SUPPLY_USE_REQ, gS_ITEM_SUPPLY_USE_REQ); } NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.WILLCHARGE_DLG); } }
public void KeyboardMove() { if (!NrTSingleton <NkClientLogic> .Instance.IsMovable()) { return; } if (!this.m_pkChar.IsMovingAnimation()) { return; } NrCharUser nrCharUser = this.m_pkChar as NrCharUser; if (nrCharUser == null || !nrCharUser.IsReady3DModel()) { return; } Nr3DCharActor nr3DCharActor = nrCharUser.Get3DChar() as Nr3DCharActor; if (nr3DCharActor == null) { return; } Transform transform = Camera.main.transform; Vector3 a = transform.TransformDirection(Vector3.forward); a.y = 0f; a = a.normalized; Vector3 a2 = new Vector3(a.z, 0f, -a.x); float axisRaw = NkInputManager.GetAxisRaw("Vertical"); float axisRaw2 = NkInputManager.GetAxisRaw("Horizontal"); Vector3 vector = axisRaw2 * a2 + axisRaw * a; Vector3 vector2 = Vector3.zero; if (vector != Vector3.zero) { float num = 0.3f; vector2 = Vector3.RotateTowards(vector2, vector, num * 0.0174532924f * Time.deltaTime, 1f); if (this.IsMovableArea(this.m_vCharPos.x + vector2.x, this.m_vCharPos.z + vector2.z) != NrCharDefine.eMoveTargetReason.MTR_SUCCESS && !this.FindMovableAreaByKey(ref vector2)) { return; } vector2 = vector2.normalized; } if (vector2 == Vector3.zero) { return; } this.ProcessIncreaseMove(); nr3DCharActor.KeyboardMove(vector2, true); this.SetCharPos(nr3DCharActor.GetRootGameObject()); this.SendCharMovePacketForKeyBoardMove(false); this.m_bArrived = false; this.m_bKeyboardMove = true; this.m_bMouseMove = false; }
public override bool CheckCondition(long i64Param, ref long i64ParamVal) { if (i64Param == base.GetParam() && i64ParamVal >= base.GetParamVal()) { NrCharUser nrCharUser = (NrCharUser)NrTSingleton <NkCharManager> .Instance.GetChar(1); i64ParamVal = (long)nrCharUser.GetSubChsrKind(0); return(true); } return(false); }
public void OnAutoMoveStop(object a_oObject) { NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1); if (@char != null && @char.IsCharKindATB(1L)) { NrCharUser nrCharUser = (NrCharUser)@char; nrCharUser.SetFollowCharPersonID(0L, string.Empty); nrCharUser.m_kCharMove.MoveStop(true, false); } }
private static void PlayerLinkFunc(string strText) { if (strText.Contains("[#")) { strText = strText.Remove(0, 11); } int startIndex = strText.IndexOf('[') + 1; int num = strText.LastIndexOf(']') - 1; if (num < 0) { num = strText.Length; } string text = strText.Substring(startIndex, num); NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; if (nrCharUser == null) { return; } NrPersonInfoBase personInfo = nrCharUser.GetPersonInfo(); if (personInfo == null) { return; } string charName = personInfo.GetCharName(); if (string.IsNullOrEmpty(charName)) { return; } if (text.Equals(charName)) { return; } int charKindByName = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindByName(strText); if (0 < charKindByName) { return; } if (TsPlatform.IsMobile) { NrTSingleton <CRightClickMenu> .Instance.CreateUI(0L, 0, text, CRightClickMenu.KIND.CHAT_USER_LINK_TEXT, CRightClickMenu.TYPE.NAME_SECTION_2, false); } else { GS_WHISPER_REQ gS_WHISPER_REQ = new GS_WHISPER_REQ(); gS_WHISPER_REQ.RoomUnique = 0; TKString.StringChar(text, ref gS_WHISPER_REQ.Name); SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_WHISPER_REQ, gS_WHISPER_REQ); } }
public NkSoldierInfo GetLeaderSolInfo(long _solID) { NkSoldierInfo nkSoldierInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetSoldierInfoBySolID(_solID); if (nkSoldierInfo == null) { NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; nkSoldierInfo = nrCharUser.GetPersonInfoUser().GetSoldierInfo(0); } return(nkSoldierInfo); }
private void BtnClickButton1(IUIObject obj) { NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1); if (@char.IsCharKindATB(1L)) { NrCharUser nrCharUser = (NrCharUser)@char; nrCharUser.SetFollowCharPersonID(0L, string.Empty); nrCharUser.m_kCharMove.MoveStop(true, false); } this.Close(); }
public void ShowWarpEffect() { if (this.m_bWarp) { NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; if (nrCharUser != null) { this.m_nEffectNum = NrTSingleton <NkEffectManager> .Instance.AddEffect("WARP", nrCharUser); } this.m_bWarp = false; } }
private void _onOK(object arg) { NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; NrPersonInfoBase personInfo = nrCharUser.GetPersonInfo(); WS_CHANGE_CHAR_NAME_REQ wS_CHANGE_CHAR_NAME_REQ = new WS_CHANGE_CHAR_NAME_REQ(); TKString.StringChar(this.m_originName, ref wS_CHANGE_CHAR_NAME_REQ.szCharName); TKString.StringChar(this.m_newName, ref wS_CHANGE_CHAR_NAME_REQ.szChangeName); wS_CHANGE_CHAR_NAME_REQ.nPersonID = personInfo.GetPersonID(); SendPacket.GetInstance().SendObject(16777258, wS_CHANGE_CHAR_NAME_REQ); this.m_btOk.SetEnabled(false); }
public static void GoToBlurNormalBattle() { NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; if (nrCharUser != null && nrCharUser.Get3DChar() != null) { GameObject rootGameObject = nrCharUser.Get3DChar().GetRootGameObject(); if (rootGameObject) { rootGameObject.AddComponent <NmMotionBlurLoading>(); } NrSound.ImmedatePlay("UI_SFX", "BATTLE", "ENTER", true); } }
public override void SetComponent() { this.m_UserName = (base.GetControl("TextField_TextField1") as TextField); this.m_UserName.ClearDefaultText(this.m_UserName); this.m_UserName.Text = string.Empty; this.m_lbMessage = (base.GetControl("Label_Label01") as Label); this.m_lbMessage.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("199")); this.m_btOk = (base.GetControl("Button_Button01") as Button); this.m_btOk.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickOk)); NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; this.m_originName = nrCharUser.GetCharName(); base.SetScreenCenter(); }
public void SendPacket_CreateAvatar(NrCharUser kCharAvatar, string strSupporterName) { WS_CREATE_CHAR_REQ wS_CREATE_CHAR_REQ = new WS_CREATE_CHAR_REQ(); NrPersonInfoUser nrPersonInfoUser = kCharAvatar.GetPersonInfo() as NrPersonInfoUser; if (nrPersonInfoUser == null) { return; } TKString.StringChar(nrPersonInfoUser.GetCharName(), ref wS_CREATE_CHAR_REQ.szCharName); TKString.StringChar(strSupporterName, ref wS_CREATE_CHAR_REQ.szSupporterName); wS_CREATE_CHAR_REQ.i32CharKind = nrPersonInfoUser.GetKind(0); wS_CREATE_CHAR_REQ.kBasePart.SetData(nrPersonInfoUser.GetBasePart()); SendPacket.GetInstance().SendObject(16777252, wS_CREATE_CHAR_REQ); }
private Texture2D GetPortraitLeaderSol(int iCharKind) { NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo; if (kMyCharInfo != null && kMyCharInfo.UserPortrait) { NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; if (nrCharUser.GetCharKind() == iCharKind) { return(kMyCharInfo.UserPortraitTexture); } } return(null); }
private void CharKeyBoardMove() { if ((int)this.CurCharKeyMoveStatus == 0 && (int)this.PrevCharKeyMoveStatus == 0) { return; } NrTSingleton <NkClientLogic> .Instance.InitPickChar(); sbyte prevCharKeyMoveStatus = this.PrevCharKeyMoveStatus; this.PrevCharKeyMoveStatus = this.CurCharKeyMoveStatus; NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; if (nrCharUser == null) { return; } if (!nrCharUser.IsReadyCharAction()) { return; } if (nrCharUser.GetFollowCharPersonID() > 0L) { if (!(NrTSingleton <FormsManager> .Instance.GetForm(G_ID.DLG_STOPAUTOMOVE) is StopAutoMove)) { NrTSingleton <FormsManager> .Instance.ShowForm(G_ID.DLG_STOPAUTOMOVE); } this.CurCharKeyMoveStatus = 0; this.PrevCharKeyMoveStatus = 0; return; } if ((int)this.CurCharKeyMoveStatus == 0) { if ((int)prevCharKeyMoveStatus > 0) { nrCharUser.m_kCharMove.MoveStop(true, true); nrCharUser.m_kCharMove.SendCharMovePacketForKeyBoardMove(true); } return; } if ((int)prevCharKeyMoveStatus == 0) { nrCharUser.m_kCharMove.MoveStop(false, false); nrCharUser.m_kCharMove.SetIncreaseMove(); } nrCharUser.m_kCharMove.KeyboardMove(); NrTSingleton <CRightClickMenu> .Instance.CloseUI(CRightClickMenu.CLOSEOPTION.CLICK); }
public void ShowLevelUpAlarm1() { NrTSingleton <GameGuideManager> .Instance.CheckGameGuide(GameGuideType.RECOMMEND_SOL); NrTSingleton <GameGuideManager> .Instance.CheckGameGuide(GameGuideType.REVIEW); NrTSingleton <GameGuideManager> .Instance.CheckGameGuide(GameGuideType.CERTIFY_EMAIL); NrTSingleton <NkQuestManager> .Instance.UpdateClientNpc(0); NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; if (nrCharUser != null) { NrTSingleton <NkEffectManager> .Instance.AddEffect("LEVELUP", nrCharUser); } }
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); }