KCP gameserver with packet dispatch, scene streaming, combat, gacha and the shop, plus a small HTTP server for the login flow and the wish history page. Game data under assets is pulled out of the client instead of being typed by hand. The excel tables come from the packed bin container and the spawn points from the compiled scene scripts.
48 lines
1.2 KiB
C#
48 lines
1.2 KiB
C#
using Yuanshen.Protocol;
|
|
|
|
namespace Yuanshen.Gameserver.Game;
|
|
|
|
internal sealed class GameReliquary
|
|
{
|
|
public uint ItemId { get; }
|
|
public ulong Guid { get; }
|
|
public uint EquipType { get; }
|
|
public uint MainPropId { get; }
|
|
public uint Level { get; set; } = 21;
|
|
public uint PromoteLevel { get; set; } = 5;
|
|
public List<uint> AppendPropIds { get; } = new();
|
|
|
|
public GameReliquary(uint itemId, ulong guid, uint equipType, uint mainPropId)
|
|
{
|
|
ItemId = itemId;
|
|
Guid = guid;
|
|
EquipType = equipType;
|
|
MainPropId = mainPropId;
|
|
}
|
|
|
|
public Item AsItem()
|
|
{
|
|
Reliquary reliquary = new()
|
|
{
|
|
Level = Level,
|
|
PromoteLevel = PromoteLevel,
|
|
MainPropId = MainPropId
|
|
};
|
|
reliquary.AppendPropIdList.AddRange(AppendPropIds);
|
|
|
|
return new Item
|
|
{
|
|
ItemId = ItemId,
|
|
Guid = Guid,
|
|
Equip = new Equip { Reliquary = reliquary }
|
|
};
|
|
}
|
|
|
|
public SceneReliquaryInfo AsSceneReliquary() => new()
|
|
{
|
|
ItemId = ItemId,
|
|
Guid = Guid,
|
|
Level = Level,
|
|
PromoteLevel = PromoteLevel
|
|
};
|
|
}
|