diff options
author | chai <chaifix@163.com> | 2021-01-25 14:28:30 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-01-25 14:28:30 +0800 |
commit | 6eb915c129fc90c6f4c82ae097dd6ffad5239efc (patch) | |
tree | 7dd2be50edf41f36b60fac84696e731c13afe617 /Client/Assets/Scripts/XMainClient/WorldBoss |
+scripts
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/WorldBoss')
18 files changed, 848 insertions, 0 deletions
diff --git a/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossBehaviour.cs b/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossBehaviour.cs new file mode 100644 index 00000000..059f34ec --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossBehaviour.cs @@ -0,0 +1,105 @@ +using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient
+{
+ internal class XWorldBossBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton m_BtnClose;
+
+ public IXUIButton m_BtnGoBattle;
+
+ public IXUIButton m_BtnSubscribe;
+
+ public IXUIButton m_BtnCancelSubscribe;
+
+ public IXUILabel m_LeftTime;
+
+ public IXUILabel m_LeftTimeHint;
+
+ public IXUILabel m_BossName;
+
+ public IXUILabel m_OpenTime;
+
+ public IXUIWrapContent m_WrapContent;
+
+ public IXUIScrollView m_ScrollView;
+
+ public IXUIWrapContent m_AwardWrapContent;
+
+ public IXUIScrollView m_AwardScrollView;
+
+ public GameObject m_RankPanel;
+
+ public IXUILabel m_RankPanel_EmptyRank;
+
+ public IXUIButton m_BtnReward;
+
+ public GameObject m_RewardPanel;
+
+ public IXUIButton m_BtnRewardPanelClose;
+
+ public IXUIList m_DropAward;
+
+ public XUIPool m_DropAwardPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public IXUILabel m_AwardTip;
+
+ public IXUITexture m_BossTexture;
+
+ public IXUICheckBox m_GuildRankTab;
+
+ public IXUICheckBox m_DamageRankTab;
+
+ public IXUISprite m_PrivilegeIcon;
+
+ public IXUILabel m_PrivilegeName;
+
+ public IXUISprite m_Privilege;
+
+ private void Awake()
+ {
+ this.m_BtnClose = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnGoBattle = (base.transform.Find("Bg/Frame/GoBattle").GetComponent("XUIButton") as IXUIButton);
+ Transform transform = base.transform.Find("Bg/GuildRankPanel/ScrollView");
+ this.m_ScrollView = (transform.GetComponent("XUIScrollView") as IXUIScrollView);
+ transform = transform.Find("WrapContent");
+ this.m_WrapContent = (transform.GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_RankPanel = base.transform.Find("Bg/GuildRankPanel").gameObject;
+ this.m_RankPanel_EmptyRank = (base.transform.Find("Bg/GuildRankPanel/EmptyRank").GetComponent("XUILabel") as IXUILabel);
+ GameObject gameObject = this.m_RankPanel.transform.Find("RankTpl").gameObject;
+ GameObject gameObject2 = this.m_RankPanel.transform.Find("OutOfRange").gameObject;
+ gameObject.gameObject.SetActive(false);
+ gameObject2.gameObject.SetActive(false);
+ this.m_RankPanel_EmptyRank.gameObject.SetActive(false);
+ this.m_OpenTime = (base.transform.Find("Bg/Frame/LeftTime/sk").GetComponent("XUILabel") as IXUILabel);
+ this.m_LeftTime = (base.transform.Find("Bg/Frame/LeftTime/Value").GetComponent("XUILabel") as IXUILabel);
+ this.m_LeftTimeHint = (base.transform.Find("Bg/Frame/LeftTime/Over").GetComponent("XUILabel") as IXUILabel);
+ this.m_BossName = (base.transform.Find("Bg/Frame/LeftTime/12").GetComponent("XUILabel") as IXUILabel);
+ this.m_LeftTime.SetText("");
+ this.m_LeftTimeHint.SetText("");
+ this.m_OpenTime.SetText("");
+ this.m_BossName.SetText("");
+ this.m_RewardPanel = base.transform.Find("Bg/Frame/RewardDlg").gameObject;
+ this.m_BtnReward = (base.transform.Find("Bg/Frame/AwardDetail").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnRewardPanelClose = (base.transform.Find("Bg/Frame/RewardDlg/Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_DropAward = (base.transform.Find("Bg/Frame/DropFrame/Grid").GetComponent("XUIList") as IXUIList);
+ Transform transform2 = this.m_DropAward.gameObject.transform.Find("ItemTpl");
+ this.m_DropAwardPool.SetupPool(transform2.parent.parent.gameObject, transform2.gameObject, 6u, false);
+ this.m_AwardScrollView = (base.transform.Find("Bg/Frame/RewardDlg/Bg/Bg/ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_AwardWrapContent = (this.m_AwardScrollView.gameObject.transform.Find("AwardList").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_AwardTip = (base.transform.Find("Bg/Frame/RewardDlg/Bg/Bg/Tip").GetComponent("XUILabel") as IXUILabel);
+ this.m_BossTexture = (base.transform.Find("Bg/Frame/BossTexture").GetComponent("XUITexture") as IXUITexture);
+ this.m_GuildRankTab = (base.transform.Find("Bg/GuildRankPanel/TabTpl/ToggleGuild").GetComponent("XUICheckBox") as IXUICheckBox);
+ this.m_DamageRankTab = (base.transform.Find("Bg/GuildRankPanel/TabTpl/ToggleFriend").GetComponent("XUICheckBox") as IXUICheckBox);
+ this.m_BtnSubscribe = (base.transform.Find("Bg/Frame/Subscribe").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnCancelSubscribe = (base.transform.Find("Bg/Frame/UnSubscribe").GetComponent("XUIButton") as IXUIButton);
+ this.m_PrivilegeIcon = (base.transform.Find("Bg/tq").GetComponent("XUISprite") as IXUISprite);
+ this.m_PrivilegeName = (base.transform.Find("Bg/tq/t").GetComponent("XUILabel") as IXUILabel);
+ this.m_Privilege = (base.transform.Find("Bg/tq/p").GetComponent("XUISprite") as IXUISprite);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossBehaviour.cs.meta new file mode 100644 index 00000000..4f3bab4d --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossBehaviour.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 45d36df9784ca5846a4f8eecd1551317 +timeCreated: 1611403648 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossDamageRankInfo.cs b/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossDamageRankInfo.cs new file mode 100644 index 00000000..ab5b5de0 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossDamageRankInfo.cs @@ -0,0 +1,22 @@ +using System;
+using KKSG;
+
+namespace XMainClient
+{
+ public class XWorldBossDamageRankInfo : XBaseRankInfo
+ {
+ public float damage;
+
+ public uint profession;
+
+ public override void ProcessData(RankData data)
+ {
+ this.name = data.RoleName;
+ this.formatname = XTitleDocument.GetTitleWithFormat(data.titleID, data.RoleName);
+ this.id = data.RoleId;
+ this.rank = data.Rank;
+ this.damage = data.damage;
+ this.profession = data.profession;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossDamageRankInfo.cs.meta b/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossDamageRankInfo.cs.meta new file mode 100644 index 00000000..22386a35 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossDamageRankInfo.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 40f271aa6df77564a9d6902ce5c7c53d +timeCreated: 1611403615 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossDamageRankList.cs b/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossDamageRankList.cs new file mode 100644 index 00000000..d66328d9 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossDamageRankList.cs @@ -0,0 +1,17 @@ +using System;
+
+namespace XMainClient
+{
+ public class XWorldBossDamageRankList : XBaseRankList
+ {
+ public XWorldBossDamageRankList()
+ {
+ this.type = XRankType.WorldBossDamageRank;
+ }
+
+ public override XBaseRankInfo CreateNewInfo()
+ {
+ return new XWorldBossDamageRankInfo();
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossDamageRankList.cs.meta b/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossDamageRankList.cs.meta new file mode 100644 index 00000000..23ecc97d --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossDamageRankList.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 480447ecb98abd64d80a172464957b46 +timeCreated: 1611403656 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossDocument.cs b/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossDocument.cs new file mode 100644 index 00000000..c1324fff --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossDocument.cs @@ -0,0 +1,477 @@ +using System;
+using System.Collections.Generic;
+using KKSG;
+using UnityEngine;
+using XMainClient.UI;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient
+{
+ internal class XWorldBossDocument : XDocComponent, IWorldBossBattleSource, IRankSource
+ {
+ public override uint ID
+ {
+ get
+ {
+ return XWorldBossDocument.uuID;
+ }
+ }
+
+ public List<WorldBossDamageInfo> EndListDamage
+ {
+ get
+ {
+ return this._EndListDamage;
+ }
+ }
+
+ public uint EncourageCount
+ {
+ get
+ {
+ return this._EncourageCount;
+ }
+ }
+
+ public uint EncourgeGuildCount
+ {
+ get
+ {
+ return this._EncourgeGuildCount;
+ }
+ }
+
+ public XWorldBossDamageRankList DamageRankList
+ {
+ get
+ {
+ return this._DamageRankList;
+ }
+ }
+
+ public XWorldBossGuildRankList GuildRankList
+ {
+ get
+ {
+ return this._GuildRankList;
+ }
+ }
+
+ public XWorldBossGuildRoleRankList GuildRoleRankList
+ {
+ get
+ {
+ return this._GuildRoleRankList;
+ }
+ }
+
+ public new static readonly uint uuID = XSingleton<XCommon>.singleton.XHash("WorldBossDocument");
+
+ public ActivityWorldBossHandler ActivityWorldBossView;
+
+ public XWorldBossDamageRankHandler RankHandler;
+
+ public BattleWorldBossHandler BattleHandler;
+
+ public XWorldBossView WorldBossDescView;
+
+ public XWorldBossResultView WorldBossResultView;
+
+ public XWorldBossEndRankView WorldBossEndRankView;
+
+ private uint _BossHP;
+
+ private bool _WorldBossEnd = false;
+
+ private List<WorldBossDamageInfo> _EndListDamage = new List<WorldBossDamageInfo>();
+
+ private uint _EncourageCount = 0u;
+
+ private uint _EncourgeGuildCount = 0u;
+
+ private XWorldBossDamageRankList _DamageRankList = new XWorldBossDamageRankList();
+
+ private XWorldBossGuildRankList _GuildRankList = new XWorldBossGuildRankList();
+
+ private XWorldBossGuildRoleRankList _GuildRoleRankList = new XWorldBossGuildRoleRankList();
+
+ public static XTableAsyncLoader AsyncLoader = new XTableAsyncLoader();
+
+ public static WorldBossRewardTable WorldBossAwardTable = new WorldBossRewardTable();
+
+ public bool MainInterfaceState = false;
+
+ private float fCdTime = 0f;
+
+ public static void Execute(OnLoadedCallback callback = null)
+ {
+ XWorldBossDocument.AsyncLoader.AddTask("Table/WorldBossReward", XWorldBossDocument.WorldBossAwardTable, false);
+ XWorldBossDocument.AsyncLoader.Execute(callback);
+ }
+
+ public uint GetWorldBossSceneID()
+ {
+ return (uint)XSingleton<XGlobalConfig>.singleton.GetInt("WorldBossSceneID");
+ }
+
+ public uint GetEncourageCount(int index)
+ {
+ bool flag = index == 0;
+ uint result;
+ if (flag)
+ {
+ result = this._EncourageCount;
+ }
+ else
+ {
+ bool flag2 = index == 1;
+ if (flag2)
+ {
+ result = this._EncourgeGuildCount;
+ }
+ else
+ {
+ result = 0u;
+ }
+ }
+ return result;
+ }
+
+ public override void OnEnterSceneFinally()
+ {
+ base.OnEnterSceneFinally();
+ bool flag = XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_WORLDBOSS;
+ if (flag)
+ {
+ this.BattleHandler.RefreshAllEnacourage();
+ }
+ }
+
+ public override void OnLeaveScene()
+ {
+ base.OnLeaveScene();
+ bool worldBossEnd = this._WorldBossEnd;
+ if (worldBossEnd)
+ {
+ this._WorldBossEnd = false;
+ }
+ }
+
+ public void SetMainInterfaceBtnState(bool state)
+ {
+ this.MainInterfaceState = state;
+ bool flag = DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton.IsVisible();
+ if (flag)
+ {
+ DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton.RefreshH5ButtonState(XSysDefine.XSys_Rank_WorldBoss, true);
+ }
+ }
+
+ public void ReqWorldBossState()
+ {
+ RpcC2M_GetWorldBossStateNew rpcC2M_GetWorldBossStateNew = new RpcC2M_GetWorldBossStateNew();
+ rpcC2M_GetWorldBossStateNew.oArg.type = 0u;
+ XSingleton<XClientNetwork>.singleton.Send(rpcC2M_GetWorldBossStateNew);
+ }
+
+ public void OnGetWorldBossLeftState(GetWorldBossStateRes oRes)
+ {
+ bool flag = this.ActivityWorldBossView != null && this.ActivityWorldBossView.active;
+ if (flag)
+ {
+ this.ActivityWorldBossView.SetLeftTime(oRes.TimeLeft);
+ }
+ bool flag2 = this.WorldBossDescView != null && this.WorldBossDescView.IsVisible();
+ if (flag2)
+ {
+ this.WorldBossDescView.SetLeftTime(oRes.TimeLeft, oRes.BossHp);
+ this.WorldBossDescView.ShowCurrentBoss(oRes.BossId);
+ }
+ this._BossHP = oRes.BossHp;
+ }
+
+ public void ReqEnterWorldBossScene()
+ {
+ bool flag = Time.realtimeSinceStartup - this.fCdTime < 1f;
+ if (!flag)
+ {
+ this._WorldBossEnd = false;
+ PtcC2G_EnterSceneReq ptcC2G_EnterSceneReq = new PtcC2G_EnterSceneReq();
+ ptcC2G_EnterSceneReq.Data.sceneID = this.GetWorldBossSceneID();
+ XSingleton<XClientNetwork>.singleton.Send(ptcC2G_EnterSceneReq);
+ this.fCdTime = Time.realtimeSinceStartup;
+ }
+ }
+
+ public void ReqRankData(RankeType type, bool inFight)
+ {
+ RpcC2M_ClientQueryRankListNtf rpcC2M_ClientQueryRankListNtf = new RpcC2M_ClientQueryRankListNtf();
+ rpcC2M_ClientQueryRankListNtf.oArg.RankType = (uint)XFastEnumIntEqualityComparer<RankeType>.ToInt(type);
+ rpcC2M_ClientQueryRankListNtf.oArg.TimeStamp = 1u;
+ rpcC2M_ClientQueryRankListNtf.oArg.sendPunishData = (inFight ? 1u : 0u);
+ XSingleton<XClientNetwork>.singleton.Send(rpcC2M_ClientQueryRankListNtf);
+ }
+
+ public void OnGetLatestRankInfo(ClientQueryRankListRes oRes)
+ {
+ bool flag = oRes.ErrorCode > ErrorCode.ERR_SUCCESS;
+ if (!flag)
+ {
+ RankeType rankType = (RankeType)oRes.RankType;
+ bool flag2 = rankType == RankeType.WorldBossGuildRank;
+ if (flag2)
+ {
+ this._GuildRankList.timeStamp = oRes.TimeStamp;
+ XRankDocument.ProcessRankListData(oRes.RankList, this._GuildRankList);
+ XRankDocument.ProcessSelfRankData(oRes, this._GuildRankList);
+ }
+ else
+ {
+ bool flag3 = rankType == RankeType.WorldBossDamageRank;
+ if (flag3)
+ {
+ this._DamageRankList.timeStamp = oRes.TimeStamp;
+ XRankDocument.ProcessRankListData(oRes.RankList, this._DamageRankList);
+ XRankDocument.ProcessSelfRankData(oRes, this._DamageRankList);
+ }
+ else
+ {
+ bool flag4 = rankType == RankeType.WorldBossGuildRoleRank;
+ if (flag4)
+ {
+ this._GuildRoleRankList.timeStamp = oRes.TimeStamp;
+ XRankDocument.ProcessRankListData(oRes.RankList, this._GuildRoleRankList);
+ XRankDocument.ProcessSelfRankData(oRes, this._GuildRoleRankList);
+ }
+ }
+ }
+ bool flag5 = this.RankHandler != null && this.RankHandler.PanelObject != null && this.RankHandler.IsVisible();
+ if (flag5)
+ {
+ this.RankHandler.RefreshPage();
+ }
+ bool flag6 = this.WorldBossDescView != null && this.WorldBossDescView.IsVisible();
+ if (flag6)
+ {
+ this.WorldBossDescView.RefreshDamageRank();
+ this.WorldBossDescView.SetMyRankFrame();
+ }
+ bool flag7 = rankType == RankeType.WorldBossGuildRank && this.WorldBossEndRankView != null && this.WorldBossEndRankView.IsVisible();
+ if (flag7)
+ {
+ this.WorldBossEndRankView.RefreshGuildRank();
+ this.WorldBossEndRankView.SetMyRankFrame();
+ }
+ }
+ }
+
+ public XBaseRankList GetRankList(RankeType type)
+ {
+ bool flag = type == RankeType.WorldBossGuildRank;
+ XBaseRankList result;
+ if (flag)
+ {
+ result = this._GuildRankList;
+ }
+ else
+ {
+ bool flag2 = type == RankeType.WorldBossGuildRoleRank;
+ if (flag2)
+ {
+ result = this._GuildRoleRankList;
+ }
+ else
+ {
+ result = this._DamageRankList;
+ }
+ }
+ return result;
+ }
+
+ public void ReqBattleInfo()
+ {
+ RpcC2M_GetWorldBossTimeLeft rpc = new RpcC2M_GetWorldBossTimeLeft();
+ XSingleton<XClientNetwork>.singleton.Send(rpc);
+ }
+
+ public void OnGetBattleInfo(GetWorldBossTimeLeftRes oRes)
+ {
+ bool flag = this.BattleHandler != null && this.BattleHandler.active;
+ if (flag)
+ {
+ this.BattleHandler.SetLeftTime(oRes.timeleft);
+ }
+ bool flag2 = this.RankHandler != null && this.RankHandler.active;
+ if (flag2)
+ {
+ this.RankHandler.SetGuildMemberCount(oRes.guildrolecount);
+ }
+ }
+
+ public void OnGetAttrCount(WorldBossAttrNtf ntf)
+ {
+ this._EncourageCount = ntf.count;
+ }
+
+ public void ReqEncourageTwo()
+ {
+ XSingleton<XDebug>.singleton.AddGreenLog("ReqEncourageTwo", null, null, null, null, null);
+ RpcC2M_WorldBossGuildAddAttr rpcC2M_WorldBossGuildAddAttr = new RpcC2M_WorldBossGuildAddAttr();
+ rpcC2M_WorldBossGuildAddAttr.oArg.count = this._EncourgeGuildCount;
+ XSingleton<XClientNetwork>.singleton.Send(rpcC2M_WorldBossGuildAddAttr);
+ }
+
+ public void OnGetEncourageTwo(WorldBossGuildAddAttrArg arg, WorldBossGuildAddAttrRes oRes)
+ {
+ XSingleton<XDebug>.singleton.AddGreenLog("OnGetEncourageTwo", null, null, null, null, null);
+ bool flag = oRes.errorcode > ErrorCode.ERR_SUCCESS;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(oRes.errorcode, "fece00");
+ }
+ }
+
+ public void ReceiveGuildAttAttrSync(WorldBossGuildAddAttrSyncClient ntf)
+ {
+ XSingleton<XDebug>.singleton.AddGreenLog("ReceiveGuildAttAttrSync:" + ntf.count.ToString(), null, null, null, null, null);
+ this._EncourgeGuildCount = ntf.count;
+ this.BattleHandler.RefreshEncourage(1);
+ }
+
+ public void ReqEncourage()
+ {
+ XSingleton<XDebug>.singleton.AddGreenLog("ReqEncourage", null, null, null, null, null);
+ RpcC2G_AddTempAttr rpcC2G_AddTempAttr = new RpcC2G_AddTempAttr();
+ rpcC2G_AddTempAttr.oArg.type = 0u;
+ XSingleton<XClientNetwork>.singleton.Send(rpcC2G_AddTempAttr);
+ }
+
+ public void OnGetEncourage(AddTempAttrRes oRes)
+ {
+ bool flag = oRes.ErrorCode > ErrorCode.ERR_SUCCESS;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(oRes.ErrorCode, "fece00");
+ }
+ else
+ {
+ this._EncourageCount = oRes.count;
+ this.BattleHandler.RefreshEncourage(0);
+ }
+ }
+
+ public List<WorldBossRewardTable.RowData> GetAwardList(uint roleLevel)
+ {
+ List<WorldBossRewardTable.RowData> list = new List<WorldBossRewardTable.RowData>();
+ WorldBossRewardTable.RowData[] table = XWorldBossDocument.WorldBossAwardTable.Table;
+ int num = 0;
+ for (int i = 0; i < table.Length; i++)
+ {
+ WorldBossRewardTable.RowData rowData = table[i];
+ bool flag = (ulong)roleLevel >= (ulong)((long)rowData.Level);
+ if (flag)
+ {
+ num = i;
+ }
+ }
+ for (int j = 0; j < table.Length; j++)
+ {
+ bool flag2 = table[j].Level == table[num].Level;
+ if (flag2)
+ {
+ list.Add(table[j]);
+ }
+ }
+ return list;
+ }
+
+ public WorldBossRewardTable.RowData GetDropReward(uint roleLevel)
+ {
+ WorldBossRewardTable.RowData[] table = XWorldBossDocument.WorldBossAwardTable.Table;
+ int num = 0;
+ for (int i = 0; i < table.Length; i++)
+ {
+ WorldBossRewardTable.RowData rowData = table[i];
+ bool flag = (ulong)roleLevel >= (ulong)((long)rowData.Level);
+ if (flag)
+ {
+ num = i;
+ }
+ }
+ for (int j = 0; j < table.Length; j++)
+ {
+ bool flag2 = table[j].Level == table[num].Level;
+ if (flag2)
+ {
+ return table[j];
+ }
+ }
+ return null;
+ }
+
+ public void OnWorldBossStateNtf(WorldBossStateNtf stateInfo)
+ {
+ bool flag = stateInfo.state == WorldBossState.WorldBoss_WaitEnd;
+ if (flag)
+ {
+ this._WorldBossEnd = true;
+ DlgBase<XWorldBossResultView, GuildDragonChallengeResultBehaviour>.singleton.ShowResult(stateInfo.iswin);
+ }
+ }
+
+ public void ReqQutiScene()
+ {
+ XSingleton<XScene>.singleton.ReqLeaveScene();
+ }
+
+ public void GetWorldBossTime(ref int startTime, ref int endTime)
+ {
+ XActivityDocument doc = XActivityDocument.Doc;
+ for (int i = 0; i < doc.MulActivityTable.Table.Length; i++)
+ {
+ bool flag = doc.MulActivityTable.Table[i].SystemID == XFastEnumIntEqualityComparer<XSysDefine>.ToInt(XSysDefine.XSys_Activity_WorldBoss);
+ if (flag)
+ {
+ SeqListRef<uint> openDayTime = doc.MulActivityTable.Table[i].OpenDayTime;
+ bool flag2 = openDayTime.Count > 0;
+ if (flag2)
+ {
+ startTime = (int)openDayTime[0, 0];
+ endTime = (int)openDayTime[0, 1];
+ }
+ }
+ }
+ }
+
+ public void ReqWorldBossEnd()
+ {
+ RpcC2M_WorldBossEnd rpc = new RpcC2M_WorldBossEnd();
+ XSingleton<XClientNetwork>.singleton.Send(rpc);
+ }
+
+ public void OnWorldBossEnd(WorldBossEndArg oArg, WorldBossEndRes oRes)
+ {
+ this._EndListDamage = oRes.damages;
+ bool flag = this.WorldBossEndRankView != null && this.WorldBossEndRankView.IsVisible();
+ if (flag)
+ {
+ this.WorldBossEndRankView.RefreshDamageRank();
+ this.WorldBossEndRankView.SetMyRankFrame(oRes.selfdamage);
+ }
+ }
+
+ public void LeaveSceneCountDown(uint time)
+ {
+ bool flag = this.BattleHandler != null && this.BattleHandler.IsVisible();
+ if (flag)
+ {
+ this.BattleHandler.OnLeaveSceneCountDown(time);
+ }
+ }
+
+ protected override void OnReconnected(XReconnectedEventArgs arg)
+ {
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossDocument.cs.meta b/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossDocument.cs.meta new file mode 100644 index 00000000..182093da --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossDocument.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 47c7b0f0856618349abc69583aabf240 +timeCreated: 1611403655 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossEndRankBehaviour.cs b/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossEndRankBehaviour.cs new file mode 100644 index 00000000..0d3651aa --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossEndRankBehaviour.cs @@ -0,0 +1,50 @@ +using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient
+{
+ internal class XWorldBossEndRankBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton m_BtnClose;
+
+ public IXUIButton m_BtnGoReward;
+
+ public IXUIWrapContent m_WrapContent;
+
+ public IXUIScrollView m_ScrollView;
+
+ public GameObject m_RankPanel;
+
+ public IXUILabel m_RankPanel_EmptyRank;
+
+ public GameObject m_MyRank;
+
+ public GameObject m_MyOutOfRange;
+
+ public IXUICheckBox m_GuildRankTab;
+
+ public IXUICheckBox m_DamageRankTab;
+
+ public IXUILabel m_RankTitle;
+
+ private void Awake()
+ {
+ this.m_BtnClose = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnGoReward = (base.transform.Find("Bg/BtnStart").GetComponent("XUIButton") as IXUIButton);
+ this.m_ScrollView = (base.transform.Find("Bg/Bg/Panel").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_WrapContent = (base.transform.Find("Bg/Bg/Panel/BaseList").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_RankPanel = base.transform.Find("Bg/Bg/Panel").gameObject;
+ this.m_RankPanel_EmptyRank = (base.transform.Find("Bg/Bg/Panel/EmptyRank").GetComponent("XUILabel") as IXUILabel);
+ this.m_MyRank = base.transform.Find("Bg/Bg/RankTpl").gameObject;
+ this.m_MyOutOfRange = base.transform.Find("Bg/Bg/OutOfRange").gameObject;
+ this.m_MyRank.SetActive(false);
+ this.m_MyOutOfRange.SetActive(false);
+ this.m_RankPanel_EmptyRank.gameObject.SetActive(false);
+ this.m_GuildRankTab = (base.transform.Find("Bg/TabTpl/ToggleGuild").GetComponent("XUICheckBox") as IXUICheckBox);
+ this.m_DamageRankTab = (base.transform.Find("Bg/TabTpl/ToggleFriend").GetComponent("XUICheckBox") as IXUICheckBox);
+ this.m_RankTitle = (base.transform.Find("Bg/Bg/Titles/BaseList/Name").GetComponent("XUILabel") as IXUILabel);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossEndRankBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossEndRankBehaviour.cs.meta new file mode 100644 index 00000000..aa2751b5 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossEndRankBehaviour.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 3ad78552b3045444b82a7878d83aee5f +timeCreated: 1611403597 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossGuildRankInfo.cs b/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossGuildRankInfo.cs new file mode 100644 index 00000000..4876324f --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossGuildRankInfo.cs @@ -0,0 +1,17 @@ +using System;
+using KKSG;
+
+namespace XMainClient
+{
+ public class XWorldBossGuildRankInfo : XBaseRankInfo
+ {
+ public float damage;
+
+ public override void ProcessData(RankData data)
+ {
+ this.name = data.RoleName;
+ this.rank = data.Rank;
+ this.damage = data.damage;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossGuildRankInfo.cs.meta b/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossGuildRankInfo.cs.meta new file mode 100644 index 00000000..0c9cda51 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossGuildRankInfo.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 490b8cb0289e8f247b2a2f028a306dd5 +timeCreated: 1611403660 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossGuildRankList.cs b/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossGuildRankList.cs new file mode 100644 index 00000000..10b4fbb0 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossGuildRankList.cs @@ -0,0 +1,17 @@ +using System;
+
+namespace XMainClient
+{
+ public class XWorldBossGuildRankList : XBaseRankList
+ {
+ public XWorldBossGuildRankList()
+ {
+ this.type = XRankType.WorldBossGuildRank;
+ }
+
+ public override XBaseRankInfo CreateNewInfo()
+ {
+ return new XWorldBossGuildRankInfo();
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossGuildRankList.cs.meta b/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossGuildRankList.cs.meta new file mode 100644 index 00000000..16222c2a --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossGuildRankList.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f2475da8eb6daa7409b470bc1cdb4f22 +timeCreated: 1611404842 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossGuildRoleRankInfo.cs b/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossGuildRoleRankInfo.cs new file mode 100644 index 00000000..ab625299 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossGuildRoleRankInfo.cs @@ -0,0 +1,18 @@ +using System;
+using KKSG;
+
+namespace XMainClient
+{
+ public class XWorldBossGuildRoleRankInfo : XBaseRankInfo
+ {
+ public float damage;
+
+ public override void ProcessData(RankData data)
+ {
+ this.name = data.RoleName;
+ this.rank = data.Rank;
+ this.damage = data.damage;
+ this.id = data.RoleId;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossGuildRoleRankInfo.cs.meta b/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossGuildRoleRankInfo.cs.meta new file mode 100644 index 00000000..d654a0ab --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossGuildRoleRankInfo.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: cb77a933f2d81394fb691a56737a4230 +timeCreated: 1611404546 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossGuildRoleRankList.cs b/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossGuildRoleRankList.cs new file mode 100644 index 00000000..e4714303 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossGuildRoleRankList.cs @@ -0,0 +1,17 @@ +using System;
+
+namespace XMainClient
+{
+ public class XWorldBossGuildRoleRankList : XBaseRankList
+ {
+ public XWorldBossGuildRoleRankList()
+ {
+ this.type = XRankType.WorldBossGuildRoleRank;
+ }
+
+ public override XBaseRankInfo CreateNewInfo()
+ {
+ return new XWorldBossGuildRoleRankInfo();
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossGuildRoleRankList.cs.meta b/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossGuildRoleRankList.cs.meta new file mode 100644 index 00000000..63cbc998 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/WorldBoss/XWorldBossGuildRoleRankList.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 15fd7f29106cced4aba7deb8b1623ab6 +timeCreated: 1611403267 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: |