Init enter game

This commit is contained in:
Naruse
2025-06-14 11:15:32 +08:00
commit 6a03b39f07
568 changed files with 92872 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
using KianaBH.KcpSharp;
using KianaBH.Proto;
namespace KianaBH.GameServer.Server.Packet.Send.Chapter;
public class PacketChapterArkGetDataRsp : BasePacket
{
public PacketChapterArkGetDataRsp(uint ChapterId) : base(CmdIds.ChapterArkGetDataRsp)
{
// TODO: Hardcoded
var avatarList = new List<uint> { 1, 2, 3, 4, 5 };
var proto = new ChapterArkGetDataRsp
{
ChapterArk = new ChapterArk
{
ChapterId = ChapterId,
AvatarList = { avatarList },
IsFinishOpening = true,
RoleList =
{
avatarList.Select(id => new ChapterArkRoleInfo
{
Id = id,
Level = 30
})
},
SkillList =
{
Enumerable.Range(1, 5)
.SelectMany(i => Enumerable.Range(1, 12)
.Select(j => new ChapterArkSkillInfo
{
Id = (uint)(i * 100 + j),
Level = (uint)(j > 3 ? 3 : 1)
}))
}
}
};
SetData(proto);
}
}

View File

@@ -0,0 +1,20 @@
using KianaBH.KcpSharp;
using KianaBH.Proto;
namespace KianaBH.GameServer.Server.Packet.Send.Chapter;
public class PacketChapterBwWorldGetDataRsp : BasePacket
{
public PacketChapterBwWorldGetDataRsp(uint ChapterId) : base(CmdIds.ChapterBwWorldGetDataRsp)
{
var proto = new ChapterBwWorldGetDataRsp
{
ChapterBwWorld = new ChapterBwWorld
{
ChapterId = ChapterId
}
};
SetData(proto);
}
}

View File

@@ -0,0 +1,35 @@
using KianaBH.KcpSharp;
using KianaBH.Proto;
using KianaBH.Data;
namespace KianaBH.GameServer.Server.Packet.Send.Chapter;
public class PacketChapterGroupGetDataRsp : BasePacket
{
public PacketChapterGroupGetDataRsp() : base(CmdIds.ChapterGroupGetDataRsp)
{
var proto = new ChapterGroupGetDataRsp
{
IsAll = true,
ChapterGroupList =
{
GameData.ChapterGroupConfigData.Select(x => new ChapterGroup
{
Id = (uint)x.Key,
SiteList =
{
x.Value.SiteList.Select(siteId => new ChapterGroupSite
{
ChapterId = (uint)siteId,
SiteId = (uint)siteId,
Status = ChapterGroupSiteStatus.Finished,
})
}
})
}
};
SetData(proto);
}
}

View File

@@ -0,0 +1,19 @@
using Azure.Core;
using KianaBH.KcpSharp;
using KianaBH.Proto;
namespace KianaBH.GameServer.Server.Packet.Send.Chapter;
public class PacketChapterKnightRichManGetDataRsp : BasePacket
{
public PacketChapterKnightRichManGetDataRsp(uint RichManId) : base(CmdIds.ChapterKnightRichManGetDataRsp)
{
var proto = new ChapterKnightRichManGetDataRsp
{
RichManId = RichManId,
Retcode = ChapterKnightRichManGetDataRsp.Types.Retcode.NotOpen, // set to NotOpen to prevent null reference error pop up
};
SetData(proto);
}
}

View File

@@ -0,0 +1,25 @@
using KianaBH.KcpSharp;
using KianaBH.Proto;
namespace KianaBH.GameServer.Server.Packet.Send.Chapter;
public class PacketGetEliteChapterCompensationInfoRsp : BasePacket
{
public PacketGetEliteChapterCompensationInfoRsp() : base(CmdIds.GetEliteChapterCompensationInfoRsp)
{
// TODO: Hardcoded
var proto = new GetEliteChapterCompensationInfoRsp
{
ChapterList =
{
Enumerable.Range(1, 35).Select(i => new EliteChapterCompensationInfo
{
ChapterId = (uint)i,
HasTakenCompensation = true
})
}
};
SetData(proto);
}
}