mirror of
https://github.com/MikuLeaks/MikuSB.git
synced 2026-06-04 21:53:56 +00:00
use enum for item slots
This commit is contained in:
@@ -29,8 +29,7 @@ public class CharacterInfo
|
||||
[SugarColumn(IsJson = true)] public List<uint> UnlockedSkin { get; set; } = [];
|
||||
[SugarColumn(IsJson = true)] public List<uint> Spines { get; set; } = [];
|
||||
[SugarColumn(IsJson = true)] public List<uint> Affixs { get; set; } = [];
|
||||
// Key = EqSlot (= support card Detail), Value = support card UniqueId
|
||||
[SugarColumn(IsJson = true)] public Dictionary<uint, uint> SupportSlots { get; set; } = [];
|
||||
[SugarColumn(IsJson = true)] public Dictionary<uint, uint> SupportSlots { get; set; } = []; // Key = EqSlot (= support card Detail), Value = support card UniqueId
|
||||
public long Timestamp { get; set; }
|
||||
public uint Count { get; set; } = 1;
|
||||
|
||||
@@ -56,9 +55,9 @@ public class CharacterInfo
|
||||
proto.Enhance.Spines.AddRange(Spines.Select(x => (ulong)x));
|
||||
proto.Enhance.Affixs.AddRange(Affixs);
|
||||
|
||||
proto.Slots[4] = WeaponUniqueId;
|
||||
proto.Slots[5] = SkinId;
|
||||
proto.Slots[6] = WeaponSkinId;
|
||||
proto.Slots[(uint)ItemCardSlotTypeEnum.SLOT_WEAPON] = WeaponUniqueId;
|
||||
proto.Slots[(uint)ItemCardSlotTypeEnum.SLOT_SKIN] = SkinId;
|
||||
proto.Slots[(uint)ItemCardSlotTypeEnum.SLOT_WEAPON_SKIN] = WeaponSkinId;
|
||||
foreach (var (slot, uid) in SupportSlots)
|
||||
proto.Slots[slot] = uid;
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ public class GameSkinInfo : BaseGameItemInfo
|
||||
Count = ItemCount,
|
||||
Flag = (uint)Flag,
|
||||
};
|
||||
proto.Slots[11] = Math.Min(SkinType, 1);
|
||||
proto.Slots[(uint)ItemSkinSlotTypeEnum.SLOT_CARD_SKIL_TYPE] = Math.Min(SkinType, 1);
|
||||
return proto;
|
||||
}
|
||||
}
|
||||
@@ -116,7 +116,7 @@ public class GameSupportCardInfo : BaseGameItemInfo
|
||||
Exp = Exp
|
||||
}
|
||||
};
|
||||
proto.Slots[1] = AffixId;
|
||||
proto.Slots[(uint)ItemSupportCardSlotTypeEnum.SLOT_AFFIXINDEX] = AffixId;
|
||||
return proto;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user