private void SetLegendSolShow(byte bSeason) { this.m_NewListBox.Clear(); List <MythSolSlotData> list = null; if (this.dicSlotData.ContainsKey(bSeason)) { this.dicSlotData.TryGetValue(bSeason, out list); int num = list.Count / 9 + 1; for (int i = 0; i < num; i++) { NewListItem newListItem = new NewListItem(this.m_NewListBox.ColumnNum, true, string.Empty); for (int j = 0; j < 9; j++) { int num2 = i * 9 + j; if (num2 < list.Count) { NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(list[num2].i32KindInfo); newListItem.SetListItemData(9 + j, charKindInfo.GetCharKind(), charKindInfo, new EZValueChangedDelegate(this.OnSoldierInfo), null); newListItem.SetListItemData(18 + j, charKindInfo.GetCharKind(), charKindInfo, null, null); newListItem.SetListItemData(27 + j, false); } } this.m_NewListBox.Add(newListItem); } this.m_NewListBox.RepositionItems(); } }
public void InitViewCostumeGuide(CostumeGuide_Dlg owner, COSTUMEGUIDE_SLOT[] slotList, List <SolSlotData> seasonSlotDataList, byte page) { this.ClearCostumeSlots(ref slotList); if (seasonSlotDataList == null || slotList == null) { return; } int num = (int)((page - 1) * 27); int count = seasonSlotDataList.Count; owner._maxPage = (byte)(count / 27); if (count % 27 > 0) { owner._maxPage += 1; } for (int i = 0; i < 27; i++) { if (seasonSlotDataList.Count <= num) { break; } NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(seasonSlotDataList[num].i32KindInfo); if (charKindInfo != null) { slotList[i].IT_Slot.SetSolImageTexure(eCharImageType.SMALL, charKindInfo.GetCharKind(), (int)(seasonSlotDataList[num].bSolGrade - 1)); } else { slotList[i].IT_Slot.SetTexture("Win_T_ItemEmpty"); } slotList[i].DT_BlackSlot.Hide(true); bool flag = NrTSingleton <NrCharCostumeTableManager> .Instance.IsNewCostumeExistByCode(charKindInfo.GetCode()); slotList[i].Box_New.Hide(!flag); slotList[i].DT_Event.Hide(true); UIBaseInfoLoader legendFrame = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendFrame(charKindInfo.GetCharKind(), (int)seasonSlotDataList[num].bSolGrade); if (legendFrame != null) { slotList[i].DT_Slot.SetTexture(legendFrame); } else { slotList[i].DT_Slot.SetTexture("Win_T_ItemEmpty"); } if (charKindInfo != null) { slotList[i].BT_Slot.Data = charKindInfo.GetCharKind(); } num++; } owner.ChangePageText(); }
public void ShowInfo() { string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("92"); string empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { textFromInterface, "targetname", this.pInvite_personinfo.Invite_UserName, "count", this.pInvite_personinfo.Invite_PersonLevel.ToString() }); this.m_lbTitle.SetText(empty); if (this.pInvite_personinfo.Invite_User_InfoMsg == string.Empty) { textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("124"); empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { textFromInterface, "username", this.pInvite_personinfo.Invite_UserName }); this.m_lbIntroMsg.SetText(empty); } else { this.m_lbIntroMsg.SetText(this.pInvite_personinfo.Invite_User_InfoMsg); } this.m_lbInviteFriendExp.Text = this.GetInvitePerson_Explain(this.pInvite_personinfo.eInvte_type); NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(this.pInvite_personinfo.Invite_PersonFaceCharKind); if (charKindInfo == null) { return; } if (NrTSingleton <NrCharKindInfoManager> .Instance.IsUserCharKind(charKindInfo.GetCharKind())) { this.m_lbFaceharKindName.Text = this.pInvite_personinfo.Invite_UserName; } else { this.m_lbFaceharKindName.Text = charKindInfo.GetName(); } this.m_ItFaceChar_Image.SetSolImageTexure(eCharImageType.LARGE, charKindInfo.GetCharKind(), -1); this.m_dtMineChar_Image.SetTexture(eCharImageType.SMALL, 242, -1, string.Empty); this.Show(); }
public void MakeAgitNPC(byte iNPCType) { AgitNPCData agitNPCData = NrTSingleton <NrBaseTableManager> .Instance.GetAgitNPCData(iNPCType.ToString()); if (agitNPCData == null) { return; } NrCharKindInfo charKindInfoFromCode = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfoFromCode(agitNPCData.strCharCode); if (charKindInfoFromCode == null) { return; } if (NrTSingleton <NkCharManager> .Instance.GetCharByCharKind(charKindInfoFromCode.GetCharKind()) != null) { return; } NEW_MAKECHAR_INFO nEW_MAKECHAR_INFO = new NEW_MAKECHAR_INFO(); nEW_MAKECHAR_INFO.CharName = TKString.StringChar(charKindInfoFromCode.GetName()); nEW_MAKECHAR_INFO.CharPos.x = agitNPCData.fPosX; nEW_MAKECHAR_INFO.CharPos.y = 0f; nEW_MAKECHAR_INFO.CharPos.z = agitNPCData.fPosY; float f = agitNPCData.fDirection * 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 <NkCharManager> .Instance.GetClientNpcUnique(); if (nEW_MAKECHAR_INFO.CharUnique == 0) { } int num = NrTSingleton <NkCharManager> .Instance.SetChar(nEW_MAKECHAR_INFO, false, false); TsLog.LogOnlyEditor(string.Concat(new object[] { "AgitNPC : ", agitNPCData.ui8NPCType, " : ", num })); AgitNPCInfo agitNPCInfo = new AgitNPCInfo(); agitNPCInfo.SetCharID(num); agitNPCInfo.SetNPCType(agitNPCData.ui8NPCType); this.m_NewGuildAgit.AddNPCInfo(agitNPCInfo); }
private AutoSpriteControlBase GetCharKindContainer(UIListItemContainer item, int pTargetCharKind) { if (item == null) { return(null); } int objCount = item.GetObjCount(); for (int i = 0; i < objCount; i++) { object elementObject = item.GetElementObject(i); if (elementObject != null) { if (elementObject is NrCharKindInfo) { NrCharKindInfo nrCharKindInfo = (NrCharKindInfo)elementObject; if (nrCharKindInfo.GetCharKind() == pTargetCharKind) { return(item.GetElement(i)); } } } } return(null); }
public override void AfterAutoPath() { QuestAutoPathInfo autoPathInfo = NrTSingleton <NkQuestManager> .Instance.GetAutoPathInfo(); if (autoPathInfo != null) { NrCharNPC nrCharNPC = (NrCharNPC)NrTSingleton <NkCharManager> .Instance.GetCharByCharKind(autoPathInfo.m_nCharKind); if (nrCharNPC != null && autoPathInfo.m_nCharKind > 0 && nrCharNPC != null) { NrCharKindInfo charKindInfo = nrCharNPC.GetCharKindInfo(); if (charKindInfo != null) { NpcTalkUI_DLG npcTalkUI_DLG = (NpcTalkUI_DLG)NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.NPCTALK_DLG); npcTalkUI_DLG.SetNpcID(charKindInfo.GetCharKind(), nrCharNPC.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)); } } } } }
public string GetTextGreeting(NrCharKindInfo kChar) { string strTextKey = string.Empty; int charKind = kChar.GetCharKind(); if (kChar.IsATB(18014398509481984L)) { NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); long personID = charPersonInfo.GetPersonID(); NewGuildMember memberInfoFromPersonID = NrTSingleton <NewGuildManager> .Instance.GetMemberInfoFromPersonID(personID); if (memberInfoFromPersonID == null || memberInfoFromPersonID.GetRank() <= NewGuildDefine.eNEWGUILD_MEMBER_RANK.eNEWGUILD_MEMBER_RANK_INITIATE) { if (memberInfoFromPersonID == null) { NrTSingleton <NewGuildManager> .Instance.Send_GS_NEWGUILD_INFO_REQ(0); } strTextKey = this.m_dicNPC[charKind].GetExceptionTalkTextKey(); return(NrTSingleton <NrTextMgr> .Instance.GetTextFromCharInfo(strTextKey)); } } strTextKey = kChar.GetCHARKIND_NPCINFO().GetTextGreeting(); return(NrTSingleton <NrTextMgr> .Instance.GetTextFromCharInfo(strTextKey)); }
private void Click_PreViewHero(IUIObject obj) { if (obj == null) { return; } if (!(obj.Data is int)) { return; } int num = (int)obj.Data; if (NrTSingleton <NkCharManager> .Instance.GetChar(1) == null) { return; } NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(num); if (charKindInfo == null) { TsLog.LogOnlyEditor(" [Click_PreViewHero] == SOL CHARKIND ERROR {0}" + num + " !!"); return; } MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI; if (msgBoxUI == null) { return; } msgBoxUI.SetMsg(new YesDelegate(this.MessageBox_PreviewHero), charKindInfo.GetCharKind(), NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3293"), NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("438"), eMsgType.MB_OK_CANCEL, 2); msgBoxUI.Show(); }
public void AddNpcPos(ECO kEco) { if (0f < kEco.kMovePos[0].x || 0f < kEco.kMovePos[0].z) { return; } if (0f < kEco.kRanPos.x || 0f < kEco.kRanPos.z) { return; } NrCharKindInfo charKindInfoFromCode = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfoFromCode(kEco.szCharCode[0]); if (charKindInfoFromCode == null) { return; } if (charKindInfoFromCode.IsATB(8L)) { NrNpcPos nrNpcPos = new NrNpcPos(); nrNpcPos.strKey = NrTSingleton <UIDataManager> .Instance.GetString(kEco.szCharCode[0], ((int)kEco.kFixPos.x).ToString(), ((int)kEco.kFixPos.z).ToString()); charKindInfoFromCode.SetPosKey(nrNpcPos.strKey); nrNpcPos.strName = charKindInfoFromCode.GetName(); nrNpcPos.nCharKind = charKindInfoFromCode.GetCharKind(); nrNpcPos.nMapIndex = kEco.MapIndex; nrNpcPos.kPos.x = kEco.kFixPos.x; nrNpcPos.kPos.y = kEco.kFixPos.y; nrNpcPos.kPos.z = kEco.kFixPos.z; this.AddNpcPos(nrNpcPos); } }
public override void AfterAutoPath() { if (NrTSingleton <FormsManager> .Instance.IsShow(G_ID.NPCTALK_DLG)) { return; } QuestAutoPathInfo autoPathInfo = NrTSingleton <NkQuestManager> .Instance.GetAutoPathInfo(); if (autoPathInfo != null) { NrCharNPC nrCharNPC = (NrCharNPC)NrTSingleton <NkCharManager> .Instance.GetCharByCharKind(autoPathInfo.m_nCharKind); if (nrCharNPC != null && autoPathInfo.m_nCharKind > 0 && nrCharNPC != null) { NrCharKindInfo charKindInfo = nrCharNPC.GetCharKindInfo(); if (charKindInfo != null) { NpcTalkUI_DLG npcTalkUI_DLG = (NpcTalkUI_DLG)NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.NPCTALK_DLG); npcTalkUI_DLG.SetNpcID(charKindInfo.GetCharKind(), nrCharNPC.GetCharUnique()); npcTalkUI_DLG.Show(); } } } }
private void SetList(WhisperRoom Room) { List <WhisperUser> users = Room.GetUsers(); if (users == null) { return; } this.m_InviteList.Clear(); foreach (WhisperUser current in users) { ListItem listItem = new ListItem(); NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(current.nFaceKind); if (charKindInfo == null) { TsLog.LogError("WhisperUser NrCharKindInfo == NULL FaceKind = {0}", new object[] { current.nFaceKind }); } listItem.SetColumnGUIContent(0, charKindInfo.GetCharKind(), false); listItem.SetColumnStr(1, current.Name, NrTSingleton <CTextParser> .Instance.GetTextColor("1101")); string text = string.Empty; string strTextKey = string.Empty; switch (current.byPlayState) { case 0: strTextKey = "2142"; break; case 1: strTextKey = "2143"; break; case 2: strTextKey = "2144"; break; default: TsLog.LogWarning("byPlayState = {0}", new object[] { current.byPlayState }); strTextKey = "2142"; break; } text = string.Format("({0})", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(strTextKey)); TsLog.LogWarning("UserState = {0}", new object[] { text }); listItem.SetColumnStr(2, text, NrTSingleton <CTextParser> .Instance.GetTextColor("1101")); listItem.Key = current; this.m_InviteList.Add(listItem); } this.m_InviteList.RepositionItems(); }
public void SetCharKind(short i16CharUnique, NrCharKindInfo charKindInfo, QUEST_CONST.eQUESTSTATE eState) { int charKind = charKindInfo.GetCharKind(); if (this.m_nOldCharUnique == i16CharUnique && charKindInfo.IsATB(8L)) { this.QuestSymbol(charKind, eState); this.m_Button_Npc.SetButtonTextureKey("Win_B_NewTileBtnOrange"); return; } if (this.m_nOldCharUnique == i16CharUnique && charKindInfo.IsATB(16L)) { this.QuestSymbol(charKind, eState); this.m_Button_Npc.SetButtonTextureKey("Win_B_NewTileBtnOrange"); return; } if (this.m_nOldCharUnique == i16CharUnique && charKindInfo.IsATB(4L)) { this.BattleSymbol(); this.m_Button_Npc.SetButtonTextureKey("Win_B_BattleControl"); return; } this.m_i16CharUnique = i16CharUnique; this.m_nOldCharUnique = i16CharUnique; string name = NrTSingleton <NrCharKindInfoManager> .Instance.GetName(charKind); if (name.Length > 5) { float num; if (NrGlobalReference.strLangType.Equals("eng")) { num = (float)name.Length * this.m_Button_Npc.fontSize / 2f; } else { num = (float)name.Length * this.m_Button_Npc.fontSize; } base.SetSize(num + 50f, base.GetSize().y); this.m_Button_Npc.SetSize(num, this.m_Button_Npc.GetSize().y); } this.m_Button_Npc.Text = name; if (this.m_nOldCharUnique == i16CharUnique && charKindInfo.IsATB(8L)) { this.QuestSymbol(charKind, eState); this.m_Button_Npc.SetButtonTextureKey("Win_B_NewTileBtnOrange"); } else if (this.m_nOldCharUnique == i16CharUnique && charKindInfo.IsATB(16L)) { this.QuestSymbol(charKind, eState); this.m_Button_Npc.SetButtonTextureKey("Win_B_NewTileBtnOrange"); } else if (this.m_nOldCharUnique == i16CharUnique && charKindInfo.IsATB(4L)) { this.BattleSymbol(); this.m_Button_Npc.SetButtonTextureKey("Win_B_BattleControl"); } }
private void SetNpcList() { for (int i = 0; i < this.AutoNpc.Length; i++) { NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(this.AutoNpc[i]); if (charKindInfo != null) { if (!NrTSingleton <ContentsLimitManager> .Instance.IsNPCLimit(charKindInfo.GetCharKind())) { if (charKindInfo.IsATB(512L)) { if (!NrTSingleton <ContentsLimitManager> .Instance.IsPointExchage()) { goto IL_113; } } else if (charKindInfo.IsATB(1152921504606846976L)) { if (!NrTSingleton <ContentsLimitManager> .Instance.IsGuildWarExchangeLimit()) { goto IL_113; } } else if (charKindInfo.IsATB(549755813888L) && !NrTSingleton <ContentsLimitManager> .Instance.IsItemLevelCheckBlock() && !NrTSingleton <ContentsLimitManager> .Instance.IsItemEvolution(false)) { goto IL_113; } NewListItem newListItem = new NewListItem(3, true, string.Empty); newListItem.SetListItemData(1, charKindInfo.GetCharKind(), null, null, null); newListItem.SetListItemData(2, charKindInfo.GetName(), null, null, null); newListItem.Data = charKindInfo.GetCharKind(); this.m_NpcAutoMoveList.Add(newListItem); } } IL_113 :; } this.m_NpcAutoMoveList.RepositionItems(); this.m_NpcAutoMoveList.SetSelectedItem(0); this.OnNPCClick(null); }
private NkListSolInfo GetSolInfoByKind(NrCharKindInfo charKindInfo) { NkListSolInfo nkListSolInfo = new NkListSolInfo(); nkListSolInfo.SolCharKind = charKindInfo.GetCharKind(); nkListSolInfo.SolGrade = NrTSingleton <NrTableSolGuideManager> .Instance.GetCharKindGrade(nkListSolInfo.SolCharKind) - 1; nkListSolInfo.ShowLevel = false; nkListSolInfo.ShowCombat = false; nkListSolInfo.ShowGrade = true; return(nkListSolInfo); }
private void OnClickCostume(IUIObject obj) { if (this.m_SolInterfaceTool == null || this.m_SolInterfaceTool.m_kSelectCharKindInfo == null) { return; } NrCharKindInfo kSelectCharKindInfo = this.m_SolInterfaceTool.m_kSelectCharKindInfo; if (!NrTSingleton <NrCharCostumeTableManager> .Instance.IsCostumeKind(kSelectCharKindInfo.GetCharKind())) { return; } CostumeRoom_Dlg costumeRoom_Dlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.COSTUMEROOM_DLG) as CostumeRoom_Dlg; if (costumeRoom_Dlg == null) { return; } costumeRoom_Dlg.InitCostumeRoom(kSelectCharKindInfo.GetCharKind(), null); costumeRoom_Dlg.Show(); }
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); }
private void SetCostumePortrait(NewListItem item, CharCostumeInfo_Data costumeData) { CostumeDrawTextureInfo costumeDrawTextureInfo = new CostumeDrawTextureInfo(); costumeDrawTextureInfo.imageType = eCharImageType.MIDDLE; NrCharKindInfo charKindInfoFromCode = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfoFromCode(costumeData.m_CharCode); if (charKindInfoFromCode != null) { costumeDrawTextureInfo.charKind = charKindInfoFromCode.GetCharKind(); } costumeDrawTextureInfo.costumePortraitPath = costumeData.m_PortraitPath; item.SetListItemData(3, costumeDrawTextureInfo, costumeData, null, null); }
public virtual void OnSoldierInfo(IUIObject obj) { NrCharKindInfo nrCharKindInfo = obj.Data as NrCharKindInfo; if (nrCharKindInfo == null) { return; } Myth_Legend_Info_DLG myth_Legend_Info_DLG = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MYTH_LEGEND_INFO_DLG) as Myth_Legend_Info_DLG; if (myth_Legend_Info_DLG != null) { myth_Legend_Info_DLG.InitSetCharKind(nrCharKindInfo.GetCharKind()); } }
public int GetAgitNPCCharKindFromNPCType(byte iNPCType) { AgitNPCData agitNPCData = NrTSingleton <NrBaseTableManager> .Instance.GetAgitNPCData(iNPCType.ToString()); if (agitNPCData == null) { return(0); } NrCharKindInfo charKindInfoFromCode = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfoFromCode(agitNPCData.strCharCode); if (charKindInfoFromCode == null) { return(0); } return(charKindInfoFromCode.GetCharKind()); }
public override void OnSoldierInfo(IUIObject obj) { NrCharKindInfo nrCharKindInfo = obj.Data as NrCharKindInfo; if (nrCharKindInfo == null || nrCharKindInfo.GetCharKind() != this.m_iDummyCharKind) { return; } this.HideTouch(true); Myth_Legend_Info_DLG_ChallengeQuest myth_Legend_Info_DLG_ChallengeQuest = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MYTH_LEGEND_INFO_CHALLENGEQUEST_DLG) as Myth_Legend_Info_DLG_ChallengeQuest; if (myth_Legend_Info_DLG_ChallengeQuest != null) { myth_Legend_Info_DLG_ChallengeQuest.InitSetCharKind(this.m_iDummyCharKind); } }
public override bool ParseDataFromNDT(TsDataReader dr) { foreach (TsDataReader.Row data in dr) { PLUNDER_OBJECT_INFO pLUNDER_OBJECT_INFO = new PLUNDER_OBJECT_INFO(); pLUNDER_OBJECT_INFO.SetData(data); NrCharKindInfo charKindInfoFromCode = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfoFromCode(pLUNDER_OBJECT_INFO.szObjectKindCode); if (charKindInfoFromCode != null) { pLUNDER_OBJECT_INFO.nObject_Kind = charKindInfoFromCode.GetCharKind(); } NrTSingleton <NrTable_PlunderObjectinfo_Manager> .Instance.Set_Value(pLUNDER_OBJECT_INFO); } return(true); }
private void AddListItem(FacebookUserData _ItemData) { TsLog.LogWarning("AddListItem _ItemData = {0} , GameName = {1}", new object[] { _ItemData.m_ID, _ItemData.m_GameName }); NewListItem newListItem = new NewListItem(this.m_ListBox.ColumnNum, true, string.Empty); NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(_ItemData.nFaceCharKind); if (charKindInfo != null) { newListItem.SetListItemData(3, charKindInfo.GetCharKind(), null, null, null); newListItem.SetListItemData(9, false); } else { newListItem.SetListItemData(3, false); newListItem.SetListItemData(9, true); } if (string.IsNullOrEmpty(_ItemData.m_GameName)) { newListItem.SetListItemData(4, false); newListItem.SetListItemData(5, false); newListItem.SetListItemData(7, _ItemData.m_Name, null, null, null); } else { newListItem.SetListItemData(4, _ItemData.m_GameName, null, null, null); newListItem.SetListItemData(5, _ItemData.m_Name, null, null, null); newListItem.SetListItemData(7, false); } if (_ItemData.Level != 0) { newListItem.SetListItemData(6, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("178"), _ItemData, new EZValueChangedDelegate(this.OnClickInvateFriend), null); newListItem.SetListItemData(8, false); } else { newListItem.SetListItemData(6, false); newListItem.SetListItemData(8, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("179"), _ItemData, new EZValueChangedDelegate(this.OnClickInvateGame), null); } newListItem.Data = _ItemData.m_ID; this.m_ListBox.Add(newListItem); }
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 List <int> GetCostumeKindList() { if (this._costumeInfoDic == null) { Debug.LogError("ERROR, NrCharCostumeTableManager.cs, GetCostumeKindList(), _costumeInfoDic is Null "); return(null); } List <int> list = new List <int>(); foreach (string current in this._costumeInfoDic.Keys) { NrCharKindInfo charKindInfoFromCode = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfoFromCode(current); if (charKindInfoFromCode != null) { list.Add(charKindInfoFromCode.GetCharKind()); } } return(list); }
private NrCharBase _CreateClientNPC(string CharCode, POS3D CharPos, POS3D CharDirection) { NrCharKindInfo charKindInfoFromCode = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfoFromCode(CharCode); if (charKindInfoFromCode == null) { return(null); } NEW_MAKECHAR_INFO nEW_MAKECHAR_INFO = new NEW_MAKECHAR_INFO(); nEW_MAKECHAR_INFO.CharName = TKString.StringChar(charKindInfoFromCode.GetName()); nEW_MAKECHAR_INFO.CharPos.x = CharPos.x; nEW_MAKECHAR_INFO.CharPos.y = CharPos.y; nEW_MAKECHAR_INFO.CharPos.z = CharPos.z; nEW_MAKECHAR_INFO.Direction.x = CharDirection.x; nEW_MAKECHAR_INFO.Direction.y = CharDirection.y; nEW_MAKECHAR_INFO.Direction.z = CharDirection.z; nEW_MAKECHAR_INFO.CharKind = charKindInfoFromCode.GetCharKind(); nEW_MAKECHAR_INFO.CharKindType = 3; nEW_MAKECHAR_INFO.CharUnique = (short)(31000 + this._GetEmptySlot()); NrTSingleton <NkCharManager> .Instance.SetChar(nEW_MAKECHAR_INFO, false, false); NrCharBase charByCharUnique = NrTSingleton <NkCharManager> .Instance.GetCharByCharUnique(nEW_MAKECHAR_INFO.CharUnique); if (charByCharUnique != null) { if (charByCharUnique.IsHaveAnimation(eCharAnimationType.TalkStart1)) { charByCharUnique.SetAnimationLoadAfter(eCharAnimationType.TalkStart1); } else if (charByCharUnique.IsHaveAnimation(eCharAnimationType.TalkStay1)) { charByCharUnique.SetAnimationLoadAfter(eCharAnimationType.TalkStay1); } else { charByCharUnique.SetAnimationLoadAfter(eCharAnimationType.Stay1); } } return(charByCharUnique); }
public NewGuildDefine.eNEWGUILD_NPC_TYPE GetAgitNPCTypeFromCharKind(int i32CharKind) { for (int i = 1; i < 6; i++) { AgitNPCData agitNPCData = NrTSingleton <NrBaseTableManager> .Instance.GetAgitNPCData(i.ToString()); if (agitNPCData != null) { NrCharKindInfo charKindInfoFromCode = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfoFromCode(agitNPCData.strCharCode); if (charKindInfoFromCode != null) { if (charKindInfoFromCode.GetCharKind() == i32CharKind) { return((NewGuildDefine.eNEWGUILD_NPC_TYPE)i); } } } } return(NewGuildDefine.eNEWGUILD_NPC_TYPE.eNEWGUILD_NPC_TYPE_NONE); }
public bool MakeSubChar(float fPosX, float fPosZ, float fDirX, float fDirZ) { NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(this.m_siCharKind); if (charKindInfo == null) { return(false); } NEW_MAKECHAR_INFO nEW_MAKECHAR_INFO = new NEW_MAKECHAR_INFO(); nEW_MAKECHAR_INFO.CharName = TKString.StringChar(charKindInfo.GetName()); nEW_MAKECHAR_INFO.CharPos.x = fPosX; nEW_MAKECHAR_INFO.CharPos.y = 0f; nEW_MAKECHAR_INFO.CharPos.z = fPosZ; nEW_MAKECHAR_INFO.Direction.x = fDirX; nEW_MAKECHAR_INFO.Direction.y = 0f; nEW_MAKECHAR_INFO.Direction.z = fDirZ; nEW_MAKECHAR_INFO.CharKind = charKindInfo.GetCharKind(); nEW_MAKECHAR_INFO.CharKindType = 3; nEW_MAKECHAR_INFO.CharUnique = NrSubCharHelper.NrSubCharEntity.GetEmptySubCharUnique(); if (0 >= nEW_MAKECHAR_INFO.CharUnique) { return(false); } int num = NrTSingleton <NkCharManager> .Instance.SetChar(nEW_MAKECHAR_INFO, false, true); if (0 > num) { return(false); } this.m_kChar = NrTSingleton <NkCharManager> .Instance.GetChar(num); if (this.m_kChar == null) { return(false); } this.m_kChar.m_bSubChar = true; return(true); }
protected virtual void Click_PreViewHero(IUIObject obj) { if (obj == null) { return; } NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(this.m_CharKind_Legendinfo.i32Element_LegendCharkind); if (charKindInfo == null) { TsLog.LogOnlyEditor(" [Click_PreViewHero] == SOL CHARKIND ERROR {0}" + this.m_CharKind_Legendinfo.i32Element_LegendCharkind + " !!"); return; } MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI; if (msgBoxUI == null) { return; } msgBoxUI.SetMsg(new YesDelegate(this.MessageBox_PreviewHero), charKindInfo.GetCharKind(), NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3293"), NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("438"), eMsgType.MB_OK_CANCEL, 2); msgBoxUI.Show(); }
private void ShowList() { this.ClearSoldierList(); if (this.m_ShowList.Count == 0) { return; } for (int i = 0; i < SelectItemDlg.NUM_SOLDIERLIST; i++) { int num = i + (this.m_CurPage - 1) * SelectItemDlg.NUM_SOLDIERLIST; if (num >= this.m_ShowList.Count) { break; } NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(this.m_ShowList[num].CharKind); if (charKindInfo != null) { this._btSoldier[i].controlIsEnabled = true; this._dtSoldierLine[i].Visible = true; this._dtSoldierIcon[i].SetTexture(eCharImageType.SMALL, this.m_ShowList[num].CharKind, (int)this.m_ShowList[num].Grade, string.Empty); this._dtRepairIcon[i].Visible = false; this._dtRepairIconBG[i].Visible = false; string text = charKindInfo.GetName(); if (charKindInfo.GetCharKind() < 10) { NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; text = nrCharUser.GetPersonInfo().GetCharName(); } this._lbSoldierName[i].Text = text; this._lbSoldierLevel[i].Text = "Lv." + this.m_ShowList[num].Level.ToString(); this._btSoldier[i].data = this.m_ShowList[num].SolID; } } this._lbPage.Text = this.m_CurPage + " / " + this.m_TotalPage; this._btSearch.Visible = true; }
private NkListSolInfo GetGuildMemberPortraitInfo(NewGuildMember guildMember) { if (guildMember == null) { return(null); } NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(guildMember.GetFaceCharKind()); NkListSolInfo nkListSolInfo = new NkListSolInfo(); if (charKindInfo != null) { nkListSolInfo.SolCharKind = charKindInfo.GetCharKind(); } nkListSolInfo.SolGrade = -1; nkListSolInfo.SolInjuryStatus = false; nkListSolInfo.ShowCombat = false; nkListSolInfo.ShowGrade = false; nkListSolInfo.ShowLevel = false; nkListSolInfo.SolCostumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(guildMember.GetCostumeUnique()); return(nkListSolInfo); }