private void SolOtherInfo(NkListSolInfo solInfo) { if (solInfo.ShowCombat) { UIBaseInfoLoader uIBaseInfoLoader = NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary("Win_I_BattlePower"); if (uIBaseInfoLoader != null) { this.downText.Visible = true; this.downText.SetTexture(uIBaseInfoLoader); this.downText.SetSize(this.width, uIBaseInfoLoader.UVs.height); this.downText.gameObject.transform.localPosition = new Vector3(0f, 0f, -0.02f); this.downText.SetAnchor(SpriteText.Anchor_Pos.Upper_Left); this.downText.SetAlignment(SpriteText.Alignment_Type.Left); this.downText.spriteText.gameObject.transform.localPosition = new Vector3(24f, -2f, -0.02f); this.downText.SetCharacterSize(20f); this.downText.Text = solInfo.FightPower.ToString(); } } else if (solInfo.ShowLevel) { this.downText.Visible = true; this.downText.SetAnchor(SpriteText.Anchor_Pos.Upper_Left); this.downText.SetAlignment(SpriteText.Alignment_Type.Left); this.downText.SetSize(this.width, this.fontSize); this.downText.gameObject.transform.localPosition = new Vector3(0f, 0f, -0.02f); this.downText.spriteText.gameObject.transform.localPosition = new Vector3(2f, -2f, -0.02f); this.downText.Text = NrTSingleton <UIDataManager> .Instance.GetString("Lv ", solInfo.SolLevel.ToString()); } }
public void SetEcoMonDetailinfo(ECO eco_info) { this.InitOccSolInfo(); string empty = string.Empty; if (this.m_eMode == eExpeditionSearchDetailInfo_Mode.eEXPEDITION_DETAILDLG_SEARCH) { if (eco_info != null) { for (int i = 0; i < 6; i++) { if ((eco_info.nBattlePos[i] >= 0 || eco_info.nBattlePos[i] < 9) && NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindByCode(eco_info.szCharCode[i]) > 0) { NkListSolInfo nkListSolInfo = new NkListSolInfo(); nkListSolInfo.SolLevel = this.m_expeditionSearch_info.i16MonLevel; nkListSolInfo.SolCharKind = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindByCode(eco_info.szCharCode[i]); nkListSolInfo.ShowLevel = true; nkListSolInfo.ShowCombat = false; this.m_itOccSol[eco_info.nBattlePos[i]].SetSolImageTexure(eCharImageType.SMALL, nkListSolInfo, false); } } NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1639"), "count", this.m_expeditionSearch_info.i16MonLevel.ToString(), "targetname", NrTSingleton <NrCharKindInfoManager> .Instance.GetName(NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindByCode(eco_info.szCharCode[0])) }); } } else if (eco_info != null) { for (int j = 0; j < 6; j++) { if ((eco_info.nBattlePos[j] >= 0 || eco_info.nBattlePos[j] < 9) && NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindByCode(eco_info.szCharCode[j]) > 0) { NkListSolInfo nkListSolInfo2 = new NkListSolInfo(); nkListSolInfo2.SolLevel = this.m_expeditiondetailinfo.i16ExpeditionMonLevel; nkListSolInfo2.SolCharKind = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindByCode(eco_info.szCharCode[j]); nkListSolInfo2.ShowLevel = true; nkListSolInfo2.ShowCombat = false; this.m_itOccSol[eco_info.nBattlePos[j]].SetSolImageTexure(eCharImageType.SMALL, nkListSolInfo2, false); } } NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1639"), "count", this.m_expeditiondetailinfo.i16ExpeditionMonLevel.ToString(), "targetname", NrTSingleton <NrCharKindInfoManager> .Instance.GetName(NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindByCode(eco_info.szCharCode[0])) }); } this.m_laOccSelectMemberName.SetText(empty); }
public void SetSolImageTexure(eCharImageType type, NkListSolInfo solInfo, bool bShowEventMark) { if (solInfo == null) { return; } this.SetSolImageTexure(type, solInfo.SolCharKind, solInfo.SolGrade, solInfo.SolInjuryStatus, solInfo); this.SolOtherInfo(solInfo); this.SolEventMark(bShowEventMark); }
public void SetListItemData(int index, NkListSolInfo solInfo, object data = null, EZValueChangedDelegate eventDelegate = null, EZValueChangedDelegate downDelegate = null) { if (0 <= index && this.m_nMaxCoulmnNum > index) { this.m_itemDataList[index].realData = solInfo; this.m_itemDataList[index].data = data; this.m_itemDataList[index].eventDelegate = eventDelegate; this.m_itemDataList[index].downDelegate = downDelegate; } }
public bool SetColumnGUIContent(int index, NkListSolInfo solInfo, bool a_bIsTooltip) { if (ListItem.MAX_COLUMN_NUM <= index) { return(false); } this.columnKey[index] = solInfo; this.m_bIsTooltip[index] = a_bIsTooltip; this.type[index] = ListItem.TYPE.SOLDIER; return(true); }
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 SetLegendReincarnateListBox(ref NewListItem item, int i, int i32CharKind, byte bCharRank, bool bLastElement) { NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(i32CharKind); if (charKindInfo == null) { TsLog.LogOnlyEditor("!!!!!!!!!! SolGuild - Element CharKind " + i32CharKind + " Error"); return; } NkListSolInfo nkListSolInfo = new NkListSolInfo(); nkListSolInfo.SolCharKind = i32CharKind; nkListSolInfo.SolGrade = (int)(bCharRank - 1); if (bLastElement) { item.SetListItemData(0, false); item.SetListItemData(1, true); } else { item.SetListItemData(0, true); item.SetListItemData(1, false); } item.SetListItemData(3, nkListSolInfo, null, null, null); item.SetListItemData(4, charKindInfo.GetName(), null, null, null); string elementSolMsg = base.GetElementSolMsg(this.m_eElement_Msg[i]); item.SetListItemData(5, elementSolMsg, null, null, null); item.SetListItemData(6, false); if (bLastElement) { item.SetListItemData(7, false); } else { item.SetListItemData(7, nkListSolInfo, null, null, null); } item.SetListItemData(8, false); item.SetListItemData(9, false); if (bLastElement) { item.SetListItemData(10, true); } else { item.SetListItemData(10, false); } item.SetListItemData(10, string.Empty, 0, new EZValueChangedDelegate(this.OnElementClick), null); item.SetListItemData(11, false); }
public void SetSolInfo(NkSoldierInfo SelectSol, long lSellCost, long lSellDirectCoust, AuctionDefine.ePAYTYPE ePayType) { this.m_SelectSoldierInfo = SelectSol; this.m_lSellCost = lSellCost; this.m_lSellDirectCost = lSellDirectCoust; this.m_ePayType = ePayType; NkListSolInfo listSolInfo = this.m_SelectSoldierInfo.GetListSolInfo(true); listSolInfo.ShowLevel = true; this.m_itItem.SetSolImageTexure(eCharImageType.SMALL, listSolInfo, false); this.m_lbItemName.SetText(this.m_SelectSoldierInfo.GetName()); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1026"), "count", this.m_SelectSoldierInfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_TRADE_COUNT) }); this.m_lbTradeCount.SetText(this.m_strText); this.ShowPayInfo(); }
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); }
private void SetPortrait(ref NewListItem item, NkSoldierInfo solInfo) { if (item == null || solInfo == null) { return; } Texture2D portraitLeaderSol = this.GetPortraitLeaderSol(solInfo.GetCharKind()); if (portraitLeaderSol != null) { item.SetListItemData(1, portraitLeaderSol, solInfo, solInfo.GetLevel(), new EZValueChangedDelegate(this._myCharListSetter._callbackProcessor.OnClickListUpBox), null); return; } NkListSolInfo nkListSolInfo = new NkListSolInfo(); nkListSolInfo.SolCharKind = solInfo.GetCharKind(); nkListSolInfo.SolGrade = (int)solInfo.GetGrade(); nkListSolInfo.SolLevel = solInfo.GetLevel(); nkListSolInfo.FightPower = solInfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_FIGHTINGPOWER); nkListSolInfo.SolCostumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath((int)solInfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_COSTUME)); if (NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(solInfo.GetCharKind()) == null) { return; } if (50 <= solInfo.GetLevel()) { nkListSolInfo.ShowCombat = true; nkListSolInfo.ShowLevel = false; } else { nkListSolInfo.ShowCombat = false; nkListSolInfo.ShowLevel = true; } item.SetListItemData(1, nkListSolInfo, solInfo, new EZValueChangedDelegate(this._myCharListSetter._callbackProcessor.OnClickListUpBox), null); }
public UIListItemContainer CreateContainer(ListItem item) { GameObject gameObject = new GameObject("ListItem"); UIListItemContainer uIListItemContainer = gameObject.AddComponent <UIListItemContainer>(); uIListItemContainer.Data = item.Key; uIListItemContainer.isDraggable = true; uIListItemContainer.AutoFindOuterEdges = false; string backButtonName = UIScrollList.backButtonName; UIButton uIButton; if (this.orientation == UIScrollList.ORIENTATION.VERTICAL) { if (string.Empty != this.selectStyle) { uIButton = UICreateControl.Button(backButtonName, this.selectStyle, this.viewableArea.x, this.lineHeight); } else { uIButton = UICreateControl.Button(backButtonName, "Com_B_ListBtnH", this.viewableArea.x, this.lineHeight); } } else if (this.orientation == UIScrollList.ORIENTATION.HORIZONTAL) { if (string.Empty != this.selectStyle) { uIButton = UICreateControl.Button(backButtonName, this.selectStyle, this.lineHeight, this.viewableArea.y); } else { uIButton = UICreateControl.Button(backButtonName, "Com_B_ListBtnH", this.lineHeight, this.viewableArea.y); } } else if (string.Empty != this.selectStyle) { uIButton = UICreateControl.Button(backButtonName, this.selectStyle, this.viewableArea.x, this.lineHeight); } else { uIButton = UICreateControl.Button(backButtonName, "Com_B_ListBtnH", this.viewableArea.x, this.lineHeight); } uIButton.EffectAni = false; uIButton.IsListButton = true; uIButton.allwaysPlayAnim = true; uIListItemContainer.MakeChild(uIButton.gameObject); uIButton.gameObject.transform.localPosition = Vector3.zero; float num = this._offsetX; float num2 = 0f; for (int i = 0; i < this.currentColumnNum; i++) { string name = this.columnTitle; num2 -= 0.2f; if (item.GetType(i) == ListItem.TYPE.IMAGE) { GameObject gameObject2 = new GameObject(name); DrawTexture drawTexture = gameObject2.AddComponent <DrawTexture>(); drawTexture.gameObject.layer = GUICamera.UILayer; drawTexture.Data = item.ColumnKey[i]; if (this.useColumnRect) { if (item.ColumnKey[i] is float) { drawTexture.width = (float)item.ColumnKey[i]; drawTexture.height = this.columnRect[i].height; } else { drawTexture.width = this.columnRect[i].width; drawTexture.height = this.columnRect[i].height; } } else { drawTexture.width = (float)this.columnWidth[i]; drawTexture.height = this.lineHeight; } ITEM iTEM = item.ColumnKey[i] as ITEM; if (iTEM != null) { if (iTEM.m_nItemUnique == 70000) { NrTSingleton <FormsManager> .Instance.AttachEffectKey("FX_UI_HEARTS_STONE", drawTexture, new Vector2(drawTexture.width, drawTexture.height)); } int num3 = iTEM.m_nOption[2]; if (string.Compare(MsgHandler.HandleReturn <string>("RankStateString", new object[] { num3 }), "best") == 0) { NrTSingleton <FormsManager> .Instance.AttachEffectKey("FX_WEAPON_GOOD", drawTexture, new Vector2(drawTexture.width, drawTexture.height)); } } if (item.ColumnKey[i] is ITEM) { drawTexture.c_cItemTooltip = (ITEM)item.ColumnKey[i]; } else if (item.ColumnKey[i] is int) { drawTexture.nItemUniqueTooltip = (int)item.ColumnKey[i]; } else if (item.ColumnKey[i] is string) { drawTexture.ToolTip = (string)item.ColumnKey[i]; } if (item.ColumnKey2[i] is ITEM) { drawTexture.c_cItemSecondTooltip = (ITEM)item.ColumnKey2[i]; } drawTexture.autoResize = false; drawTexture.SetAnchor(SpriteRoot.ANCHOR_METHOD.UPPER_LEFT); UIBaseInfoLoader columnImageInfo = item.GetColumnImageInfo(i); if (columnImageInfo != null && string.Empty != columnImageInfo.Material) { drawTexture.BaseInfoLoderImage = columnImageInfo; } else { drawTexture.SetTextureKey(item.GetColumnImageStr(i)); } float num4 = item.Get_Alpha(i); if (num4 > 0f) { drawTexture.SetAlpha(num4); } uIListItemContainer.MakeChild(drawTexture.gameObject); if (this.useColumnRect) { drawTexture.Setup(drawTexture.width, drawTexture.height); drawTexture.gameObject.transform.localPosition = new Vector3(this.columnRect[i].x, -this.columnRect[i].y, num2); BoxCollider component = drawTexture.gameObject.GetComponent <BoxCollider>(); if (null != component) { component.size = new Vector3(this.columnRect[i].width, this.columnRect[i].height, 0f); component.center = new Vector3(this.columnRect[i].x / 2f, -this.columnRect[i].y / 2f, 0f); } } else { drawTexture.Setup((float)this.columnWidth[i], this.lineHeight); drawTexture.gameObject.transform.localPosition = new Vector3(num, 0f, -0.02f); num += (float)this.columnWidth[i]; BoxCollider component2 = drawTexture.gameObject.GetComponent <BoxCollider>(); if (null != component2) { component2.size = new Vector3((float)this.columnWidth[i], this.lineHeight, 0f); component2.center = new Vector3((float)(this.columnWidth[i] / 2), -this.lineHeight / 2f, num2); } } drawTexture.AddValueChangedDelegate(item.GetColumnDelegate(i)); } else if (item.GetType(i) == ListItem.TYPE.TEXT) { GameObject gameObject3 = new GameObject(name); Label label = gameObject3.AddComponent <Label>(); label.customCollider = true; label.gameObject.layer = GUICamera.UILayer; label.SetAnchor(SpriteRoot.ANCHOR_METHOD.UPPER_LEFT); label.Data = item.ColumnKey[i]; float x; float y; if (this.useColumnRect) { label.width = this.columnRect[i].width; label.height = this.columnRect[i].height; x = this.columnRect[i].x; y = -1f * this.columnRect[i].y; } else { x = num; y = 0f; label.width = (float)this.columnWidth[i]; label.height = this.lineHeight; num += (float)this.columnWidth[i]; } label.CreateSpriteText(); label.MaxWidth = label.width; if (this.bUseMultiLine[i]) { label.MultiLine = true; } else { label.MultiLine = false; if (this.bUseSpotLabel) { label.SPOT = true; } else { label.SPOT = this.columSpot[i]; } } label.Text = item.GetColumnStr(i); label.SetFontEffect(this.FontEffect); label.BackGroundHide(true); if (this.m_faFontSize[i] > 0f) { label.SetCharacterSize(this.m_faFontSize[i]); } if (label.spriteText) { if (this.columnTextAnchor[i] == SpriteText.Anchor_Pos.Upper_Left || this.columnTextAnchor[i] == SpriteText.Anchor_Pos.Middle_Left || this.columnTextAnchor[i] == SpriteText.Anchor_Pos.Lower_Left) { label.SetAnchor(this.columnTextAnchor[i]); label.SetAlignment(SpriteText.Alignment_Type.Left); } else if (this.columnTextAnchor[i] == SpriteText.Anchor_Pos.Upper_Center || this.columnTextAnchor[i] == SpriteText.Anchor_Pos.Middle_Center || this.columnTextAnchor[i] == SpriteText.Anchor_Pos.Lower_Center) { label.SetAnchor(this.columnTextAnchor[i]); label.SetAlignment(SpriteText.Alignment_Type.Center); } else if (this.columnTextAnchor[i] == SpriteText.Anchor_Pos.Upper_Right || this.columnTextAnchor[i] == SpriteText.Anchor_Pos.Middle_Right || this.columnTextAnchor[i] == SpriteText.Anchor_Pos.Lower_Right) { label.SetAnchor(this.columnTextAnchor[i]); label.SetAlignment(SpriteText.Alignment_Type.Right); } } uIListItemContainer.MakeChild(label.gameObject); label.gameObject.transform.localPosition = new Vector3(x, y, num2); } else if (item.GetType(i) == ListItem.TYPE.BUTTON) { UIBaseInfoLoader uIBaseInfoLoader = NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary(item.GetColumnImageStr(i)); if (uIBaseInfoLoader != null) { GameObject gameObject4 = new GameObject(name); UIButton uIButton2 = gameObject4.AddComponent <UIButton>(); uIButton2.CreateSpriteText(); uIButton2.gameObject.layer = GUICamera.UILayer; uIButton2.SetAnchor(SpriteRoot.ANCHOR_METHOD.UPPER_LEFT); uIButton2.SetAnchor(SpriteText.Anchor_Pos.Middle_Center); uIButton2.SetAlignment(SpriteText.Alignment_Type.Center); uIButton2.AddValueChangedDelegate(item.GetColumnDelegate(i)); uIButton2.width = this.columnRect[i].width; uIButton2.height = this.columnRect[i].height; uIButton2.Data = item.ColumnKey[i]; uIButton2.SetSpriteTile(uIBaseInfoLoader.Tile, uIBaseInfoLoader.UVs.width / (float)uIBaseInfoLoader.ButtonCount, uIBaseInfoLoader.UVs.height); Material material = CResources.Load(uIBaseInfoLoader.Material) as Material; uIButton2.Setup(this.columnRect[i].width, this.columnRect[i].height, material); float pixelToUVsWidth = UIBaseFileManager.GetPixelToUVsWidth(material, uIBaseInfoLoader.UVs.width / (float)uIBaseInfoLoader.ButtonCount); Rect rect = new Rect(UIBaseFileManager.GetPixelToUVsWidth(material, uIBaseInfoLoader.UVs.x) - pixelToUVsWidth, 1f - UIBaseFileManager.GetPixelToUVsHeight(material, uIBaseInfoLoader.UVs.y + uIBaseInfoLoader.UVs.height), pixelToUVsWidth, UIBaseFileManager.GetPixelToUVsHeight(material, uIBaseInfoLoader.UVs.height)); Rect uvs = new Rect(rect); uvs.x += pixelToUVsWidth; if (TsPlatform.IsMobile) { if (uIBaseInfoLoader.ButtonCount == 4) { for (int j = 0; j < 4; j++) { uIButton2.States[j].spriteFrames = new CSpriteFrame[1]; uIButton2.States[j].spriteFrames[0] = new CSpriteFrame(); rect.x += pixelToUVsWidth; uIButton2.States[j].spriteFrames[0].uvs = rect; uIButton2.animations[j].SetAnim(uIButton2.States[j], j); } } else if (uIBaseInfoLoader.ButtonCount == 3) { rect.x += pixelToUVsWidth; uIButton2.States[0].spriteFrames = new CSpriteFrame[1]; uIButton2.States[0].spriteFrames[0] = new CSpriteFrame(); uIButton2.States[0].spriteFrames[0].uvs = uvs; uIButton2.animations[0] = new UVAnimation(); uIButton2.animations[0].SetAnim(uIButton2.States[0], 0); uIButton2.States[1].spriteFrames = new CSpriteFrame[1]; uIButton2.States[1].spriteFrames[0] = new CSpriteFrame(); uIButton2.States[1].spriteFrames[0].uvs = uvs; uIButton2.animations[1].SetAnim(uIButton2.States[1], 1); rect.x += pixelToUVsWidth; uIButton2.States[2].spriteFrames = new CSpriteFrame[1]; uIButton2.States[2].spriteFrames[0] = new CSpriteFrame(); uIButton2.States[2].spriteFrames[0].uvs = rect; uIButton2.animations[2].SetAnim(uIButton2.States[2], 2); rect.x += pixelToUVsWidth; uIButton2.States[3].spriteFrames = new CSpriteFrame[1]; uIButton2.States[3].spriteFrames[0] = new CSpriteFrame(); uIButton2.States[3].spriteFrames[0].uvs = rect; uIButton2.animations[3].SetAnim(uIButton2.States[3], 3); } else if (uIBaseInfoLoader.ButtonCount == 2) { rect.x += pixelToUVsWidth; uIButton2.States[0].spriteFrames = new CSpriteFrame[1]; uIButton2.States[0].spriteFrames[0] = new CSpriteFrame(); uIButton2.States[0].spriteFrames[0].uvs = uvs; uIButton2.animations[0].SetAnim(uIButton2.States[0], 0); rect.x += pixelToUVsWidth; uIButton2.States[1].spriteFrames = new CSpriteFrame[1]; uIButton2.States[1].spriteFrames[0] = new CSpriteFrame(); uIButton2.States[1].spriteFrames[0].uvs = uvs; uIButton2.animations[1].SetAnim(uIButton2.States[1], 1); uIButton2.States[2].spriteFrames = new CSpriteFrame[1]; uIButton2.States[2].spriteFrames[0] = new CSpriteFrame(); uIButton2.States[2].spriteFrames[0].uvs = rect; uIButton2.animations[2].SetAnim(uIButton2.States[2], 2); uIButton2.States[3].spriteFrames = new CSpriteFrame[1]; uIButton2.States[3].spriteFrames[0] = new CSpriteFrame(); uIButton2.States[3].spriteFrames[0].uvs = uvs; uIButton2.animations[3].SetAnim(uIButton2.States[3], 3); } else { for (int k = 0; k < 4; k++) { uIButton2.States[k].spriteFrames = new CSpriteFrame[1]; uIButton2.States[k].spriteFrames[0] = new CSpriteFrame(); rect.x += pixelToUVsWidth; if ((int)uIBaseInfoLoader.ButtonCount <= k) { uIButton2.States[k].spriteFrames[0].uvs = uvs; } else { uIButton2.States[k].spriteFrames[0].uvs = rect; } uIButton2.animations[k].SetAnim(uIButton2.States[k], k); } } } else { for (int l = 0; l < 4; l++) { uIButton2.States[l].spriteFrames = new CSpriteFrame[1]; uIButton2.States[l].spriteFrames[0] = new CSpriteFrame(); rect.x += pixelToUVsWidth; if ((int)uIBaseInfoLoader.ButtonCount <= l) { uIButton2.States[l].spriteFrames[0].uvs = uvs; } else { uIButton2.States[l].spriteFrames[0].uvs = rect; } uIButton2.animations[l].SetAnim(uIButton2.States[l], l); } } uIButton2.autoResize = false; if (string.Empty != item.GetColumnStr(i)) { uIButton2.Text = item.GetColumnStr(i); if (this.m_faFontSize[i] > 0f) { uIButton2.SetCharacterSize(this.m_faFontSize[i]); } } else { uIButton2.DeleteSpriteText(); } uIButton2.PlayAnim(0, 0); if (item.ColumnKey[i] is bool && !(bool)item.ColumnKey[i]) { uIButton2.controlIsEnabled = false; } uIListItemContainer.MakeChild(uIButton2.gameObject); uIButton2.gameObject.transform.localPosition = new Vector3(this.columnRect[i].x, -this.columnRect[i].y, num2); } } else if (item.GetType(i) == ListItem.TYPE.ITEM) { GameObject gameObject5 = new GameObject(name); ItemTexture itemTexture = gameObject5.AddComponent <ItemTexture>(); itemTexture.Layer = GUICamera.UILayer; ITEM iTEM2 = item.ColumnKey[i] as ITEM; if (this.useColumnRect) { itemTexture.width = this.columnRect[i].width; itemTexture.height = this.columnRect[i].height; } else { itemTexture.width = (float)this.columnWidth[i]; itemTexture.height = this.lineHeight; } if (iTEM2.m_nItemUnique == 70000) { this.SetSlotEffect("FX_UI_HEARTS_STONE", itemTexture, new Vector2(itemTexture.width, itemTexture.height)); } int num5 = iTEM2.m_nOption[2]; if (string.Compare(MsgHandler.HandleReturn <string>("RankStateString", new object[] { num5 }), "best") == 0) { this.SetSlotEffect("FX_WEAPON_GOOD", itemTexture, new Vector2(itemTexture.width, itemTexture.height)); if (item.GetGameObjectDelegate() != null) { itemTexture.AddGameObjectDelegate(item.GetGameObjectDelegate()); } } itemTexture.autoResize = false; itemTexture.SetAnchor(SpriteRoot.ANCHOR_METHOD.UPPER_LEFT); float num6 = item.Get_Alpha(i); if (num6 > 0f) { itemTexture.SetAlpha(num6); } uIListItemContainer.MakeChild(itemTexture.gameObject); if (this.useColumnRect) { itemTexture.Setup(this.columnRect[i].width, this.columnRect[i].height); itemTexture.gameObject.transform.localPosition = new Vector3(this.columnRect[i].x, -this.columnRect[i].y, num2); BoxCollider boxCollider = (BoxCollider)itemTexture.gameObject.AddComponent(typeof(BoxCollider)); if (boxCollider != null) { boxCollider.size = new Vector3(this.columnRect[i].width, this.columnRect[i].height, 0f); boxCollider.center = new Vector3(this.columnRect[i].x / 2f, -this.columnRect[i].y / 2f, 0f); } } else { itemTexture.Setup((float)this.columnWidth[i], this.lineHeight); itemTexture.gameObject.transform.localPosition = new Vector3(num, 0f, -0.02f); num += (float)this.columnWidth[i]; BoxCollider boxCollider2 = (BoxCollider)itemTexture.gameObject.AddComponent(typeof(BoxCollider)); boxCollider2.size = new Vector3((float)this.columnWidth[i], this.lineHeight, 0f); boxCollider2.center = new Vector3((float)(this.columnWidth[i] / 2), -this.lineHeight / 2f, num2); } itemTexture.Start(); itemTexture.SetItemTexture(item.ColumnKey[i] as ITEM, false, true, 1f); if (item.p_bIsTooltip[i] && item.ColumnKey[i] is ITEM) { itemTexture.c_cItemTooltip = (ITEM)item.ColumnKey[i]; } if (item.p_bIsSecondTooltip[i] && item.ColumnKey2[i] is ITEM) { itemTexture.c_cItemSecondTooltip = (ITEM)item.ColumnKey2[i]; } itemTexture.AddValueChangedDelegate(item.GetColumnDelegate(i)); } else if (item.GetType(i) == ListItem.TYPE.SOLDIER) { GameObject gameObject6 = new GameObject(name); ItemTexture itemTexture2 = gameObject6.AddComponent <ItemTexture>(); itemTexture2.Layer = GUICamera.UILayer; if (this.useColumnRect) { itemTexture2.width = this.columnRect[i].width; itemTexture2.height = this.columnRect[i].height; } else { itemTexture2.width = (float)this.columnWidth[i]; itemTexture2.height = this.lineHeight; } itemTexture2.autoResize = false; itemTexture2.SetAnchor(SpriteRoot.ANCHOR_METHOD.UPPER_LEFT); float num7 = item.Get_Alpha(i); if (num7 > 0f) { itemTexture2.SetAlpha(num7); } uIListItemContainer.MakeChild(itemTexture2.gameObject); if (this.useColumnRect) { itemTexture2.Setup(this.columnRect[i].width, this.columnRect[i].height); itemTexture2.gameObject.transform.localPosition = new Vector3(this.columnRect[i].x, -this.columnRect[i].y, num2); BoxCollider boxCollider3 = (BoxCollider)itemTexture2.gameObject.AddComponent(typeof(BoxCollider)); boxCollider3.size = new Vector3(this.columnRect[i].width, this.columnRect[i].height, 0f); boxCollider3.center = new Vector3(this.columnRect[i].x / 2f, -this.columnRect[i].y / 2f, 0f); } else { itemTexture2.Setup((float)this.columnWidth[i], this.lineHeight); itemTexture2.gameObject.transform.localPosition = new Vector3(num, 0f, -0.02f); num += (float)this.columnWidth[i]; BoxCollider boxCollider4 = (BoxCollider)itemTexture2.gameObject.AddComponent(typeof(BoxCollider)); boxCollider4.size = new Vector3((float)this.columnWidth[i], this.lineHeight, 0f); boxCollider4.center = new Vector3((float)(this.columnWidth[i] / 2), -this.lineHeight / 2f, num2); } itemTexture2.Start(); if (item.ColumnKey[i] is int) { int charkind = (int)item.ColumnKey[i]; itemTexture2.SetSolImageTexure(eCharImageType.SMALL, charkind, -1); } else if (item.ColumnKey[i] is NkListSolInfo) { NkListSolInfo solInfo = item.ColumnKey[i] as NkListSolInfo; itemTexture2.SetSolImageTexure(eCharImageType.SMALL, solInfo); } } else if (item.GetType(i) == ListItem.TYPE.PROGRESSBAR) { GameObject gameObject7 = new GameObject(name); UIProgressBar uIProgressBar = gameObject7.AddComponent <UIProgressBar>(); uIProgressBar.gameObject.layer = GUICamera.UILayer; uIProgressBar.width = this.columnRect[i].width; uIProgressBar.height = this.columnRect[i].height; UIBaseInfoLoader uIBaseInfoLoader2 = NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary(item.GetColumnImageStr(i)); uIProgressBar.SetSpriteTile(uIBaseInfoLoader2.Tile, uIBaseInfoLoader2.UVs.width / (float)uIBaseInfoLoader2.ButtonCount, uIBaseInfoLoader2.UVs.height); Material material2 = CResources.Load(uIBaseInfoLoader2.Material) as Material; uIProgressBar.Setup(this.columnRect[i].width, this.columnRect[i].height, material2); Rect uvs2 = new Rect(UIBaseFileManager.GetPixelToUVsWidth(material2, uIBaseInfoLoader2.UVs.x), 1f - UIBaseFileManager.GetPixelToUVsHeight(material2, uIBaseInfoLoader2.UVs.y + uIBaseInfoLoader2.UVs.height), UIBaseFileManager.GetPixelToUVsWidth(material2, uIBaseInfoLoader2.UVs.width), UIBaseFileManager.GetPixelToUVsHeight(material2, uIBaseInfoLoader2.UVs.height)); uIProgressBar.States[0].spriteFrames = new CSpriteFrame[1]; uIProgressBar.States[0].spriteFrames[0] = new CSpriteFrame(); uIProgressBar.States[0].spriteFrames[0].uvs = uvs2; uIProgressBar.animations[0].SetAnim(uIProgressBar.States[0], 0); uIBaseInfoLoader2.Initialize(); if (NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary(item.GetColumnImageStr2(i), ref uIBaseInfoLoader2)) { uvs2 = new Rect(UIBaseFileManager.GetPixelToUVsWidth(material2, uIBaseInfoLoader2.UVs.x), 1f - UIBaseFileManager.GetPixelToUVsHeight(material2, uIBaseInfoLoader2.UVs.y + uIBaseInfoLoader2.UVs.height), UIBaseFileManager.GetPixelToUVsWidth(material2, uIBaseInfoLoader2.UVs.width), UIBaseFileManager.GetPixelToUVsHeight(material2, uIBaseInfoLoader2.UVs.height)); uIProgressBar.States[1].spriteFrames = new CSpriteFrame[1]; uIProgressBar.States[1].spriteFrames[0] = new CSpriteFrame(); uIProgressBar.States[1].spriteFrames[0].uvs = uvs2; uIProgressBar.animations[1].SetAnim(uIProgressBar.States[1], 1); } uIProgressBar.autoResize = false; uIProgressBar.anchor = SpriteRoot.ANCHOR_METHOD.UPPER_LEFT; uIProgressBar.PlayAnim(0, 0); uIProgressBar.Value = (float)item.ColumnKey[i]; uIListItemContainer.MakeChild(uIProgressBar.gameObject); uIProgressBar.gameObject.transform.localPosition = new Vector3(this.columnRect[i].x, -this.columnRect[i].y, num2); } } return(uIListItemContainer); }
private void ShowList() { for (int i = 0; i < 4; i++) { if (NrTSingleton <MythRaidManager> .Instance.partyPersonID[i] > 0L) { List <GS_BATTLE_RESULT_MYTHRAID_SOLDIER> list = NrTSingleton <MythRaidManager> .Instance.dic_SolInfo[NrTSingleton <MythRaidManager> .Instance.partyPersonID[i]]; NewListItem newListItem = new NewListItem(this.nlb_HeroInfo.ColumnNum, true, string.Empty); newListItem.SetListItemData(0, NrTSingleton <MythRaidManager> .Instance.partyPersonName[i], null, null, null); this.nlb_HeroInfo.Add(newListItem); if (list != null && list.Count != 0) { NewListItem newListItem2 = new NewListItem(this.nlb_HeroInfo.ColumnNum, true, string.Empty); for (int j = 0; j < list.Count; j++) { if (j >= 0 && j % this.MAX_ONECOLUMN_SOLDIER == 0) { newListItem2 = new NewListItem(this.nlb_HeroInfo.ColumnNum, true, string.Empty); } int num = j % this.MAX_ONECOLUMN_SOLDIER + 2; Texture2D portraitLeaderSol = this.GetPortraitLeaderSol(list[j].CharKind); if (portraitLeaderSol != null) { newListItem2.SetListItemData(num, portraitLeaderSol, null, null, null, null); } else { UIBaseInfoLoader uIBaseInfoLoader = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendFrame(list[j].CharKind, (int)list[j].Grade); if (uIBaseInfoLoader == null) { uIBaseInfoLoader = NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary("Win_T_ItemEmpty"); } newListItem2.SetListItemData(num, uIBaseInfoLoader, null, null, null); NkListSolInfo nkListSolInfo = new NkListSolInfo(); nkListSolInfo.SolCharKind = list[j].CharKind; nkListSolInfo.SolGrade = (int)list[j].Grade; nkListSolInfo.SolInjuryStatus = false; nkListSolInfo.SolLevel = list[j].Level; nkListSolInfo.ShowLevel = true; if (NrTSingleton <NrCharCostumeTableManager> .Instance.IsCostumeUniqueEqualSolKind(list[j].CostumeUnique, list[j].CharKind)) { nkListSolInfo.SolCostumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(list[j].CostumeUnique); } newListItem2.SetListItemData(num + this.MAX_ONECOLUMN_SOLDIER, nkListSolInfo, null, null, null); } if (j % this.MAX_ONECOLUMN_SOLDIER == this.MAX_ONECOLUMN_SOLDIER - 1) { newListItem2.SetListItemData(1, false); this.nlb_HeroInfo.Add(newListItem2); newListItem2 = null; } } if (newListItem2 != null) { newListItem2.SetListItemData(1, false); this.nlb_HeroInfo.Add(newListItem2); } } } } }
public NewListItem CreateItem(short Column) { NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo; string text = string.Empty; string text2 = string.Empty; short num = Column * 5; bool flag = Column % 2 == 0; short guildBossLastFloor = NrTSingleton <ContentsLimitManager> .Instance.GetGuildBossLastFloor(); string columnData = string.Empty; if (flag) { columnData = string.Format("Mobile/DLG/GuildBoss/newlistbox_floor_columndata{0}", NrTSingleton <UIDataManager> .Instance.AddFilePath); } else { columnData = string.Format("Mobile/DLG/GuildBoss/newlistbox_floor1_columndata{0}", NrTSingleton <UIDataManager> .Instance.AddFilePath); } this.m_lbFloor.SetColumnData(columnData); NewListItem newListItem = new NewListItem(this.m_lbFloor.ColumnNum, true, string.Empty); if (!flag) { newListItem.SetListItemData(0, "UI/BabelTower/boss_main1", true, null, null); } else { newListItem.SetListItemData(0, "UI/BabelTower/boss_main2", true, null, null); } bool flag2 = this.GuildBossRewardCheck(); if (flag2) { this.m_dtNotice.Visible = true; } for (int i = 4; i >= 0; i--) { newListItem.SetListItemData(i * 6 + 6, false); newListItem.SetListItemData(i * 6 + 6 + 2, false); newListItem.SetListItemData(i * 6 + 6 + 4, false); newListItem.SetListItemData(i * 6 + 7, false); newListItem.SetListItemData(i * 6 + 7 + 2, false); newListItem.SetListItemData(i * 6 + 7 + 4, false); newListItem.SetListItemData(i + 36, false); newListItem.SetListItemData(i + 41, false); newListItem.SetListItemData(i + 5 + 41, false); newListItem.SetListItemData(i + 1, false); newListItem.SetListItemData(51 + i, false); newListItem.SetListItemData(56 + i * 2, false); newListItem.SetListItemData(56 + i * 2 + 1, false); if (num <= guildBossLastFloor) { newListItem.SetListItemData(i + 1, true); if (num / 10 <= 0 && num % 10 > 0) { text = "Win_Number_" + num; newListItem.SetListItemData(i + 36, true); newListItem.SetListItemData(i + 36, text, null, null, null); } else { short num2 = num / 10; short num3 = num % 10; text = "Win_Number_" + num2; text2 = "Win_Number_" + num3; newListItem.SetListItemData(i + 41, true); newListItem.SetListItemData(i + 41, text, null, null, null); newListItem.SetListItemData(i + 5 + 41, true); newListItem.SetListItemData(i + 5 + 41, text2, null, null, null); } newListItem.SetListItemData(i + 1, string.Empty, num, new EZValueChangedDelegate(this.BtClickFloor), null); newListItem.SetListItemData(51 + i, false); newListItem.SetListItemData(51 + i, "Win_I_Notice04", null, null, null); NEWGUILD_MY_BOSS_ROOMINFO guildBossMyRoomInfo = kMyCharInfo.GetGuildBossMyRoomInfo(num); if (guildBossMyRoomInfo != null) { if (this.m_SelectFloor < num) { this.m_Selectindex = Column; this.m_SelectFloor = num; } if (guildBossMyRoomInfo.i64PlayPersonID > 0L) { newListItem.SetListItemData(56 + i * 2, true); newListItem.SetListItemData(56 + i * 2 + 1, true); NewGuildMember memberInfoFromPersonID = NrTSingleton <NewGuildManager> .Instance.GetMemberInfoFromPersonID(guildBossMyRoomInfo.i64PlayPersonID); if (memberInfoFromPersonID != null) { if (memberInfoFromPersonID.GetPortrait() != null) { newListItem.SetListItemData(56 + i * 2 + 1, memberInfoFromPersonID.GetPortrait(), guildBossMyRoomInfo.i64PlayPersonID, null, new EZValueChangedDelegate(this.BtnClickMemberInfo), null); } else { NkListSolInfo nkListSolInfo = new NkListSolInfo(); nkListSolInfo.SolCharKind = memberInfoFromPersonID.GetFaceCharKind(); nkListSolInfo.SolGrade = -1; nkListSolInfo.SolLevel = memberInfoFromPersonID.GetLevel(); newListItem.SetListItemData(56 + i * 2 + 1, nkListSolInfo, guildBossMyRoomInfo.i64PlayPersonID, new EZValueChangedDelegate(this.BtnClickMemberInfo), null); } } } } } num -= 1; } flag = !flag; newListItem.Data = Column; return(newListItem); }
public void ShowList() { this.m_bLoadComplete = false; this.m_kFloorInfo.Clear(); this.m_lbFloor.Clear(); bool flag = true; short num; if (this.m_nFloorType == 2) { TsAudioManager.Instance.AudioContainer.RequestAudioClip("BGM", "CHAOSTOWER", "HARDMODE", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay), string.Empty, true); TsAudioManager.Instance.AudioContainer.RequestAudioClip("AMB", "CHAOSTOWER", "HARDMODE", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay), string.Empty, true); num = (short)PlayerPrefs.GetInt(NrPrefsKey.LASTPLAY_BABELFLOOR_HARD, 1); this.m_laTitle.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2782")); NrTSingleton <FormsManager> .Instance.AttachEffectKey("FX_BABEL_MAIN_HARD", this.m_dtEffect, this.m_dtEffect.GetSize()); } else { TsAudioManager.Instance.AudioContainer.RequestAudioClip("BGM", "CHAOSTOWER", "START", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay), string.Empty, true); num = (short)PlayerPrefs.GetInt(NrPrefsKey.LASTPLAY_BABELFLOOR, 1); this.m_laTitle.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1377")); NrTSingleton <FormsManager> .Instance.AttachEffectKey("FX_BABEL_MAIN", this.m_dtEffect, this.m_dtEffect.GetSize()); } short num2 = NrTSingleton <BabelTowerManager> .Instance.GetLastFloor(this.m_nFloorType); int babelTowerLastFloor = NrTSingleton <ContentsLimitManager> .Instance.GetBabelTowerLastFloor(this.m_nFloorType); if (0 < babelTowerLastFloor && babelTowerLastFloor < (int)num2) { num2 = (short)babelTowerLastFloor; } NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo(); COMMON_CONSTANT_Manager instance = COMMON_CONSTANT_Manager.GetInstance(); int num3 = 0; if (instance != null) { num3 = instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_BABEL_REPEAT); } if (myCharInfo.GetLevel() < num3) { this.m_dtLock.Visible = true; } else { this.m_dtLock.Visible = false; } short num4 = num2 / 5; string text = string.Empty; string text2 = string.Empty; string text3 = string.Empty; NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo; for (short num5 = num4; num5 > 0; num5 -= 1) { string text4 = string.Empty; if (flag) { text4 = string.Format("Mobile/DLG/BabelTower/newlistbox_floor_columndata{0}", NrTSingleton <UIDataManager> .Instance.AddFilePath); } else { text4 = string.Format("Mobile/DLG/BabelTower/newlistbox_floor1_columndata{0}", NrTSingleton <UIDataManager> .Instance.AddFilePath); } this.m_lbFloor.SetColumnData(text4); NewListItem newListItem = new NewListItem(this.m_lbFloor.ColumnNum, true, string.Empty); newListItem.m_szColumnData = text4; if (!flag) { if (this.m_nFloorType == 2) { newListItem.SetListItemData(0, "UI/BabelTower/babel_hard_main1", true, null, null); } else { newListItem.SetListItemData(0, "UI/BabelTower/babel_main1", true, null, null); } } else if (this.m_nFloorType == 2) { newListItem.SetListItemData(0, "UI/BabelTower/babel_hard_main2", true, null, null); } else { newListItem.SetListItemData(0, "UI/BabelTower/babel_main2", true, null, null); } for (int i = 4; i >= 0; i--) { List <FRIEND_BABEL_CLEARINFO> babelFloor_FriendList = kMyCharInfo.m_kFriendInfo.GetBabelFloor_FriendList(num2, this.m_nFloorType); if (babelFloor_FriendList != null) { for (int j = 0; j < 3; j++) { if (babelFloor_FriendList.Count >= j + 1) { USER_FRIEND_INFO friend = kMyCharInfo.m_kFriendInfo.GetFriend(babelFloor_FriendList[j].i64FriendPersonID); if (friend != null) { Texture2D friendTexture = kMyCharInfo.GetFriendTexture(babelFloor_FriendList[j].i64FriendPersonID); if (friendTexture == null) { NkListSolInfo nkListSolInfo = new NkListSolInfo(); nkListSolInfo.SolCharKind = friend.i32FaceCharKind; nkListSolInfo.SolGrade = -1; nkListSolInfo.SolLevel = friend.i16Level; nkListSolInfo.SolCostumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(friend.i32FaceCharCostumeUnique); newListItem.SetListItemData(i * 6 + 7 + j * 2, nkListSolInfo, num2, new EZValueChangedDelegate(this.BtClickFloorFriendList), null); } else { newListItem.SetListItemData(i * 6 + 7 + j * 2, friendTexture, num2, null, new EZValueChangedDelegate(this.BtClickFloorFriendList), null); } newListItem.SetListItemData(i * 6 + 6 + j * 2, !flag); newListItem.SetListItemData(i * 6 + 7 + j * 2, !flag); } } else { newListItem.SetListItemData(i * 6 + 6 + j * 2, false); newListItem.SetListItemData(i * 6 + 7 + j * 2, false); } } } else { newListItem.SetListItemData(i * 6 + 6, false); newListItem.SetListItemData(i * 6 + 6 + 2, false); newListItem.SetListItemData(i * 6 + 6 + 4, false); newListItem.SetListItemData(i * 6 + 7, false); newListItem.SetListItemData(i * 6 + 7 + 2, false); newListItem.SetListItemData(i * 6 + 7 + 4, false); } newListItem.SetListItemData(i + 36, false); newListItem.SetListItemData(i + 41, false); newListItem.SetListItemData(i + 5 + 41, false); if (num2 / 100 >= 1) { short num6 = num2 / 100; short num7 = num2 / 10 % 10; short num8 = num2 % 10; text = "Win_Number_" + num6; text2 = "Win_Number_" + num7; text3 = "Win_Number_" + num8; newListItem.SetListItemData(i + 6 + 41, true); newListItem.SetListItemData(i + 6 + 41, text, null, null, null); newListItem.SetListItemData(i + 41, true); newListItem.SetListItemData(i + 41, text2, null, null, null); newListItem.SetListItemData(i + 5 + 41, true); newListItem.SetListItemData(i + 5 + 41, text3, null, null, null); } else if (num2 / 10 <= 0 && num2 % 10 > 0) { text = "Win_Number_" + num2; newListItem.SetListItemData(i + 36, true); newListItem.SetListItemData(i + 36, text, null, null, null); } else { short num9 = num2 / 10; short num10 = num2 % 10; text = "Win_Number_" + num9; text2 = "Win_Number_" + num10; newListItem.SetListItemData(i + 41, true); newListItem.SetListItemData(i + 41, text, null, null, null); newListItem.SetListItemData(i + 5 + 41, true); newListItem.SetListItemData(i + 5 + 41, text2, null, null, null); } byte babelFloorRankInfo = kMyCharInfo.GetBabelFloorRankInfo(num2, this.m_nFloorType); bool treasure = kMyCharInfo.IsBabelTreasure(num2, this.m_nFloorType); UIBaseInfoLoader loader = NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary(NrTSingleton <BabelTowerManager> .Instance.GetBabelRankImgText(babelFloorRankInfo, treasure)); newListItem.SetListItemData(i + 1, loader, num2, new EZValueChangedDelegate(this.BtClickFloor), null); if (num2 == num) { this.m_nSelectindex = num4 - num5; } num2 -= 1; } newListItem.Data = (int)(num5 - 1); flag = !flag; this.m_lbFloor.Add(newListItem); this.m_kFloorInfo.Add((int)num5); } this.m_lbFloor.RepositionItems(); if (!this.m_lbFloor.ReUse) { this.m_lbFloor.SetSelectedItem((int)this.m_nSelectindex); } }
public void SetSolImageTexure(eCharImageType type, NkListSolInfo solInfo) { this.SetSolImageTexure(type, solInfo, false); }
public void MakeNPCItem(AGIT_NPC_SUB_DATA NPCSubData) { if (NPCSubData == null) { return; } AgitNPCData agitNPCData = NrTSingleton <NrBaseTableManager> .Instance.GetAgitNPCData(NPCSubData.ui8NPCType.ToString()); if (agitNPCData == null) { return; } NrCharKindInfo charKindInfoFromCode = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfoFromCode(agitNPCData.strCharCode); if (charKindInfoFromCode == null) { return; } NkListSolInfo nkListSolInfo = new NkListSolInfo(); nkListSolInfo.SolCharKind = charKindInfoFromCode.GetCharKind(); nkListSolInfo.SolGrade = -1; nkListSolInfo.SolLevel = NPCSubData.i16NPCLevel; NewListItem newListItem = new NewListItem(this.m_nlbNPCList.ColumnNum, true, string.Empty); newListItem.SetListItemData(1, nkListSolInfo, null, null, null); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1435"), "charname", charKindInfoFromCode.GetName() }); newListItem.SetListItemData(2, this.m_strText, null, null, null); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1031"), "count", NPCSubData.i16NPCLevel }); newListItem.SetListItemData(3, this.m_strText, null, null, null); NewGuildMember memberInfoFromPersonID = NrTSingleton <NewGuildManager> .Instance.GetMemberInfoFromPersonID(NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_PersonID); if (memberInfoFromPersonID == null) { return; } if (memberInfoFromPersonID.GetRank() >= NewGuildDefine.eNEWGUILD_MEMBER_RANK.eNEWGUILD_MEMBER_RANK_OFFICER) { newListItem.SetListItemData(4, string.Empty, NPCSubData, new EZValueChangedDelegate(this.ClickAgieDelNPC), null); } else { newListItem.SetListItemData(4, false); } long i64Time = NPCSubData.i64NPCEndTime - PublicMethod.GetCurTime(); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strTime, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1763"), "timestring", this.GetTimeToString(i64Time) }); newListItem.SetListItemData(5, this.m_strTime, null, null, null); newListItem.Data = NPCSubData; this.m_nlbNPCList.Add(newListItem); }
public void SetDeadSol(long nSolID) { if (Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_COLOSSEUM) { return; } if ((Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_BABELTOWER || Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_BOUNTYHUNT) && Battle.BabelPartyCount != 1) { return; } if (Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_MYTHRAID || Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_NEWEXPLORATION) { return; } BATTLE_CONSTANT_Manager instance = BATTLE_CONSTANT_Manager.GetInstance(); if (instance == null) { return; } int num = (int)instance.GetValue(eBATTLE_CONSTANT.eBATTLE_CONSTANT_RESURRECTION_COUNT); if (this.nReviveCount >= num) { if (this.m_nlDeadSolList.Count > 0) { this.m_nlDeadSolList.Clear(); } return; } NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); if (charPersonInfo == null) { return; } NkSoldierInfo soldierInfoFromSolID = charPersonInfo.GetSoldierInfoFromSolID(nSolID); if (soldierInfoFromSolID == null || !soldierInfoFromSolID.IsValid()) { return; } if (this.m_nlDeadSolList.Count >= 3) { this.m_nlDeadSolList.RemoveItem(0, true); } NewListItem newListItem = new NewListItem(this.m_nlDeadSolList.ColumnNum, true, string.Empty); newListItem.Data = soldierInfoFromSolID.GetSolID(); NkListSolInfo nkListSolInfo = new NkListSolInfo(); nkListSolInfo.SolCharKind = soldierInfoFromSolID.GetCharKind(); nkListSolInfo.SolGrade = (int)soldierInfoFromSolID.GetGrade(); nkListSolInfo.SolLevel = soldierInfoFromSolID.GetLevel(); nkListSolInfo.FightPower = soldierInfoFromSolID.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_FIGHTINGPOWER); nkListSolInfo.ShowLevel = false; nkListSolInfo.SolCostumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(soldierInfoFromSolID); NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(soldierInfoFromSolID.GetCharKind()); if (charKindInfo != null) { short gradeMaxLevel = charKindInfo.GetGradeMaxLevel((short)soldierInfoFromSolID.GetGrade()); if (soldierInfoFromSolID.GetLevel() >= gradeMaxLevel) { nkListSolInfo.ShowCombat = true; nkListSolInfo.ShowLevel = false; } else { nkListSolInfo.ShowCombat = false; nkListSolInfo.ShowLevel = true; } } newListItem.SetListItemData(1, nkListSolInfo, soldierInfoFromSolID, new EZValueChangedDelegate(this.BtClickUpListBox), null); this.m_nlDeadSolList.Add(newListItem); this.m_nlDeadSolList.RepositionItems(); base.AllHideLayer(); base.ShowLayer(this.DEAD_SOLLIST_LAYER_2); }
public void SetInfo() { NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo; if (kMyCharInfo == null) { return; } string text = string.Empty; string text2 = string.Empty; BABEL_GUILDBOSS babelGuildBossinfo = NrTSingleton <BabelTowerManager> .Instance.GetBabelGuildBossinfo(this.m_GuildBossFloor); if (babelGuildBossinfo == null) { return; } NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(babelGuildBossinfo.m_nBossKind); this.m_laGuildBossName.Text = charKindInfo.GetName(); this.m_dtBossImg.SetTexture(eCharImageType.LARGE, charKindInfo.GetCharKind(), -1, string.Empty); text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1808"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[] { text, "count1", ANNUALIZED.Convert(this.m_i32CurBossHp), "count2", ANNUALIZED.Convert(babelGuildBossinfo.m_nBossMaxHP) }); this.m_laGuildBossHp.Text = text2; float num = (float)this.m_i32CurBossHp / (float)babelGuildBossinfo.m_nBossMaxHP; this.m_dtBossCurHP.SetSize(this.BOSSHP_BAR_WIDTH * num, this.m_dtBossCurHP.GetSize().y); text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1697"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[] { text, "itemname", NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(babelGuildBossinfo.m_nBaseReward_ItemUnique), "count", babelGuildBossinfo.m_nBaseReward_ItemNum }); this.m_lbRewardBaseItemNum.Text = text2; int num2 = (babelGuildBossinfo.m_nReward_BaseMoney * kMyCharInfo.GetLevel() >= babelGuildBossinfo.m_nReward_BaseMoney_Max) ? babelGuildBossinfo.m_nReward_BaseMoney_Max : (babelGuildBossinfo.m_nReward_BaseMoney * kMyCharInfo.GetLevel()); this.m_laBasicReward.Text = ANNUALIZED.Convert(num2); this.m_dtRewardBaseItem.SetTexture(NrTSingleton <ItemManager> .Instance.GetItemTexture(babelGuildBossinfo.m_nBaseReward_ItemUnique)); this.SortMemberInfo(); int num3 = 1; bool flag = false; bool flag2 = false; this.m_lbGuildMemberList.Clear(); for (int i = 0; i < this.m_listMemberInfo.Count; i++) { NEWGUILD_BOSS_PLAYER_INFO nEWGUILD_BOSS_PLAYER_INFO = this.m_listMemberInfo[i]; NewGuildMember memberInfoFromPersonID = NrTSingleton <NewGuildManager> .Instance.GetMemberInfoFromPersonID(nEWGUILD_BOSS_PLAYER_INFO.i64PersonID); if (memberInfoFromPersonID != null) { if (this.m_byRoomState != 3 && nEWGUILD_BOSS_PLAYER_INFO.i64PersonID == NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_PersonID) { flag2 = true; } bool flag3 = false; NewListItem newListItem = new NewListItem(this.m_lbGuildMemberList.ColumnNum, true, string.Empty); Texture2D portrait = memberInfoFromPersonID.GetPortrait(); if (this.m_byRoomState == 3) { if (nEWGUILD_BOSS_PLAYER_INFO.i64PersonID == NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_PersonID) { flag = true; } if (nEWGUILD_BOSS_PLAYER_INFO.i64PersonID == this.ClearPersonID) { this.m_itClearUserFace.Visible = true; if (portrait != null) { this.m_itClearUserFace.SetTexture(portrait); } else { NkListSolInfo nkListSolInfo = new NkListSolInfo(); nkListSolInfo.SolCharKind = memberInfoFromPersonID.GetFaceCharKind(); nkListSolInfo.SolLevel = memberInfoFromPersonID.GetLevel(); nkListSolInfo.SolCostumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(memberInfoFromPersonID.GetCostumeUnique()); nkListSolInfo.SolGrade = -1; this.m_itClearUserFace.SetSolImageTexure(eCharImageType.SMALL, nkListSolInfo, false); } this.m_lbClearUserName.SetText(memberInfoFromPersonID.GetCharName()); this.m_lbClearUserName.Visible = true; newListItem.SetListItemData(21, true); newListItem.SetListItemData(8, false); flag3 = true; } } if (!flag3) { newListItem.SetListItemData(12, false); } newListItem.SetListItemData(2, memberInfoFromPersonID.GetCharName(), null, null, null); text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1915"); newListItem.SetListItemData(3, text2, null, null, null); float num4 = (float)nEWGUILD_BOSS_PLAYER_INFO.i32Damage / (float)babelGuildBossinfo.m_nBossMaxHP; float num5 = num4 * 340f; newListItem.SetListItemData(5, string.Empty, num5, null, null); text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1916"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[] { text, "count1", ANNUALIZED.Convert(nEWGUILD_BOSS_PLAYER_INFO.i32Damage), "count2", (int)(num4 * 100f) }); newListItem.SetListItemData(6, text2, null, null, null); if (portrait != null) { newListItem.SetListItemData(7, portrait, null, null, null, null); } else { newListItem.SetListItemData(7, new NkListSolInfo { SolCharKind = memberInfoFromPersonID.GetFaceCharKind(), SolLevel = memberInfoFromPersonID.GetLevel(), SolCostumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(memberInfoFromPersonID.GetCostumeUnique()), SolGrade = -1 }, null, null, null); } if (!flag3) { text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1186"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[] { text, "count", num3 }); newListItem.SetListItemData(9, text2, null, null, null); } else { newListItem.SetListItemData(9, false); } newListItem.SetListItemData(10, memberInfoFromPersonID.GetRankText(), null, null, null); this.m_lbGuildMemberList.Add(newListItem); num3++; } } this.m_lbGuildMemberList.RepositionItems(); if (flag2 && !flag) { this.m_btGuildBossStart.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3292")); } else { this.m_btGuildBossStart.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("633")); } if (!flag) { Button expr_596 = this.m_btGuildBossStart; expr_596.Click = (EZValueChangedDelegate)Delegate.Combine(expr_596.Click, new EZValueChangedDelegate(this.OnClickStart)); } else { this.m_btGuildBossStart.SetEnabled(false); } if (this.m_byRoomState == 3) { this.m_dtBossVictoyImg.Visible = true; this.m_dtClearUserBG.Visible = true; this.m_dtClearBG.Visible = true; } }
public void SetOccupyDetailinfo(NkSoldierInfo info) { this.InitOccSolInfo(); string empty = string.Empty; string str = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1639"), "count", info.m_kBase.Level.ToString(), "targetname", info.GetName() }); bool flag = false; if (this.m_expeditiondetailinfo.ui8ExpeditionState == 1) { str = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1525"); flag = true; } else if (this.m_expeditiondetailinfo.ui8ExpeditionState == 4) { str = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1526"); flag = true; } if (flag) { this.m_laOccSelectMemberName.SetText(empty + " (" + str + ")"); } else { this.m_laOccSelectMemberName.SetText(empty); } if (info != null) { for (int i = 0; i < 15; i++) { if (info.m_kBase.BattlePos >= 0) { if (info.m_kBase.CharKind > 0) { if (this.m_pksolinfo[i] != null) { if (this.m_pksolinfo[i].m_kBase.SolPosIndex == info.m_kBase.SolPosIndex) { NkListSolInfo nkListSolInfo = new NkListSolInfo(); nkListSolInfo.ShowCombat = true; nkListSolInfo.FightPower = (long)this.m_pksolinfo[i].GetFightPower(); nkListSolInfo.SolLevel = this.m_pksolinfo[i].m_kBase.Level; nkListSolInfo.SolCharKind = this.m_pksolinfo[i].m_kBase.CharKind; nkListSolInfo.SolGrade = (int)this.m_pksolinfo[i].m_kBase.Grade; nkListSolInfo.ShowLevel = false; nkListSolInfo.SolCostumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(this.m_pksolinfo[i]); EVENT_HERODATA eventHeroCharCode = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCharCode(nkListSolInfo.SolCharKind, (byte)nkListSolInfo.SolGrade); if (eventHeroCharCode != null) { this.m_dtOccSolBG[(int)this.m_pksolinfo[i].m_kBase.BattlePos].SetTexture("Win_I_EventSol"); } else { UIBaseInfoLoader legendFrame = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendFrame(nkListSolInfo.SolCharKind, (int)((byte)nkListSolInfo.SolGrade)); if (legendFrame != null) { this.m_dtOccSolBG[(int)this.m_pksolinfo[i].m_kBase.BattlePos].SetTexture(legendFrame); } } this.m_itOccSol[(int)this.m_pksolinfo[i].m_kBase.BattlePos].SetSolImageTexure(eCharImageType.SMALL, nkListSolInfo, false); } } } } } } }
public void SetSolImageTexure(eCharImageType type, int charkind, int solgrade, bool injury, NkListSolInfo solInfo) { this.reserve = false; this.imageKey = string.Empty; string text = MsgHandler.HandleReturn <string>("PortraitFileName", new object[] { charkind, solgrade }); if (string.Empty == text) { Debug.LogError(string.Concat(new object[] { "fail find SolImage = ", charkind.ToString(), " SolGrade = ", solgrade, " ", Time.time })); this.ClearData(); return; } if (solInfo != null && !string.IsNullOrEmpty(solInfo.SolCostumePortraitPath)) { string text2 = MsgHandler.HandleReturn <string>("PortraitCostumeFileName", new object[] { charkind, solgrade, solInfo.SolCostumePortraitPath }); if (!string.IsNullOrEmpty(text2)) { text = text2; } } this.SolInjuryStatus(injury); this.m_etype = type; if (type == eCharImageType.SMALL) { this.imageKey = text + "_64"; } else if (type == eCharImageType.MIDDLE) { this.imageKey = text + "_256"; } else if (type == eCharImageType.LARGE) { if (UIDataManager.IsUse256Texture()) { this.imageKey = text + "_256"; } else { this.imageKey = text + "_512"; } } Texture2D texture = NrTSingleton <UIImageBundleManager> .Instance.GetTexture(this.imageKey); if (null != texture) { this.DrawHero(texture); this.reserve = true; } else { NrTSingleton <UIImageBundleManager> .Instance.RequestCharImage(this.imageKey, type, new PostProcPerItem(this.SetCharImage)); } string s = MsgHandler.HandleReturn <string>("GetLegendTypeToString", new object[] { charkind, solgrade }); short num = short.Parse(s); if (0 < num) { Transform y = base.transform.FindChild(NrTSingleton <UIDataManager> .Instance.AttachEffectKeyName); if (null == y && !this.bHaveEffect) { if (type == eCharImageType.SMALL) { NrTSingleton <FormsManager> .Instance.RequestAttachUIEffect("Effect/Instant/fx_legendhero_ui" + NrTSingleton <UIDataManager> .Instance.AddFilePath, this, base.GetSize()); } else { NrTSingleton <FormsManager> .Instance.RequestAttachUIEffect("Effect/Instant/fx_herolegendblg_ui" + NrTSingleton <UIDataManager> .Instance.AddFilePath, this, base.GetSize()); } this.AddGameObjectDelegate(new EZGameObjectDelegate(NrTSingleton <UIDataManager> .Instance.ResizeEffect)); this.bHaveEffect = true; } } else { Transform transform = base.transform.FindChild(NrTSingleton <UIDataManager> .Instance.AttachEffectKeyName); if (null != transform) { UnityEngine.Object.Destroy(transform.gameObject); this.bHaveEffect = false; } } if ("true" == MsgHandler.HandleReturn <string>("CharKindIsATB", new object[] { charkind, 128L })) { this.upText.Visible = false; } else { UIBaseInfoLoader uIBaseInfoLoader = MsgHandler.HandleReturn <UIBaseInfoLoader>("GetSolGradeImg", new object[] { charkind, solgrade }); if (null != this.downText && null != this.upText) { if (uIBaseInfoLoader != null) { this.upText.Visible = true; this.downText.Visible = false; this.upText.SetSize(uIBaseInfoLoader.UVs.width, uIBaseInfoLoader.UVs.height); this.upText.SetTexture(uIBaseInfoLoader); if (0 < num) { this.upText.gameObject.transform.localPosition = new Vector3(-6f, -(this.height - uIBaseInfoLoader.UVs.height + 6f), -0.02f); } else { this.upText.gameObject.transform.localPosition = new Vector3(2f, -(this.height - uIBaseInfoLoader.UVs.height - 2f), -0.02f); } this.upText.DeleteSpriteText(); } else { this.upText.Visible = false; this.downText.Visible = false; } } } }
private void _LinkSolData() { NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); if (charPersonInfo == null) { return; } int num = 0; this.m_lbSolList.Clear(); foreach (GS_BATTLE_RESULT_SOLDIER current in this.m_SolInfoList) { NewListItem newListItem = new NewListItem(this.m_lbSolList.ColumnNum, true, string.Empty); NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(current.CharKind); if (charKindInfo != null) { NkListSolInfo nkListSolInfo = new NkListSolInfo(); nkListSolInfo.SolCharKind = current.CharKind; nkListSolInfo.SolGrade = current.SolGrade; nkListSolInfo.SolInjuryStatus = current.bInjury; nkListSolInfo.SolLevel = current.i16Level; nkListSolInfo.ShowLevel = true; if (NrTSingleton <NrCharCostumeTableManager> .Instance.IsCostumeUniqueEqualSolKind(current.i32CostumeUnique, current.CharKind)) { nkListSolInfo.SolCostumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(current.i32CostumeUnique); } UIBaseInfoLoader legendFrame = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendFrame(nkListSolInfo.SolCharKind, nkListSolInfo.SolGrade); if (legendFrame != null) { newListItem.SetListItemData(0, legendFrame, null, null, null); } newListItem.SetListItemData(1, nkListSolInfo, null, null, null); string text = string.Empty; if (NrTSingleton <NrCharKindInfoManager> .Instance.IsUserCharKind(current.CharKind)) { text = TKString.NEWString(this.m_BasicInfo.szAttackGuildName); } else { text = charKindInfo.GetName(); } string text2 = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("471"), "targetname", text, "count", current.i16Level }); newListItem.SetListItemData(2, text2, null, null, null); NkSoldierInfo soldierInfoFromSolID = charPersonInfo.GetSoldierInfoFromSolID(current.SolID); short num2 = 0; if (soldierInfoFromSolID != null) { num2 = charKindInfo.GetGradeMaxLevel((short)soldierInfoFromSolID.GetGrade()); float num3 = soldierInfoFromSolID.GetExpPercent(); string empty = string.Empty; if (num3 < 0f) { num3 = 0f; } NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("672"), "Count", ((int)(num3 * 100f)).ToString() }); newListItem.SetListItemData(4, "Com_T_GauWaPr4", 400f * num3, null, null); newListItem.SetListItemData(5, empty, null, null, null); } if (num2 == current.i16Level) { newListItem.SetListItemData(6, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("286"), null, null, null); } else { string empty2 = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty2, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1802"), "exp", ANNUALIZED.Convert(current.i32AddExp) }); text2 += "\r\n"; text2 += empty2; newListItem.SetListItemData(6, empty2, null, null, null); } this.m_lbSolList.Add(newListItem); num++; } } this.m_lbSolList.RepositionItems(); }
public void SelectAllyUserInfo(int iSelectIndex) { if (iSelectIndex < 0 || iSelectIndex >= 9) { return; } ApplyInfo applyInfoFromRaidBattlePos = this.GetApplyInfoFromRaidBattlePos((byte)iSelectIndex); if (applyInfoFromRaidBattlePos == null) { return; } ApplyInfo applyInfoFromRaidBattlePos2 = this.GetApplyInfoFromRaidBattlePos((byte)this.m_iOldSelectIndex); this.m_iCurSelectIndex = iSelectIndex; this.m_itAllySelectSolLarge[this.m_iOldSelectIndex].Visible = false; this.m_btAllySelectSolLarge[this.m_iOldSelectIndex].Visible = false; this.m_dtAllyLeaderLarge[this.m_iOldSelectIndex].Visible = false; this.m_itAllySelectSolSmall[this.m_iOldSelectIndex].Visible = true; this.m_btAllySelectSolSmall[this.m_iOldSelectIndex].Visible = true; if (applyInfoFromRaidBattlePos2 != null && applyInfoFromRaidBattlePos2.GetLeader() == 1) { this.m_dtAllyLeaderSmall[this.m_iOldSelectIndex].Visible = true; } this.m_itAllySelectSolLarge[this.m_iCurSelectIndex].Visible = true; this.m_btAllySelectSolLarge[this.m_iCurSelectIndex].Visible = true; if (applyInfoFromRaidBattlePos != null && applyInfoFromRaidBattlePos.GetLeader() == 1) { this.m_dtAllyLeaderLarge[this.m_iCurSelectIndex].Visible = true; } this.m_itAllySelectSolSmall[this.m_iCurSelectIndex].Visible = false; this.m_btAllySelectSolSmall[this.m_iCurSelectIndex].Visible = false; this.m_dtAllyLeaderSmall[this.m_iCurSelectIndex].Visible = false; this.m_iOldSelectIndex = iSelectIndex; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1639"), "count", applyInfoFromRaidBattlePos.GetCharLevel(), "targetname", applyInfoFromRaidBattlePos.GetCharName() }); this.m_lbUserName.SetText(this.m_strText); for (int i = 0; i < 9; i++) { GUILDWAR_APPLY_MILITARY_DETAIL_INFO detailInfoBattlePos = applyInfoFromRaidBattlePos.GetDetailInfoBattlePos(i); if (detailInfoBattlePos == null) { this.m_itSolInfo[i].ClearData(); this.m_itSolInfo[i].Visible = false; } else if (detailInfoBattlePos.i16BattlePos >= 0 && detailInfoBattlePos.i16BattlePos < 9) { NkListSolInfo nkListSolInfo = new NkListSolInfo(); nkListSolInfo.ShowCombat = true; nkListSolInfo.FightPower = detailInfoBattlePos.i64FightPower; nkListSolInfo.SolLevel = detailInfoBattlePos.i16level; nkListSolInfo.SolCharKind = detailInfoBattlePos.i32CharKind; nkListSolInfo.SolGrade = (int)detailInfoBattlePos.ui8grade; nkListSolInfo.ShowLevel = false; this.m_itSolInfo[i].Visible = true; this.m_itSolInfo[i].SetSolImageTexure(eCharImageType.SMALL, nkListSolInfo, false); } } }
public void SetDetailInfoSub_RaidLeader(int iIndex, ApplyInfo Info, int iSelectIndex) { this.m_dtAllySelectImage[iIndex].Visible = false; this.m_itAllySelectSolLarge[iIndex].ClearData(); this.m_itAllySelectSolLarge[iIndex].Visible = false; this.m_btAllySelectSolLarge[iIndex].Visible = false; this.m_dtAllyLeaderLarge[iIndex].Visible = false; this.m_dtAllyLeaderSmall[iIndex].Visible = false; this.m_itAllySelectSolSmall[iIndex].ClearData(); if (Info == null) { return; } if (Info.GetLeader() == 1) { if (iIndex == iSelectIndex) { this.m_dtAllyLeaderLarge[iIndex].Visible = true; } else { this.m_dtAllyLeaderSmall[iIndex].Visible = true; } } GUILDWAR_APPLY_MILITARY_DETAIL_INFO gUILDWAR_APPLY_MILITARY_DETAIL_INFO = Info.GetDetailInfo(0); if (gUILDWAR_APPLY_MILITARY_DETAIL_INFO != null) { this.SetSolImage(gUILDWAR_APPLY_MILITARY_DETAIL_INFO, this.m_itAllySelectSolLarge[iIndex]); this.SetSolImage(gUILDWAR_APPLY_MILITARY_DETAIL_INFO, this.m_itAllySelectSolSmall[iIndex]); if (iIndex == iSelectIndex) { this.m_itAllySelectSolSmall[iIndex].Visible = false; this.m_btAllySelectSolSmall[iIndex].Visible = false; this.m_itAllySelectSolLarge[iIndex].Visible = true; this.m_btAllySelectSolLarge[iIndex].Visible = true; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1639"), "count", Info.GetCharLevel(), "targetname", Info.GetCharName() }); this.m_lbUserName.SetText(this.m_strText); } else { this.m_itAllySelectSolSmall[iIndex].Visible = true; this.m_btAllySelectSolSmall[iIndex].Visible = true; } } if (iIndex == iSelectIndex) { for (int i = 0; i < 9; i++) { gUILDWAR_APPLY_MILITARY_DETAIL_INFO = Info.GetDetailInfoBattlePos(i); if (gUILDWAR_APPLY_MILITARY_DETAIL_INFO == null) { this.m_itSolInfo[i].Visible = false; } else if (gUILDWAR_APPLY_MILITARY_DETAIL_INFO.i16BattlePos >= 0 && gUILDWAR_APPLY_MILITARY_DETAIL_INFO.i16BattlePos < 9) { NkListSolInfo nkListSolInfo = new NkListSolInfo(); nkListSolInfo.ShowCombat = true; nkListSolInfo.FightPower = gUILDWAR_APPLY_MILITARY_DETAIL_INFO.i64FightPower; nkListSolInfo.SolLevel = gUILDWAR_APPLY_MILITARY_DETAIL_INFO.i16level; nkListSolInfo.SolCharKind = gUILDWAR_APPLY_MILITARY_DETAIL_INFO.i32CharKind; nkListSolInfo.SolGrade = (int)gUILDWAR_APPLY_MILITARY_DETAIL_INFO.ui8grade; nkListSolInfo.ShowLevel = false; this.m_itSolInfo[i].Visible = true; this.m_itSolInfo[i].SetSolImageTexure(eCharImageType.SMALL, nkListSolInfo, false); } } } }
private void SetReincarnateListBox(ref NewListItem item, int i, int i32CharKind, byte bCharRank, bool bElement) { string text = string.Empty; NkSoldierInfo battleSolDataCheck = this.GetBattleSolDataCheck(ref this.m_eElement_Msg[i], i32CharKind, bCharRank); NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(i32CharKind); if (charKindInfo == null) { TsLog.LogOnlyEditor("!!!!!!!!!! SolGuild - Element CharKind " + i32CharKind + " Error"); return; } item.SetListItemData(8, false); item.SetListItemData(9, false); item.SetListItemData(10, false); item.SetListItemData(11, false); NkListSolInfo nkListSolInfo = new NkListSolInfo(); nkListSolInfo.SolCharKind = i32CharKind; nkListSolInfo.SolGrade = (int)(bCharRank - 1); item.SetListItemData(3, nkListSolInfo, null, null, null); item.SetListItemData(4, charKindInfo.GetName(), null, null, null); text = this.GetElementSolMsg(this.m_eElement_Msg[i]); item.SetListItemData(5, text, null, null, null); if (this.m_eElement_Msg[i] == eElement_MsgType.eElement_OK || this.m_eElement_Msg[i] == eElement_MsgType.eElement_SOLHEIGHT) { item.SetListItemData(0, true); item.SetListItemData(1, false); item.SetListItemData(7, battleSolDataCheck.GetListSolInfo(false), null, null, null); } else { item.SetListItemData(0, false); item.SetListItemData(1, true); if (battleSolDataCheck == null) { item.SetListItemData(7, false); return; } item.SetListItemData(7, battleSolDataCheck.GetListSolInfo(false), null, null, null); } if (bElement) { bool flag = false; for (int j = 0; j < 6; j++) { if (battleSolDataCheck.GetEquipItemInfo() != null) { ITEM item2 = battleSolDataCheck.GetEquipItemInfo().m_kItem[j].GetItem(); if (item2 == null) { TsLog.LogWarning("!!!!!!!!!!!!!! CharKind {0} : Item pos{1} == ITEM NULL ", new object[] { i32CharKind, j }); } else if (item2.m_nItemUnique != 0) { flag = true; } } } if (flag) { item.SetListItemData(5, false); text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("627"); item.SetListItemData(8, true); item.SetListItemData(9, true); item.SetListItemData(9, text, battleSolDataCheck, new EZValueChangedDelegate(this.OnClickReleaseEquip), null); } else if (battleSolDataCheck.GetFriendPersonID() != 0L) { item.SetListItemData(5, false); text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("74"); item.SetListItemData(8, true); item.SetListItemData(9, true); item.SetListItemData(9, text, battleSolDataCheck, new EZValueChangedDelegate(this.OnClickUnsetSolHelp), null); } } item.Data = battleSolDataCheck.GetSolID(); }
public void SetSolList() { this.m_nlSelectSoldierList.Clear(); this.m_kSolList.Clear(); List <int> list = new List <int>(); list.Clear(); eSOL_SUBDATA eType = eSOL_SUBDATA.SOL_SUBDATA_NONE; NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); if (charPersonInfo == null) { return; } NrSoldierList soldierList = charPersonInfo.GetSoldierList(); if (soldierList == null) { return; } NkReadySolList readySolList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolList(); if (readySolList == null) { return; } if (Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_COLOSSEUM) { eType = eSOL_SUBDATA.SOL_SUBDATA_PVP_BATTLEPOS; NkSoldierInfo[] kSolInfo = soldierList.m_kSolInfo; for (int i = 0; i < kSolInfo.Length; i++) { NkSoldierInfo nkSoldierInfo = kSolInfo[i]; if (nkSoldierInfo.GetSolID() > 0L) { if (nkSoldierInfo.GetSolSubData(eType) > 0L && !list.Contains(nkSoldierInfo.GetCharKind())) { list.Add(nkSoldierInfo.GetCharKind()); } } } foreach (NkSoldierInfo current in readySolList.GetList().Values) { if (current.GetSolID() > 0L) { if (current.GetSolSubData(eType) > 0L && !list.Contains(current.GetCharKind())) { list.Add(current.GetCharKind()); } } } NkSoldierInfo[] kSolInfo2 = soldierList.m_kSolInfo; for (int j = 0; j < kSolInfo2.Length; j++) { NkSoldierInfo nkSoldierInfo2 = kSolInfo2[j]; if (nkSoldierInfo2.GetSolID() > 0L) { if (!list.Contains(nkSoldierInfo2.GetCharKind())) { if (nkSoldierInfo2.GetSolSubData(eType) <= 0L) { this.m_kSolList.Add(nkSoldierInfo2); } } } } foreach (NkSoldierInfo current2 in readySolList.GetList().Values) { if (current2.GetSolID() > 0L) { if (!list.Contains(current2.GetCharKind())) { if (current2.GetSolPosType() != 2) { if (current2.GetSolPosType() != 6) { if (current2.GetSolSubData(eType) <= 0L) { this.m_kSolList.Add(current2); } } } } } } } else if (Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_BABELTOWER || Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_GUILD_BOSS || Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_BOUNTYHUNT || Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_DAILYDUNGEON) { List <int> babelCharKind = Battle.BATTLE.BabelCharKind; if (babelCharKind == null) { return; } foreach (int current3 in babelCharKind) { list.Add(current3); } NkSoldierInfo[] kSolInfo3 = soldierList.m_kSolInfo; for (int k = 0; k < kSolInfo3.Length; k++) { NkSoldierInfo nkSoldierInfo3 = kSolInfo3[k]; if (nkSoldierInfo3.GetSolID() > 0L) { if (!list.Contains(nkSoldierInfo3.GetCharKind())) { this.m_kSolList.Add(nkSoldierInfo3); } } } foreach (NkSoldierInfo current4 in readySolList.GetList().Values) { if (current4.GetSolID() > 0L) { if (!list.Contains(current4.GetCharKind())) { if (current4.GetSolPosType() != 6) { this.m_kSolList.Add(current4); } } } } } else if (Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_MYTHRAID) { List <long> babelBattleSolList = Battle.BATTLE.BabelBattleSolList; if (babelBattleSolList == null) { return; } NkSoldierInfo[] kSolInfo4 = soldierList.m_kSolInfo; for (int l = 0; l < kSolInfo4.Length; l++) { NkSoldierInfo nkSoldierInfo4 = kSolInfo4[l]; if (nkSoldierInfo4.GetSolID() > 0L) { if (!babelBattleSolList.Contains(nkSoldierInfo4.GetSolID())) { if (!NrTSingleton <NkBattleCharManager> .Instance.IsSameKindSolInBattle(nkSoldierInfo4.GetCharKind())) { this.m_kSolList.Add(nkSoldierInfo4); } } } } foreach (NkSoldierInfo current5 in readySolList.GetList().Values) { if (current5.GetSolID() > 0L) { if (!babelBattleSolList.Contains(current5.GetSolID())) { if (!NrTSingleton <NkBattleCharManager> .Instance.IsSameKindSolInBattle(current5.GetCharKind())) { if (current5.GetSolPosType() != 6) { this.m_kSolList.Add(current5); } } } } } } else { NkSoldierInfo[] kSolInfo5 = soldierList.m_kSolInfo; for (int m = 0; m < kSolInfo5.Length; m++) { NkSoldierInfo nkSoldierInfo5 = kSolInfo5[m]; if (nkSoldierInfo5.GetSolID() > 0L) { list.Add(nkSoldierInfo5.GetCharKind()); } } foreach (NkSoldierInfo current6 in readySolList.GetList().Values) { if (!current6.IsInjuryStatus()) { if (current6.GetSolID() > 0L) { if (current6.GetSolPosType() != 6) { if (!list.Contains(current6.GetCharKind())) { this.m_kSolList.Add(current6); } } } } } } this.m_kSolList.Sort(new Comparison <NkSoldierInfo>(this.CompareCombatPower)); foreach (NkSoldierInfo current7 in this.m_kSolList) { if (!current7.IsInjuryStatus()) { if (current7.GetSolID() > 0L) { if (!this.IsMyMainHeroKind(current7.GetCharKind())) { if (!current7.IsSolStatus(4) || Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_MYTHRAID) { NewListItem newListItem = new NewListItem(this.m_nlSelectSoldierList.ColumnNum, true, string.Empty); newListItem.Data = current7.GetSolID(); NkListSolInfo nkListSolInfo = new NkListSolInfo(); nkListSolInfo.SolCharKind = current7.GetCharKind(); nkListSolInfo.SolGrade = (int)current7.GetGrade(); nkListSolInfo.SolLevel = current7.GetLevel(); nkListSolInfo.FightPower = current7.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_FIGHTINGPOWER); nkListSolInfo.ShowLevel = false; nkListSolInfo.SolCostumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(current7); if (NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(current7.GetCharKind()) != null) { nkListSolInfo.ShowCombat = true; EVENT_HERODATA eventHeroCharCode = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCharCode(current7.GetCharKind(), current7.GetGrade()); if (eventHeroCharCode != null) { newListItem.SetListItemData(0, "Win_I_EventSol", null, null, null); } else { UIBaseInfoLoader legendFrame = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendFrame(current7.GetCharKind(), (int)current7.GetGrade()); if (legendFrame != null) { newListItem.SetListItemData(0, legendFrame, null, null, null); } else { newListItem.SetListItemData(0, true); } } newListItem.SetListItemData(1, nkListSolInfo, current7, null, null); string empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1435"), "charname", current7.GetName() }); newListItem.SetListItemData(2, empty, null, null, null); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1031"), "count", current7.GetLevel() }); newListItem.SetListItemData(3, empty, null, null, null); this.m_nlSelectSoldierList.Add(newListItem); } } } } } } this.m_nlSelectSoldierList.RepositionItems(); }
public void _LinkSolDataInfiBattle() { int num = 0; this.m_lbSolList.Clear(); foreach (GS_BATTLE_RESULT_SOLDIER current in this.m_SolInfoList) { NewListItem newListItem = new NewListItem(this.m_lbSolList.ColumnNum, true, string.Empty); NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(current.CharKind); if (charKindInfo != null) { NkListSolInfo nkListSolInfo = new NkListSolInfo(); nkListSolInfo.SolCharKind = current.CharKind; nkListSolInfo.SolGrade = current.SolGrade; nkListSolInfo.SolInjuryStatus = current.bInjury; nkListSolInfo.SolLevel = current.i16Level; nkListSolInfo.ShowLevel = true; if (NrTSingleton <NrCharCostumeTableManager> .Instance.IsCostumeUniqueEqualSolKind(current.i32CostumeUnique, current.CharKind)) { nkListSolInfo.SolCostumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(current.i32CostumeUnique); } EVENT_HERODATA eventHeroCharCode = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCharCode(current.CharKind, (byte)current.SolGrade); Texture2D portraitLeaderSol = this.GetPortraitLeaderSol(current.CharKind); if (portraitLeaderSol != null) { newListItem.SetListItemData(1, portraitLeaderSol, null, null, null, null); } else { if (eventHeroCharCode != null) { newListItem.SetListItemData(0, "Win_I_EventSol", null, null, null); newListItem.EventMark = true; } else { UIBaseInfoLoader legendFrame = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendFrame(current.CharKind, current.SolGrade); if (legendFrame != null) { newListItem.SetListItemData(0, legendFrame, null, null, null); } } newListItem.SetListItemData(1, nkListSolInfo, null, null, null); } string text = string.Empty; if (NrTSingleton <NrCharKindInfoManager> .Instance.IsUserCharKind(current.CharKind)) { text = TKString.NEWString(this.m_InfiBattleInfo.strAttackName); } else { text = charKindInfo.GetName(); } string text2 = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("471"), "targetname", text, "count", current.i16Level }); short gradeMaxLevel = charKindInfo.GetGradeMaxLevel((short)((byte)current.SolGrade)); string str = string.Empty; if (gradeMaxLevel <= current.i16Level) { str = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("286"); } else { NrTSingleton <CTextParser> .Instance.ReplaceParam(ref str, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1802"), "exp", ANNUALIZED.Convert(current.i32AddExp) }); } text2 += "\r\n"; text2 += str; newListItem.SetListItemData(2, text2, null, null, null); this.m_lbSolList.Add(newListItem); this.m_lbSolList.RepositionItems(); num++; if (nkListSolInfo.SolInjuryStatus) { this.m_nInjurySolCount++; } } } }
public void MakeNPCInfo(AgitNPCData Data) { short agitLevel = NrTSingleton <NewGuildManager> .Instance.GetAgitLevel(); AgitInfoData agitData = NrTSingleton <NrBaseTableManager> .Instance.GetAgitData(agitLevel.ToString()); if (agitData == null) { return; } NrCharKindInfo charKindInfoFromCode = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfoFromCode(Data.strCharCode); if (charKindInfoFromCode == null) { return; } NkListSolInfo nkListSolInfo = new NkListSolInfo(); nkListSolInfo.SolCharKind = charKindInfoFromCode.GetCharKind(); nkListSolInfo.SolGrade = -1; nkListSolInfo.SolLevel = NrTSingleton <NewGuildManager> .Instance.GetAgitLevel(); NewListItem newListItem = new NewListItem(this.m_nlbInviteNPC.ColumnNum, true, string.Empty); newListItem.SetListItemData(0, ANNUALIZED.Convert(agitData.i32NPCCost), null, null, null); newListItem.SetListItemData(1, true); newListItem.SetListItemData(2, nkListSolInfo, null, null, null); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1435"), "charname", charKindInfoFromCode.GetName() }); newListItem.SetListItemData(3, this.m_strText, null, null, null); this.m_strText = string.Empty; int num = Data.i32LevelRate[(int)(agitLevel - 1)]; switch (Data.ui8NPCType) { case 2: this.m_strInfo = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2747"); num /= 100; break; case 3: this.m_strInfo = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2751"); num /= 100; break; case 4: this.m_strInfo = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2750"); num /= 100; break; case 5: this.m_strInfo = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2794"); break; } NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[] { this.m_strInfo, "count", num }); newListItem.SetListItemData(4, this.m_strText, null, null, null); newListItem.Data = Data; this.m_nlbInviteNPC.Add(newListItem); }
public NewListItem MakeFloorInfo(short floor) { short num = floor * 5; string text = string.Empty; string text2 = string.Empty; string text3 = string.Empty; NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo; string text4 = string.Empty; bool flag = false; if (floor % 2 == 0) { flag = true; } if (flag) { text4 = string.Format("Mobile/DLG/BabelTower/newlistbox_floor_columndata{0}", NrTSingleton <UIDataManager> .Instance.AddFilePath); } else { text4 = string.Format("Mobile/DLG/BabelTower/newlistbox_floor1_columndata{0}", NrTSingleton <UIDataManager> .Instance.AddFilePath); } this.m_lbFloor.SetColumnData(text4); NewListItem newListItem = new NewListItem(this.m_lbFloor.ColumnNum, true, string.Empty); newListItem.m_szColumnData = text4; if (!flag) { if (this.m_nFloorType == 2) { newListItem.SetListItemData(0, "UI/BabelTower/babel_hard_main1", true, null, null); } else { newListItem.SetListItemData(0, "UI/BabelTower/babel_main1", true, null, null); } } else if (this.m_nFloorType == 2) { newListItem.SetListItemData(0, "UI/BabelTower/babel_hard_main2", true, null, null); } else { newListItem.SetListItemData(0, "UI/BabelTower/babel_main2", true, null, null); } for (int i = 4; i >= 0; i--) { newListItem.SetListItemData(i * 6 + 6, false); newListItem.SetListItemData(i * 6 + 6 + 2, false); newListItem.SetListItemData(i * 6 + 6 + 4, false); newListItem.SetListItemData(i * 6 + 7, false); newListItem.SetListItemData(i * 6 + 7 + 2, false); newListItem.SetListItemData(i * 6 + 7 + 4, false); List <FRIEND_BABEL_CLEARINFO> babelFloor_FriendList = kMyCharInfo.m_kFriendInfo.GetBabelFloor_FriendList(num, this.m_nFloorType); if (babelFloor_FriendList != null) { for (int j = 0; j < 3; j++) { if (babelFloor_FriendList.Count >= j + 1) { USER_FRIEND_INFO friend = kMyCharInfo.m_kFriendInfo.GetFriend(babelFloor_FriendList[j].i64FriendPersonID); if (friend != null) { Texture2D friendTexture = kMyCharInfo.GetFriendTexture(babelFloor_FriendList[j].i64FriendPersonID); if (friendTexture == null) { NkListSolInfo nkListSolInfo = new NkListSolInfo(); nkListSolInfo.SolCharKind = friend.i32FaceCharKind; nkListSolInfo.SolGrade = -1; nkListSolInfo.SolLevel = friend.i16Level; nkListSolInfo.SolCostumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(friend.i32FaceCharCostumeUnique); newListItem.SetListItemData(i * 6 + 7 + j * 2, nkListSolInfo, num, new EZValueChangedDelegate(this.BtClickFloorFriendList), null); } else { newListItem.SetListItemData(i * 6 + 7 + j * 2, friendTexture, num, null, new EZValueChangedDelegate(this.BtClickFloorFriendList), null); } newListItem.SetListItemData(i * 6 + 6 + j * 2, !flag); newListItem.SetListItemData(i * 6 + 7 + j * 2, !flag); } } else { newListItem.SetListItemData(i * 6 + 6 + j * 2, false); newListItem.SetListItemData(i * 6 + 7 + j * 2, false); } } } else { newListItem.SetListItemData(i * 6 + 6, false); newListItem.SetListItemData(i * 6 + 6 + 2, false); newListItem.SetListItemData(i * 6 + 6 + 4, false); newListItem.SetListItemData(i * 6 + 7, false); newListItem.SetListItemData(i * 6 + 7 + 2, false); newListItem.SetListItemData(i * 6 + 7 + 4, false); } newListItem.SetListItemData(i + 36, false); newListItem.SetListItemData(i + 41, false); newListItem.SetListItemData(i + 5 + 41, false); if (num / 100 >= 1) { short num2 = num / 100; short num3 = num / 10 % 10; short num4 = num % 10; text = "Win_Number_" + num2; text2 = "Win_Number_" + num3; text3 = "Win_Number_" + num4; newListItem.SetListItemData(i + 6 + 41, true); newListItem.SetListItemData(i + 6 + 41, text, null, null, null); newListItem.SetListItemData(i + 41, true); newListItem.SetListItemData(i + 41, text2, null, null, null); newListItem.SetListItemData(i + 5 + 41, true); newListItem.SetListItemData(i + 5 + 41, text3, null, null, null); } else if (num / 10 <= 0 && num % 10 > 0) { text = "Win_Number_" + num; newListItem.SetListItemData(i + 36, true); newListItem.SetListItemData(i + 36, text, null, null, null); newListItem.SetListItemData(i + 6 + 41, false); } else { short num5 = num / 10; short num6 = num % 10; text = "Win_Number_" + num5; text2 = "Win_Number_" + num6; newListItem.SetListItemData(i + 41, true); newListItem.SetListItemData(i + 41, text, null, null, null); newListItem.SetListItemData(i + 5 + 41, true); newListItem.SetListItemData(i + 5 + 41, text2, null, null, null); if (num6 == 0) { newListItem.SetListItemData(i + 6 + 41, false); } } if (num >= 9) { newListItem.SetListItemData(50, true); } byte babelFloorRankInfo = kMyCharInfo.GetBabelFloorRankInfo(num, this.m_nFloorType); bool treasure = kMyCharInfo.IsBabelTreasure(num, this.m_nFloorType); UIBaseInfoLoader loader = NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary(NrTSingleton <BabelTowerManager> .Instance.GetBabelRankImgText(babelFloorRankInfo, treasure)); newListItem.SetListItemData(i + 1, loader, num, new EZValueChangedDelegate(this.BtClickFloor), null); num -= 1; } return(newListItem); }