mirror of
https://github.com/kwsch/pk3DS.git
synced 2026-08-01 17:23:58 -05:00
Split Consumable byte to 4&4
flutes appear as '16', which is 0x10 (4th bit) flag.
This commit is contained in:
parent
d971af11b4
commit
ee169dcfbb
|
|
@ -35,7 +35,7 @@ public struct Item
|
|||
|
||||
public byte _0xC { get; set; } // 0 or 1
|
||||
public byte _0xD { get; set; } // Classification (0-3 Battle, 4 Balls, 5 Mail)
|
||||
public byte Consumable { get; set; }
|
||||
private byte Consumable { get; set; } // 4 bits for use consume, 4 bits for use not consumed
|
||||
public byte SortIndex { get; set; }
|
||||
public BattleStatusFlags CureInflict { get; set; } // Bitflags
|
||||
private byte Boost0; // Revive 1, Sacred Ash 3, Rare Candy 5, EvoStone 8, upper4 for BoostAtk
|
||||
|
|
@ -132,6 +132,12 @@ public int HealValue
|
|||
get => (int) HealAmount;
|
||||
set => HealAmount = (HealValue)value;
|
||||
}
|
||||
|
||||
[Category(Heal), Description("Item is consumed when used."), RefreshProperties(RefreshProperties.All)]
|
||||
public bool UseConsume { get => (Consumable & 0xF) != 0; set => Consumable = (byte)((Consumable & 0xF0) | (value ? 1 : 0)); }
|
||||
|
||||
[Category(Heal), Description("Item is not consumed when used."), RefreshProperties(RefreshProperties.All)]
|
||||
public bool UseKeep { get => (Consumable & 0xF0) != 0; set => Consumable = (byte)((Consumable & 0x0F) | (value ? 0x10 : 0)); }
|
||||
}
|
||||
|
||||
[Flags]
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user