mirror of
https://github.com/rafi1212122/PemukulPaku
synced 2025-12-13 10:44:33 +01:00
LeShite abyss
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
using Common.Utils.ExcelReader;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace PemukulPaku.GameServer.Commands
|
||||
namespace Common.Utils.ExcelReader
|
||||
{
|
||||
internal class ExBossMonsterData : BaseExcelReader<ExBossMonsterData, ExBossMonsterDataExcel>
|
||||
public class ExBossMonsterData : BaseExcelReader<ExBossMonsterData, ExBossMonsterDataExcel>
|
||||
{
|
||||
public override string FileName { get { return "ExBossMonsterData.json"; } }
|
||||
}
|
||||
|
||||
38
Common/Utils/ExcelReader/UltraEndlessFloor.cs
Normal file
38
Common/Utils/ExcelReader/UltraEndlessFloor.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Utils.ExcelReader
|
||||
{
|
||||
public class UltraEndlessFloor : BaseExcelReader<UltraEndlessFloor, UltraEndlessFloorExcel>
|
||||
{
|
||||
public override string FileName { get { return "UltraEndlessFloor.json"; } }
|
||||
|
||||
public List<UltraEndlessFloorExcel> GetFloorDatasFromStageId(int id)
|
||||
{
|
||||
return All.Where(floor => floor.StageId == id).ToList();
|
||||
}
|
||||
|
||||
public UltraEndlessFloorExcel? FromStageAndFloorId(int stageId, int floorId)
|
||||
{
|
||||
return All.FirstOrDefault(x => x.FloorId == floorId && x.StageId == stageId);
|
||||
}
|
||||
}
|
||||
|
||||
#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
|
||||
public partial class UltraEndlessFloorExcel
|
||||
{
|
||||
[JsonProperty("NeedScore")]
|
||||
public int NeedScore { get; set; }
|
||||
|
||||
[JsonProperty("MaxScore")]
|
||||
public int MaxScore { get; set; }
|
||||
|
||||
[JsonProperty("DataImpl")]
|
||||
public object DataImpl { get; set; }
|
||||
|
||||
[JsonProperty("FloorID")]
|
||||
public int FloorId { get; set; }
|
||||
|
||||
[JsonProperty("StageID")]
|
||||
public int StageId { get; set; }
|
||||
}
|
||||
}
|
||||
48
Common/Utils/ExcelReader/UltraEndlessSite.cs
Normal file
48
Common/Utils/ExcelReader/UltraEndlessSite.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Utils.ExcelReader
|
||||
{
|
||||
public class UltraEndlessSite : BaseExcelReader<UltraEndlessSite, UltraEndlessSiteExcel>
|
||||
{
|
||||
public override string FileName { get { return "UltraEndlessSite.json"; } }
|
||||
|
||||
public UltraEndlessSiteExcel? FromId(int id)
|
||||
{
|
||||
return All.Where(site => site.SiteId == id).FirstOrDefault();
|
||||
}
|
||||
}
|
||||
|
||||
#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
|
||||
public partial class UltraEndlessSiteExcel
|
||||
{
|
||||
[JsonProperty("StageID")]
|
||||
public int StageId { get; set; }
|
||||
|
||||
[JsonProperty("BuffID")]
|
||||
public int BuffId { get; set; }
|
||||
|
||||
[JsonProperty("SiteNodeName")]
|
||||
public string SiteNodeName { get; set; }
|
||||
|
||||
[JsonProperty("PreSiteList")]
|
||||
public int[] PreSiteList { get; set; }
|
||||
|
||||
[JsonProperty("SiteName")]
|
||||
public string SiteName { get; set; }
|
||||
|
||||
[JsonProperty("LevelEndWebLink")]
|
||||
public string LevelEndWebLink { get; set; }
|
||||
|
||||
[JsonProperty("HardLevelGroup")]
|
||||
public int HardLevelGroup { get; set; }
|
||||
|
||||
[JsonProperty("WebLink")]
|
||||
public string WebLink { get; set; }
|
||||
|
||||
[JsonProperty("DataImpl")]
|
||||
public object DataImpl { get; set; }
|
||||
|
||||
[JsonProperty("SiteID")]
|
||||
public int SiteId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,88 +0,0 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Utils.ExcelReader
|
||||
{
|
||||
internal class ExBossMonsterData : BaseExcelReader<ExBossMonsterData, ExBossMonsterDataExcel>
|
||||
{
|
||||
public override string FileName { get { return "ExBossMonsterData.json"; } }
|
||||
}
|
||||
|
||||
#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
|
||||
public partial class ExBossMonsterDataExcel
|
||||
{
|
||||
[JsonProperty("BossGroupId")]
|
||||
public int BossGroupId { get; set; }
|
||||
|
||||
[JsonProperty("BossName")]
|
||||
public string BossName { get; set; }
|
||||
|
||||
[JsonProperty("BossPrefabPath")]
|
||||
public string BossPrefabPath { get; set; }
|
||||
|
||||
[JsonProperty("MonsterId")]
|
||||
public int MonsterId { get; set; }
|
||||
|
||||
[JsonProperty("HardLevel")]
|
||||
public int HardLevel { get; set; }
|
||||
|
||||
[JsonProperty("HardLevelGroup")]
|
||||
public int HardLevelGroup { get; set; }
|
||||
|
||||
[JsonProperty("MonsterHp")]
|
||||
public uint MonsterHp { get; set; }
|
||||
|
||||
[JsonProperty("MonsterLevel")]
|
||||
public int MonsterLevel { get; set; }
|
||||
|
||||
[JsonProperty("MonsterBaseScore")]
|
||||
public int MonsterBaseScore { get; set; }
|
||||
|
||||
[JsonProperty("SceneName")]
|
||||
public string SceneName { get; set; }
|
||||
|
||||
[JsonProperty("BossAttribute")]
|
||||
public int BossAttribute { get; set; }
|
||||
|
||||
[JsonProperty("BossSkillTipsList")]
|
||||
public int[] BossSkillTipsList { get; set; }
|
||||
|
||||
[JsonProperty("DefaultShowSkillDetail")]
|
||||
public bool DefaultShowSkillDetail { get; set; }
|
||||
|
||||
[JsonProperty("BossDesc")]
|
||||
public HashName BossDesc { get; set; }
|
||||
|
||||
[JsonProperty("ImagePath")]
|
||||
public string ImagePath { get; set; }
|
||||
|
||||
[JsonProperty("RestrictList")]
|
||||
public int[] RestrictList { get; set; }
|
||||
|
||||
[JsonProperty("EventMark")]
|
||||
public HashName EventMark { get; set; }
|
||||
|
||||
[JsonProperty("TimesScore")]
|
||||
public int TimesScore { get; set; }
|
||||
|
||||
[JsonProperty("CornerMarkPath")]
|
||||
public string CornerMarkPath { get; set; }
|
||||
|
||||
[JsonProperty("UpTagList")]
|
||||
public TagList[] UpTagList { get; set; }
|
||||
|
||||
[JsonProperty("DownTagList")]
|
||||
public TagList[] DownTagList { get; set; }
|
||||
|
||||
[JsonProperty("ExtraTimeScore")]
|
||||
public int ExtraTimeScore { get; set; }
|
||||
|
||||
[JsonProperty("ConfigID")]
|
||||
public int ConfigId { get; set; }
|
||||
|
||||
[JsonProperty("DataImpl")]
|
||||
public object DataImpl { get; set; }
|
||||
|
||||
[JsonProperty("BossId")]
|
||||
public int BossId { get; set; }
|
||||
}
|
||||
}
|
||||
15
GameServer/Handlers/ClientCheckNetworkEnvReqHandler.cs
Normal file
15
GameServer/Handlers/ClientCheckNetworkEnvReqHandler.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using Common.Resources.Proto;
|
||||
|
||||
namespace PemukulPaku.GameServer.Handlers
|
||||
{
|
||||
[PacketCmdId(CmdId.ClientCheckNetworkEnvReq)]
|
||||
internal class ClientCheckNetworkEnvReqHandler : IPacketHandler
|
||||
{
|
||||
public void Handle(Session session, Packet packet)
|
||||
{
|
||||
ClientCheckNetworkEnvReq Data = packet.GetDecodedBody<ClientCheckNetworkEnvReq>();
|
||||
|
||||
session.Send(Packet.FromProto(new ClientCheckNetworkEnvRsp() { retcode = ClientCheckNetworkEnvRsp.Retcode.Succ, TokenStr = Data.TokenStr }, CmdId.ClientCheckNetworkEnvRsp));
|
||||
}
|
||||
}
|
||||
}
|
||||
28
GameServer/Handlers/GetEndlessStatusReqHandler.cs
Normal file
28
GameServer/Handlers/GetEndlessStatusReqHandler.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using Common;
|
||||
using Common.Resources.Proto;
|
||||
|
||||
namespace PemukulPaku.GameServer.Handlers
|
||||
{
|
||||
[PacketCmdId(CmdId.GetEndlessStatusReq)]
|
||||
internal class GetEndlessStatusReqHandler : IPacketHandler
|
||||
{
|
||||
public void Handle(Session session, Packet packet)
|
||||
{
|
||||
GetEndlessStatusRsp Rsp = new()
|
||||
{
|
||||
retcode = GetEndlessStatusRsp.Retcode.Succ,
|
||||
CurStatus = new()
|
||||
{
|
||||
BeginTime = 0,
|
||||
EndTime = (uint)Global.GetUnixInSeconds() + 3600 * 24 * 7,
|
||||
CloseTime = (uint)Global.GetUnixInSeconds() + 3600 * 24 * 7 + 1200,
|
||||
EndlessType = EndlessType.EndlessTypeUltra,
|
||||
CanJoinIn = true
|
||||
},
|
||||
SelectedEndlessType = 5
|
||||
};
|
||||
|
||||
session.Send(Packet.FromProto(Rsp, CmdId.GetEndlessStatusRsp));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,9 @@ namespace PemukulPaku.GameServer.Handlers
|
||||
{
|
||||
public void Handle(Session session, Packet packet)
|
||||
{
|
||||
session.Send(Packet.FromProto(new GetGodWarRsp() { retcode = GetGodWarRsp.Retcode.Succ }, CmdId.GetGodWarRsp));
|
||||
GetGodWarRsp Rsp = new() { retcode = GetGodWarRsp.Retcode.Succ };
|
||||
|
||||
session.Send(Packet.FromProto(Rsp, CmdId.GetGodWarRsp));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
15
GameServer/Handlers/UltraEndlessEnterSiteReqHandler.cs
Normal file
15
GameServer/Handlers/UltraEndlessEnterSiteReqHandler.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using Common.Resources.Proto;
|
||||
|
||||
namespace PemukulPaku.GameServer.Handlers
|
||||
{
|
||||
[PacketCmdId(CmdId.UltraEndlessEnterSiteReq)]
|
||||
internal class UltraEndlessEnterSiteReqHandler : IPacketHandler
|
||||
{
|
||||
public void Handle(Session session, Packet packet)
|
||||
{
|
||||
UltraEndlessEnterSiteReq Data = packet.GetDecodedBody<UltraEndlessEnterSiteReq>();
|
||||
|
||||
session.Send(Packet.FromProto(new UltraEndlessEnterSiteRsp() { retcode = UltraEndlessEnterSiteRsp.Retcode.Succ, SiteId = Data.SiteId }, CmdId.UltraEndlessEnterSiteRsp));
|
||||
}
|
||||
}
|
||||
}
|
||||
43
GameServer/Handlers/UltraEndlessGetMainDataReqHandler.cs
Normal file
43
GameServer/Handlers/UltraEndlessGetMainDataReqHandler.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
using Common;
|
||||
using Common.Resources.Proto;
|
||||
using Common.Utils.ExcelReader;
|
||||
|
||||
namespace PemukulPaku.GameServer.Handlers
|
||||
{
|
||||
[PacketCmdId(CmdId.UltraEndlessGetMainDataReq)]
|
||||
internal class UltraEndlessGetMainDataReqHandler : IPacketHandler
|
||||
{
|
||||
public void Handle(Session session, Packet packet)
|
||||
{
|
||||
UltraEndlessGetMainDataRsp Rsp = new()
|
||||
{
|
||||
retcode = UltraEndlessGetMainDataRsp.Retcode.Succ,
|
||||
ScheduleId = 1028,
|
||||
GroupLevel = 9,
|
||||
TopGroupLevel = 9,
|
||||
CupNum = 2000,
|
||||
MainData = new()
|
||||
{
|
||||
ScheduleId = 1028,
|
||||
EffectTime = 0,
|
||||
BeginTime = 0,
|
||||
EndTime = (uint)Global.GetUnixInSeconds() + 3600 * 24 * 7,
|
||||
CloseTime = (uint)Global.GetUnixInSeconds() + 3600 * 24 * 7 + 1200,
|
||||
CurSeasonId = 1
|
||||
},
|
||||
DynamicHardLevel = 430,
|
||||
LastSettleInfo = new() { }
|
||||
};
|
||||
Rsp.MainData.SiteLists.AddRange(Common.Utils.ExcelReader.UltraEndlessSite.GetInstance().All.Where(x => x.SiteId > 1019).Select(siteData =>
|
||||
{
|
||||
List<UltraEndlessFloorExcel> floorDatas = Common.Utils.ExcelReader.UltraEndlessFloor.GetInstance().GetFloorDatasFromStageId(siteData.StageId);
|
||||
var siteInfo = new Common.Resources.Proto.UltraEndlessSite() { SiteId = (uint)siteData.SiteId };
|
||||
siteInfo.FloorLists.AddRange(floorDatas.Select(x => new Common.Resources.Proto.UltraEndlessFloor() { Floor = (uint)x.FloorId, MaxScore = 0 }));
|
||||
|
||||
return siteInfo;
|
||||
}));
|
||||
|
||||
session.Send(Packet.FromProto(Rsp, CmdId.UltraEndlessGetMainDataRsp));
|
||||
}
|
||||
}
|
||||
}
|
||||
27
GameServer/Handlers/UltraEndlessGetTopRankReqHandler.cs
Normal file
27
GameServer/Handlers/UltraEndlessGetTopRankReqHandler.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using Common.Resources.Proto;
|
||||
|
||||
namespace PemukulPaku.GameServer.Handlers
|
||||
{
|
||||
[PacketCmdId(CmdId.UltraEndlessGetTopRankReq)]
|
||||
internal class UltraEndlessGetTopRankReqHandler : IPacketHandler
|
||||
{
|
||||
public void Handle(Session session, Packet packet)
|
||||
{
|
||||
UltraEndlessGetTopRankReq Data = packet.GetDecodedBody<UltraEndlessGetTopRankReq>();
|
||||
UltraEndlessGetTopRankRsp Rsp = new()
|
||||
{
|
||||
retcode = UltraEndlessGetTopRankRsp.Retcode.Succ,
|
||||
ScheduleId = Data.ScheduleId,
|
||||
RankData = new()
|
||||
{
|
||||
IsFeatureClosed = true,
|
||||
MyRank = 1,
|
||||
MyRankType = 1,
|
||||
MyScore = 0
|
||||
}
|
||||
};
|
||||
|
||||
session.Send(Packet.FromProto(Rsp, CmdId.UltraEndlessGetTopRankRsp));
|
||||
}
|
||||
}
|
||||
}
|
||||
22
GameServer/Handlers/UltraEndlessReportSiteFloorReqHandler.cs
Normal file
22
GameServer/Handlers/UltraEndlessReportSiteFloorReqHandler.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using Common.Resources.Proto;
|
||||
|
||||
namespace PemukulPaku.GameServer.Handlers
|
||||
{
|
||||
[PacketCmdId(CmdId.UltraEndlessReportSiteFloorReq)]
|
||||
internal class UltraEndlessReportSiteFloorReqHandler : IPacketHandler
|
||||
{
|
||||
public void Handle(Session session, Packet packet)
|
||||
{
|
||||
UltraEndlessReportSiteFloorReq Data = packet.GetDecodedBody<UltraEndlessReportSiteFloorReq>();
|
||||
// Common.Utils.ExcelReader.UltraEndlessSiteExcel? siteData = Common.Utils.ExcelReader.UltraEndlessSite.GetInstance().FromId((int)Data.SiteId);
|
||||
|
||||
session.Send(Packet.FromProto(new UltraEndlessReportSiteFloorRsp()
|
||||
{
|
||||
retcode = UltraEndlessReportSiteFloorRsp.Retcode.Succ,
|
||||
Floor = Data.Floor,
|
||||
SiteId = Data.SiteId,
|
||||
IsUpFloor = false
|
||||
}, CmdId.UltraEndlessReportSiteFloorRsp));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user