From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../Scripts/XMainClient/XGVGCombatGroupData.cs | 117 +++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/XGVGCombatGroupData.cs (limited to 'Client/Assets/Scripts/XMainClient/XGVGCombatGroupData.cs') diff --git a/Client/Assets/Scripts/XMainClient/XGVGCombatGroupData.cs b/Client/Assets/Scripts/XMainClient/XGVGCombatGroupData.cs new file mode 100644 index 00000000..ad869b39 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/XGVGCombatGroupData.cs @@ -0,0 +1,117 @@ +using System; +using KKSG; + +namespace XMainClient +{ + internal class XGVGCombatGroupData + { + public uint RoomID + { + get + { + return this._roomID; + } + } + + public ulong GuildOneID + { + get + { + return this._guildOneID; + } + } + + public ulong GuildTwoID + { + get + { + return this._guildTwoID; + } + } + + public ulong WinnerID + { + get + { + return this._winerID; + } + } + + public uint WatchID + { + get + { + return this._roomWatchID; + } + } + + public CrossGvgRoomState RoomState + { + get + { + return this._roomState; + } + } + + public XGuildBasicData GuildOne + { + get + { + return this._GuildOne; + } + } + + public XGuildBasicData GuildTwo + { + get + { + return this._GuildTwo; + } + } + + public XGuildBasicData Winner + { + get + { + return this._Winner; + } + } + + private uint _roomID; + + private ulong _guildOneID; + + private ulong _guildTwoID; + + private ulong _winerID; + + private CrossGvgRoomState _roomState; + + private uint _roomWatchID; + + private XGuildBasicData _GuildOne = null; + + private XGuildBasicData _GuildTwo = null; + + private XGuildBasicData _Winner = null; + + public void Convert(CrossGvgRoomInfo info) + { + this._roomID = info.roomid; + this._guildOneID = info.guild1; + this._guildTwoID = info.guild2; + this._winerID = info.winguildid; + this._roomWatchID = info.liveid; + this._roomState = info.state; + XCrossGVGDocument specificDocument = XDocuments.GetSpecificDocument(XCrossGVGDocument.uuID); + this._GuildOne = specificDocument.GetGVGGuildInfo(info.guild1); + this._GuildTwo = specificDocument.GetGVGGuildInfo(info.guild2); + this._Winner = specificDocument.GetGVGGuildInfo(info.winguildid); + } + + public bool InCombatGroup(ulong guildID) + { + return this._guildOneID == guildID || this._guildTwoID == guildID; + } + } +} -- cgit v1.1-26-g67d0