Implemented a level-up for SupporterCards.

This commit is contained in:
Kei-Luna
2026-04-28 16:12:02 +09:00
parent 5d0f587fb9
commit ccdfbee828
4 changed files with 142 additions and 4 deletions

View File

@@ -1,3 +1,5 @@
using Newtonsoft.Json;
namespace MikuSB.Data.Excel;
[ResourceEntity("support_card.json")]
@@ -8,6 +10,18 @@ public class SupportCardExcel : ExcelResource
public uint Particular { get; set; }
public uint Level { get; set; }
public uint Icon { get; set; }
public uint ProvideExp { get; set; }
[JsonProperty("LevelLimitID")] public int LevelLimitId { get; set; }
public uint MaxLevel => LevelLimitId switch
{
1007 => 10,
1008 => 13,
1009 => 16,
_ => 10
};
public ulong TemplateId => GameResourceTemplateId.FromGdpl(Genre, Detail, Particular, Level);
public override uint GetId() => Icon;

View File

@@ -26,24 +26,29 @@ public class BaseGameItemInfo
public uint ItemCount { get; set; }
public ItemTypeEnum ItemType { get; set; }
public ItemFlagEnum Flag { get; set; } = ItemFlagEnum.FLAG_READED;
public uint Level { get; set; }
public uint Exp { get; set; }
public virtual Item ToProto()
{
return new Item
var proto = new Item
{
Id = UniqueId,
Template = TemplateId,
Count = ItemCount,
Flag = (uint)Flag
};
if (Level > 0 || Exp > 0)
proto.Enhance = new Enhance { Level = Level, Exp = Exp };
return proto;
}
}
public abstract class GrowableItemInfo : BaseGameItemInfo
{
public bool IsLocked { get; set; }
public uint Level { get; set; }
public uint Exp { get; set; }
public new uint Level { get; set; }
public new uint Exp { get; set; }
public uint Break { get; set; }
public uint EquipAvatarId { get; set; }
}