From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../Assets/Scripts/XMainClient/Team/XTeamRift.cs | 75 ++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/Team/XTeamRift.cs (limited to 'Client/Assets/Scripts/XMainClient/Team/XTeamRift.cs') diff --git a/Client/Assets/Scripts/XMainClient/Team/XTeamRift.cs b/Client/Assets/Scripts/XMainClient/Team/XTeamRift.cs new file mode 100644 index 00000000..58c148f6 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/Team/XTeamRift.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using KKSG; +using UILib; +using UnityEngine; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class XTeamRift : XDataBase + { + public uint id; + + public int floor; + + public uint sceneID; + + public List buffs = new List(); + + public void SetData(TeamSynRift riftInfo, ExpeditionTable.RowData rowData) + { + bool flag = riftInfo == null; + if (!flag) + { + bool flag2 = riftInfo.floorinfo == null; + if (flag2) + { + XSingleton.singleton.AddErrorLog("floorinfo is null, while riftid == ", riftInfo.riftid.ToString(), null, null, null, null); + } + else + { + this.id = riftInfo.riftid; + this.floor = riftInfo.floorinfo.floor; + this.sceneID = riftInfo.floorinfo.sceneid; + this.buffs.Clear(); + for (int i = 0; i < riftInfo.floorinfo.buffs.Count; i++) + { + MapIntItem mapIntItem = riftInfo.floorinfo.buffs[i]; + BuffDesc item = default(BuffDesc); + item.BuffID = (int)mapIntItem.key; + item.BuffLevel = (int)mapIntItem.value; + this.buffs.Add(item); + } + } + } + } + + public override void Recycle() + { + base.Recycle(); + this.id = 0u; + this.floor = 0; + this.sceneID = 0u; + this.buffs.Clear(); + } + + public void SetUI(GameObject go) + { + IXUILabel ixuilabel = go.transform.Find("Floor").GetComponent("XUILabel") as IXUILabel; + ixuilabel.SetText(XStringDefineProxy.GetString("TEAMTOWER_LEVEL", new object[] + { + this.floor.ToString() + })); + } + + public string GetSceneName(string originName) + { + return XStringDefineProxy.GetString("SCENE_NAME_WITH_RIFT_FLOOR", new object[] + { + originName, + this.floor.ToString() + }); + } + } +} -- cgit v1.1-26-g67d0