mirror of
https://github.com/Manu098vm/Switch-Gift-Data-Manager.git
synced 2026-04-23 09:07:17 -05:00
Fix League Points reading
This commit is contained in:
parent
d1c08e5d1a
commit
82298429fe
|
|
@ -6,7 +6,7 @@ namespace SwitchGiftDataManager.Core
|
|||
{
|
||||
public object? Type { get; set; }
|
||||
public ushort Item { get; set; }
|
||||
public ushort Quantity { get; set; }
|
||||
public uint Quantity { get; set; }
|
||||
public ushort Opt { get; set; }
|
||||
|
||||
public string GetItemName() => GetItemName(Item, Type!, Opt);
|
||||
|
|
@ -100,7 +100,7 @@ namespace SwitchGiftDataManager.Core
|
|||
str = $"[{category}] {description}";
|
||||
}
|
||||
else
|
||||
str = ((GiftType8A)type).ToString();
|
||||
str = ((GiftType9)type).ToString();
|
||||
}
|
||||
|
||||
return str;
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ namespace SwitchGiftDataManager.Core
|
|||
for (int i = 0; i < MaxItemCount; i++)
|
||||
{
|
||||
ushort item = 0;
|
||||
ushort quantity = 0;
|
||||
uint quantity = 0;
|
||||
ushort opt = 0;
|
||||
var type = (GiftType9)Type!;
|
||||
|
||||
|
|
@ -82,7 +82,8 @@ namespace SwitchGiftDataManager.Core
|
|||
else
|
||||
{
|
||||
item = BinaryPrimitives.ReadUInt16LittleEndian(Data.AsSpan(ItemOffset + (0x04 * i)));
|
||||
quantity = BinaryPrimitives.ReadUInt16LittleEndian(Data.AsSpan(QuantityOffset + (0x04 * i)));
|
||||
quantity = type is GiftType9.LP ? BinaryPrimitives.ReadUInt32LittleEndian(Data.AsSpan(ItemOffset + (0x04 * i))) :
|
||||
BinaryPrimitives.ReadUInt16LittleEndian(Data.AsSpan(QuantityOffset + (0x04 * i)));
|
||||
}
|
||||
|
||||
var gift = new OtherGift
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@
|
|||
None = 0,
|
||||
Pokemon = 1,
|
||||
Item = 2,
|
||||
BP = 3,
|
||||
LP = 3,
|
||||
Clothing = 4,
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user