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); } }
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 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); }
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); } } } }
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); } }
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 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); }
public void OnClickRequestEmergency(IUIObject obj) { if (this.m_nlSelectSoldierList.SelectedItem == null) { return; } long num = (long)this.m_nlSelectSoldierList.SelectedItem.Data; NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; NkSoldierInfo nkSoldierInfo = nrCharUser.GetPersonInfo().GetSoldierInfoFromSolID(num); if (nkSoldierInfo == null) { nkSoldierInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolList().GetSolInfo(num); } if (nkSoldierInfo == null) { return; } this.OnRequestEmergency(null); }
public bool IsExecutEnhance() { bool result = true; if (this.m_Packet.nSrcPosType == 10) { NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; if (nrCharUser == null) { return(false); } NkSoldierInfo soldierInfoFromSolID = nrCharUser.GetPersonInfo().GetSoldierInfoFromSolID(this.m_Packet.SolID); if (soldierInfoFromSolID != null) { ITEM item = soldierInfoFromSolID.GetEquipItemInfo().GetItem(this.m_Packet.nSrcItemPos); if (item == null) { result = false; } else if (item.m_nItemID == this.m_SetItem.m_nItemID && item.m_nItemUnique == this.m_SetItem.m_nItemUnique && item.m_nRank == this.m_SetItem.m_nRank) { result = true; } } } else { ITEM item = NkUserInventory.GetInstance().GetItem((int)((byte)this.m_Packet.nSrcPosType), this.m_Packet.nSrcItemPos); if (item == null) { result = false; } else if (item.m_nItemID == this.m_SetItem.m_nItemID && item.m_nItemUnique == this.m_SetItem.m_nItemUnique && item.m_nRank == this.m_SetItem.m_nRank) { result = true; } } return(result); }
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; }
public void Set_Item(ITEM a_cItem) { if (a_cItem == null) { return; } NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; NkSoldierInfo nkSoldierInfo = null; if (nrCharUser != null) { nkSoldierInfo = nrCharUser.GetPersonInfo().GetLeaderSoldierInfo(); } this.m_cItem = a_cItem; this.m_nCurItemNum = 1; this.m_nMaxItemNum = 12; if (a_cItem.m_nItemNum < 12) { this.m_nMaxItemNum = a_cItem.m_nItemNum; } this.Set_GetItemNum(); this.m_lbNotice.Visible = true; string empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1697"), "itemname", NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(this.m_cItem), "count", this.m_nMaxItemNum }); this.m_lbTitle.Text = empty; this.m_nlbEquipList.Clear(); this.m_nlbEquipList.SelectStyle = "Win_B_ListBoxOrange"; ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(this.m_cItem.m_nItemUnique); ITEM_BOX_GROUP iTEM_BOX_GROUP = null; if (itemInfo.IsItemATB(65536L)) { iTEM_BOX_GROUP = NrTSingleton <ItemManager> .Instance.GetBoxGroup(this.m_cItem.m_nItemUnique); if (iTEM_BOX_GROUP == null) { return; } } int num = 0; for (int i = 0; i < 12; i++) { int num2; int num3; int num4; if (iTEM_BOX_GROUP != null) { num2 = iTEM_BOX_GROUP.i32GroupItemUnique[i]; num3 = iTEM_BOX_GROUP.i32GroupItemNum[i]; num4 = iTEM_BOX_GROUP.i32GroupItemGrade[i]; } else { num2 = itemInfo.m_nBoxItemUnique[i]; num3 = itemInfo.m_nBoxItemNumber[i]; num4 = itemInfo.m_nBoxRank; } if (num2 > 0) { if (NrTSingleton <ItemManager> .Instance.IsItemATB(a_cItem.m_nItemUnique, 256L)) { NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo; if (kMyCharInfo != null) { ITEMTYPE_INFO itemTypeInfo = NrTSingleton <ItemManager> .Instance.GetItemTypeInfo(num2); if (itemTypeInfo != null) { if (nkSoldierInfo != null && nkSoldierInfo.IsEquipClassType(itemTypeInfo.WEAPONTYPE, itemTypeInfo.EQUIPCLASSTYPE)) { num++; NewListItem newListItem = new NewListItem(this.m_nlbEquipList.ColumnNum, true, string.Empty); if (num4 == 0) { UIBaseInfoLoader itemTexture = NrTSingleton <ItemManager> .Instance.GetItemTexture(num2); newListItem.SetListItemData(1, itemTexture, NrTSingleton <ItemManager> .Instance.GetBoxItemTemp(this.m_cItem.m_nItemUnique, i), null, null); TsLog.LogError("0 == itemRank", new object[0]); } else { ITEM iTEM = new ITEM(); if (iTEM_BOX_GROUP != null) { iTEM.m_nItemID = -9223372036854775808L; iTEM.m_nItemUnique = iTEM_BOX_GROUP.i32GroupItemUnique[i]; iTEM.m_nItemNum = iTEM_BOX_GROUP.i32GroupItemNum[i]; iTEM.m_nOption[0] = (int)NrTSingleton <Item_Makerank_Manager> .Instance.GetItemAblility((byte)iTEM_BOX_GROUP.i32GroupItemGrade[i]); iTEM.m_nOption[1] = (int)NrTSingleton <Item_Makerank_Manager> .Instance.GetItemAblility((byte)iTEM_BOX_GROUP.i32GroupItemGrade[i]); iTEM.m_nOption[2] = iTEM_BOX_GROUP.i32GroupItemGrade[i]; iTEM.m_nOption[3] = 1; iTEM.m_nOption[4] = iTEM_BOX_GROUP.i32GroupItemSkillUnique[i]; iTEM.m_nOption[5] = iTEM_BOX_GROUP.i32GroupItemSkillLevel[i]; iTEM.m_nOption[7] = iTEM_BOX_GROUP.i32GroupItemTradePoint[i]; iTEM.m_nOption[8] = iTEM_BOX_GROUP.i32GroupItemReducePoint[i]; iTEM.m_nOption[6] = iTEM_BOX_GROUP.i32GroupItemSkill2Unique[i]; iTEM.m_nOption[9] = iTEM_BOX_GROUP.i32GroupItemSkill2Level[i]; iTEM.m_nDurability = 100; newListItem.SetListItemData(1, iTEM, null, null, null); } else { iTEM.Set(this.m_cItem); iTEM.m_nItemUnique = num2; iTEM.m_nOption[2] = num4; newListItem.SetListItemData(1, iTEM, null, null, null); } } string text = string.Format("{0}{1}", NrTSingleton <CTextParser> .Instance.GetTextColor("1101"), NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(num2)); newListItem.SetListItemData(2, text, null, null, null); string arg = Protocol_Item.Money_Format((long)num3) + NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("442"); string text2 = string.Format("{0}{1}", NrTSingleton <CTextParser> .Instance.GetTextColor("1105"), arg); newListItem.SetListItemData(3, text2, null, null, null); newListItem.Data = i; this.m_nlbEquipList.Add(newListItem); } } } } else { num++; NewListItem newListItem2 = new NewListItem(this.m_nlbEquipList.ColumnNum, true, string.Empty); newListItem2.SetListItemData(0, string.Empty, "Win_T_ItemEmpty", null, null); if (num4 == 0) { UIBaseInfoLoader itemTexture2 = NrTSingleton <ItemManager> .Instance.GetItemTexture(num2); newListItem2.SetListItemData(1, itemTexture2, NrTSingleton <ItemManager> .Instance.GetBoxItemTemp(this.m_cItem.m_nItemUnique, i), null, null); } else { ITEM iTEM2 = new ITEM(); if (iTEM_BOX_GROUP != null) { iTEM2.m_nItemID = -9223372036854775808L; iTEM2.m_nItemUnique = iTEM_BOX_GROUP.i32GroupItemUnique[i]; iTEM2.m_nItemNum = iTEM_BOX_GROUP.i32GroupItemNum[i]; iTEM2.m_nOption[0] = (int)NrTSingleton <Item_Makerank_Manager> .Instance.GetItemAblility((byte)iTEM_BOX_GROUP.i32GroupItemGrade[i]); iTEM2.m_nOption[1] = (int)NrTSingleton <Item_Makerank_Manager> .Instance.GetItemAblility((byte)iTEM_BOX_GROUP.i32GroupItemGrade[i]); iTEM2.m_nOption[2] = iTEM_BOX_GROUP.i32GroupItemGrade[i]; iTEM2.m_nOption[3] = 1; iTEM2.m_nOption[4] = iTEM_BOX_GROUP.i32GroupItemSkillUnique[i]; iTEM2.m_nOption[5] = iTEM_BOX_GROUP.i32GroupItemSkillLevel[i]; iTEM2.m_nOption[7] = iTEM_BOX_GROUP.i32GroupItemTradePoint[i]; iTEM2.m_nOption[8] = iTEM_BOX_GROUP.i32GroupItemReducePoint[i]; iTEM2.m_nOption[6] = iTEM_BOX_GROUP.i32GroupItemSkill2Unique[i]; iTEM2.m_nOption[9] = iTEM_BOX_GROUP.i32GroupItemSkill2Level[i]; iTEM2.m_nDurability = 100; newListItem2.SetListItemData(1, iTEM2, null, null, null); } else { iTEM2.Set(this.m_cItem); iTEM2.m_nItemUnique = num2; iTEM2.m_nOption[2] = num4; newListItem2.SetListItemData(1, iTEM2, null, null, null); } } string text3 = string.Format("{0}{1}", NrTSingleton <CTextParser> .Instance.GetTextColor("1101"), NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(num2)); newListItem2.SetListItemData(2, text3, null, null, null); string arg2 = Protocol_Item.Money_Format((long)num3) + NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("442"); string text4 = string.Format("{0}{1}", NrTSingleton <CTextParser> .Instance.GetTextColor("1105"), arg2); newListItem2.SetListItemData(3, text4, null, null, null); newListItem2.Data = i; this.m_nlbEquipList.Add(newListItem2); } } } this.m_nlbEquipList.RepositionItems(); this.Show(); }
public override bool CheckCondition(long i64Param, ref long i64PramVal) { NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; return(nrCharUser != null && (long)nrCharUser.GetPersonInfo().GetLevel(0L) >= base.GetParamVal()); }
public void SetResult(GS_ENHANCEITEM_ACK ACK) { ITEM itemFromItemID = NkUserInventory.GetInstance().GetItemFromItemID(ACK.i64ItemID); if (itemFromItemID == null) { NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; if (nrCharUser == null) { return; } NkSoldierInfo soldierInfoFromSolID = nrCharUser.GetPersonInfo().GetSoldierInfoFromSolID(ACK.i64SolID); if (soldierInfoFromSolID != null) { itemFromItemID = soldierInfoFromSolID.GetEquipItemInfo().GetItemFromItemID(ACK.i64ItemID); } } if (itemFromItemID != null) { this.m_Item = itemFromItemID; this.m_itItem.SetItemTexture(this.m_Item); string name = NrTSingleton <ItemManager> .Instance.GetName(this.m_Item); this.m_lbItem.Text = ItemManager.RankTextColor(ACK.nCurRank) + name; this.m_dtItemBG.SetTexture("Win_I_Frame" + ItemManager.ChangeRankToString(ACK.nCurRank)); } byte i8ReduceSuccess = ACK.i8ReduceSuccess; if (i8ReduceSuccess != 1 && i8ReduceSuccess != 2) { this.m_bSuccess = false; this.m_lbInfo.Hide(true); } else { if (ACK.nItemType != 10) { ReduceMainDlg reduceMainDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.REDUCEMAIN_DLG) as ReduceMainDlg; if (reduceMainDlg != null) { reduceMainDlg.UpdateData(ACK.nItemPos, ACK.nItemType, ACK.i64ItemID); } } int num = ACK.i32ITEMUPGRADE[8] - ACK.i32ITEMOPTION[8]; if (0 > num) { num = 0; } NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strMessage, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("982"), "Count", num }); this.m_lbInfo.SetText(this.m_strMessage); this.m_bSuccess = true; } this.LoadSolComposeSuccessBundle(); }
public void SetItemSkillReinforceData(GS_ITEMSKILL_REINFORCE_ACK pPacket) { base.SetShowLayer(1, false); this.m_lbBefore.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2960")); this.m_lbAfter.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2961")); this.m_SelectItem = NkUserInventory.GetInstance().GetItemFromItemID(pPacket.i64BaseItemID); if (this.m_SelectItem == null) { ItemSkill_Dlg itemSkill_Dlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.ITEMSKILL_DLG) as ItemSkill_Dlg; if (itemSkill_Dlg == null) { this.CloseForm(null); return; } NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; if (nrCharUser == null) { return; } NkSoldierInfo soldierInfoFromSolID = nrCharUser.GetPersonInfo().GetSoldierInfoFromSolID(itemSkill_Dlg.GetItemSelectSolID()); if (soldierInfoFromSolID != null) { this.m_SelectItemSolID = itemSkill_Dlg.GetItemSelectSolID(); this.m_SelectItem = soldierInfoFromSolID.GetEquipItemInfo().GetItemFromItemID(pPacket.i64BaseItemID); } } if (this.m_SelectItem == null) { return; } string name = NrTSingleton <ItemManager> .Instance.GetName(this.m_SelectItem); this.m_itxItem.SetItemTexture(this.m_SelectItem); this.m_lbItemName.SetText(name); ItemSkill_Dlg itemSkill_Dlg2 = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.ITEMSKILL_DLG) as ItemSkill_Dlg; if (itemSkill_Dlg2 != null) { itemSkill_Dlg2.UpdateData(this.m_SelectItem.m_nItemPos, this.m_SelectItem.m_nPosType, 0L); itemSkill_Dlg2.CheckSelectItem(); } ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(this.m_SelectItem.m_nItemUnique); bool flag = false; if (itemInfo.IsItemATB(131072L) || itemInfo.IsItemATB(524288L)) { flag = true; } int skillUnique = this.m_SelectItem.m_nOption[6]; int num = this.m_SelectItem.m_nOption[9]; if (!flag) { skillUnique = this.m_SelectItem.m_nOption[4]; num = this.m_SelectItem.m_nOption[5]; } int num2 = 0; this.m_bItemSkillSuccess = false; string empty = string.Empty; BATTLESKILL_BASE battleSkillBase = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillBase(skillUnique); if (battleSkillBase != null) { if (pPacket.RessultType == 0) { num2 = num - 1; this.m_bItemSkillSuccess = true; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2963"), "targetname", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_strTextKey), "skilllevel", num }); } else if (pPacket.RessultType == -1) { num2 = num; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2964"), "targetname", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_strTextKey), "skilllevel", num }); } else if (pPacket.RessultType == -2) { num2 = num + 1; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2965"), "targetname", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_strTextKey), "skilllevel", num }); } else if (pPacket.RessultType == -3) { num2 = num; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2966"), "targetname", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_strTextKey), "skilllevel", num }); } else if (pPacket.RessultType == -4) { num2 = num; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2986"), "targetname", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_strTextKey), "skilllevel", num }); } this.m_lbAfter2.SetText(empty); empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2670"), "targetname", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_strTextKey), "skilllevel", num2 }); this.m_lbBefore2.SetText(empty); } base.SetShowLayer(2, true); this.LoadSolComposeSuccessBundle(); }
public void SetData(GS_ENHANCEITEM_ACK pPacket) { base.SetShowLayer(2, false); int skillUnique = pPacket.i32ITEMUPGRADE[4]; int num = pPacket.i32ITEMUPGRADE[5]; int num2 = pPacket.i32ITEMUPGRADE[2]; int num3 = pPacket.i32ITEMUPGRADE[2]; int skillUnique2 = pPacket.i32ITEMOPTION[4]; int num4 = pPacket.i32ITEMOPTION[5]; this.m_SelectItem = NkUserInventory.GetInstance().GetItem(pPacket.nItemType, pPacket.nItemPos); if (this.m_SelectItem == null) { ItemSkill_Dlg itemSkill_Dlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.ITEMSKILL_DLG) as ItemSkill_Dlg; if (itemSkill_Dlg == null) { this.CloseForm(null); return; } NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; if (nrCharUser == null) { return; } NkSoldierInfo soldierInfoFromSolID = nrCharUser.GetPersonInfo().GetSoldierInfoFromSolID(itemSkill_Dlg.GetItemSelectSolID()); if (soldierInfoFromSolID != null) { this.m_SelectItemSolID = itemSkill_Dlg.GetItemSelectSolID(); this.m_SelectItem = soldierInfoFromSolID.GetEquipItemInfo().GetItem(pPacket.nItemPos); } } this.m_txItemSlotBG.SetTexture("Win_I_Frame" + ItemManager.ChangeRankToString((int)this.m_SelectItem.GetRank())); string name = NrTSingleton <ItemManager> .Instance.GetName(this.m_SelectItem); this.m_itxItem.SetItemTexture(this.m_SelectItem); this.m_lbItemName.SetText(name); this.m_lbItemStat.SetText(string.Empty); this.m_lbItemStat_before.SetText(string.Empty); this.m_bItemSkillSuccess = (pPacket.nAddSkillSuccess == 1); string empty = string.Empty; BATTLESKILL_BASE battleSkillBase = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillBase(skillUnique); BATTLESKILL_BASE battleSkillBase2 = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillBase(skillUnique2); if (battleSkillBase != null && this.m_bItemSkillSuccess) { NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1218"), "targetname", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_strTextKey), "skilllevel", num }); this.m_lbItemStat.SetText(empty); if (pPacket.nItemType != 10) { ItemSkill_Dlg itemSkill_Dlg2 = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.ITEMSKILL_DLG) as ItemSkill_Dlg; if (itemSkill_Dlg2 != null) { itemSkill_Dlg2.UpdateData(pPacket.nItemPos, pPacket.nItemType, pPacket.i64ItemID); } } if (COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_TRADECOUNT_USE) == 1) { NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2127"), "count", pPacket.i32ITEMUPGRADE[7] }); this.m_lbTradeCount.SetText(empty); } else { this.m_lbTradeCount.SetText(string.Empty); } if (battleSkillBase2 != null) { this.m_btnUndo.Visible = true; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1218"), "targetname", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase2.m_strTextKey), "skilllevel", num4 }); this.m_lbItemStat_before.SetText(empty); if (COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_TRADECOUNT_USE) == 1) { NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2127"), "count", pPacket.i32ITEMOPTION[7] }); this.m_lbTradeCount_before.SetText(empty); } else { this.m_lbTradeCount_before.SetText(string.Empty); } } else { this.m_lbTradeCount_before.SetText(string.Empty); this.m_lbItemStat_before.SetText(string.Empty); this.m_btnUndo.Visible = false; } } else { this.m_lbTradeCount.SetText(string.Empty); this.m_btnUndo.Visible = false; } if (num2 != num3) { this.m_lbItemStat.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1219")); Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("269")); } this.LoadSolComposeSuccessBundle(); }
public void SetSeleteSol(long nSolID) { NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; NkSoldierInfo soldierInfoFromSolID = nrCharUser.GetPersonInfo().GetSoldierInfoFromSolID(nSolID); if (soldierInfoFromSolID == null) { base.SetShowLayer(1, true); base.SetShowLayer(2, false); } else { base.SetShowLayer(1, false); base.SetShowLayer(2, true); string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("567"); string empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { textFromInterface, "targetname", soldierInfoFromSolID.GetName(), "count", soldierInfoFromSolID.GetLevel().ToString() }); string text = string.Empty; NrCharKindInfo charKindInfo = soldierInfoFromSolID.GetCharKindInfo(); if (charKindInfo != null) { if (charKindInfo.GetCHARKIND_ATTACKINFO().ATTACKTYPE == soldierInfoFromSolID.GetAttackInfo().ATTACKTYPE) { text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(charKindInfo.GetCHARKIND_INFO().SoldierSpec1); } else { text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(charKindInfo.GetCHARKIND_INFO().SoldierSpec2); } } string textFromInterface2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("992"); string empty2 = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty2, new object[] { textFromInterface2, "type", text }); int num = 0; string text2 = string.Empty; List <BATTLESKILL_TRAINING> battleSkillTrainingGroup = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillTrainingGroup(soldierInfoFromSolID); if (battleSkillTrainingGroup != null) { foreach (BATTLESKILL_TRAINING current in battleSkillTrainingGroup) { int nSkillUnique = current.m_nSkillUnique; BATTLESKILL_BASE battleSkillBase = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillBase(nSkillUnique); if (battleSkillBase != null) { if (!soldierInfoFromSolID.IsCostumeEquip() || this.IsCostumeSkill(soldierInfoFromSolID, nSkillUnique)) { num = soldierInfoFromSolID.GetBattleSkillLevel(current.m_nSkillUnique); text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_strTextKey); break; } } } } string textFromInterface3 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1292"); string empty3 = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty3, new object[] { textFromInterface3, "skillname", text2, "skilllevel", num.ToString() }); this.m_lCharName.Text = empty; this.m_lCharType.Text = empty2; this.m_lSkillInfo.Text = empty3; } this.GuildBossBattleUserName(); }
public void SetData(GS_ENHANCEITEM_ACK pPacket) { NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_Money = pPacket.LeftMoney; ReforgeMainDlg reforgeMainDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.REFORGEMAIN_DLG) as ReforgeMainDlg; ITEM item = NkUserInventory.GetInstance().GetItem(pPacket.nItemType, pPacket.nItemPos); if (item == null) { if (reforgeMainDlg == null) { return; } NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; if (nrCharUser == null) { return; } NkSoldierInfo soldierInfoFromSolID = nrCharUser.GetPersonInfo().GetSoldierInfoFromSolID(reforgeMainDlg.GetSolID()); if (soldierInfoFromSolID != null) { item = soldierInfoFromSolID.GetEquipItemInfo().GetItem(pPacket.nItemPos); } } this.m_Item = item; this.m_txItemAfter.SetItemTexture(item); string name = NrTSingleton <ItemManager> .Instance.GetName(item); this.m_lbItemAfterName.Text = ItemManager.RankTextColor(pPacket.nCurRank) + name; this.m_lbItemGrade.Text = ItemManager.RankTextColor(pPacket.nCurRank) + ItemManager.RankText(pPacket.nCurRank); this.m_txItemBG.SetTexture("Win_I_Frame" + ItemManager.ChangeRankToString(pPacket.nCurRank)); this.GetStatString(item.m_nItemUnique, pPacket); this.LoadSolComposeSuccessBundle(); if (pPacket.i8ItemEnchantSuccess == 1 && pPacket.nLastRank < pPacket.nCurRank) { TsAudioManager.Container.RequestAudioClip("UI_SFX", "EQUIPMENT-UP", "SUCCESS", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay)); this.m_bItemUpgradeSuccess = true; this.FacebookButtonSet(false); if (pPacket.nItemType != 10) { ReforgeSelectDlg reforgeSelectDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.REFORGESELECT_DLG) as ReforgeSelectDlg; if (reforgeSelectDlg != null) { reforgeSelectDlg.UpdateData(pPacket.nItemPos, pPacket.nItemType, pPacket.i64ItemID); } } } else { TsAudioManager.Container.RequestAudioClip("UI_SFX", "EQUIPMENT-UP", "FAIL", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay)); this.m_bItemUpgradeSuccess = false; this.FacebookButtonSet(false); } TsLog.Log("Packet SolID ={0}", new object[] { pPacket.i64SolID }); if (reforgeMainDlg != null) { reforgeMainDlg.bSendRequest = false; } }
public void SetEvolutionResultData(GS_ITEMEVOLUTION_ACK pPacket) { this.m_SelectItem = NkUserInventory.GetInstance().GetItemFromItemID(pPacket.i64BaseItemID); if (this.m_SelectItem == null) { ItemEvolution_Dlg itemEvolution_Dlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.ITEMEVOLUTION_DLG) as ItemEvolution_Dlg; if (itemEvolution_Dlg == null) { this.CloseForm(null); return; } NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; if (nrCharUser == null) { return; } NkSoldierInfo soldierInfoFromSolID = nrCharUser.GetPersonInfo().GetSoldierInfoFromSolID(itemEvolution_Dlg.GetItemSelectSolID()); if (soldierInfoFromSolID != null) { this.m_SelectItem = soldierInfoFromSolID.GetEquipItemInfo().GetItemFromItemID(pPacket.i64BaseItemID); } } if (this.m_SelectItem == null) { return; } this.m_IT_ItemIcon.SetItemTexture(this.m_SelectItem); string empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2931"), "grade", NrTSingleton <ItemManager> .Instance.GetItemInfo(this.m_SelectItem.m_nItemUnique).m_nStarGrade, "target", NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(this.m_SelectItem.m_nItemUnique) }); this.m_LB_ItemRank.SetText(empty); empty = string.Empty; int num = this.m_SelectItem.m_nOption[5]; int skillUnique = this.m_SelectItem.m_nOption[4]; BATTLESKILL_BASE battleSkillBase = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillBase(skillUnique); if (battleSkillBase == null) { return; } NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1292"), "skillname", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_strTextKey), "skilllevel", num }); this.m_LB_ItemSkillLv.SetText(empty); this.LoadSolComposeSuccessBundle(); this.m_Btn_Ok.SetEnabled(true); }
public void LevelUpAlarmUpdate() { if (!CommonTasks.IsEndOfPrework) { return; } if (NrTSingleton <FormsManager> .Instance.GetForm(G_ID.EXPLORATION_PLAY_DLG) != null) { return; } if (NrTSingleton <FormsManager> .Instance.GetForm(G_ID.EXPLORATION_REWARD_DLG) != null) { return; } if (NrTSingleton <FormsManager> .Instance.GetForm(G_ID.EXPLORATION_DLG) != null) { return; } if (NrTSingleton <FormsManager> .Instance.GetForm(G_ID.SOLCOMPOSE_GRADE_UP_SUCCESS_DLG) != null) { return; } if (NrTSingleton <FormsManager> .Instance.GetForm(G_ID.SOLCOMPOSE_SUCCESS_DLG) != null) { return; } if (this.m_SolIDList.Count == 0 && this.m_lstEventType.Count == 0) { return; } if (!NrTSingleton <NkClientLogic> .Instance.IsEffectEnable()) { return; } NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; if (nrCharUser == null) { return; } if (this.startLevel == 0) { this.startLevel = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetLevel(); } if (this.m_SolIDList.Count > 0) { if (NrTSingleton <FormsManager> .Instance.IsShow(G_ID.MAIN_UI_LEVELUP_ALARM_MONARCH) || NrTSingleton <FormsManager> .Instance.IsShow(G_ID.MAIN_UI_LEVELUP_ALARM_SOLDIER)) { return; } this.m_SolIDList.Sort(new Comparison <long>(AlarmManager.CompareLevel)); long num = this.m_SolIDList[0]; NrPersonInfoBase personInfo = nrCharUser.GetPersonInfo(); if (personInfo == null) { return; } NkSoldierInfo soldierInfoFromSolID = personInfo.GetSoldierInfoFromSolID(num); if (soldierInfoFromSolID == null) { return; } if (NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(soldierInfoFromSolID.GetCharKind()) == null) { return; } this.m_kSolInfo = soldierInfoFromSolID; if (num == nrCharUser.GetUserSoldierInfo().GetSolID()) { this.ShowLevelUpAlarm1(); this.m_SolIDList.RemoveAt(0); this.ShowLevelUpAlarm2(); } else { this.ShowLevelUpSoldier(); this.m_SolIDList.RemoveAt(0); } } if (this.m_SolIDList.Count == 0 && this.m_lstEventType.Count > 0) { if (NrTSingleton <FormsManager> .Instance.IsShow(G_ID.MAIN_UI_LEVELUP_ALARM_MONARCH) || NrTSingleton <FormsManager> .Instance.IsShow(G_ID.MAIN_UI_LEVELUP_ALARM_SOLDIER)) { return; } this.m_nEventType = this.m_lstEventType[0]; this.m_nEventTitleText = this.m_lstEventTitleText[0]; this.m_nEventExplainText = this.m_lstEventExplainText[0]; this.ShowEventAlarm(); this.m_lstEventType.RemoveAt(0); this.m_lstEventTitleText.RemoveAt(0); this.m_lstEventExplainText.RemoveAt(0); } }