Skip to content

Commit

Permalink
RE CV: fix infinite herbs in start inventory
Browse files Browse the repository at this point in the history
  • Loading branch information
IntelOrca committed Feb 16, 2024
1 parent 78e4175 commit ccbf6eb
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions IntelOrca.Biohazard.BioRand/RECV/ReCvRandomiser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -244,17 +244,11 @@ void SetInventoryItem(int index, byte type, byte quantity)
{
rrdt!.AdditionalOpcodes.Add(new UnknownOpcode(0, 0xC7, new byte[] { 0x00, type, 0x00 }));
}
if (type != 0 && HasQuantity(type))
if (type != 0)
{
rrdt.AdditionalOpcodes.Add(new UnknownOpcode(0, 0xC9, new byte[] { type, quantity, 0x00 }));
}
}

bool HasQuantity(byte type)
{
var mask = ItemAttribute.Ammo | ItemAttribute.Gunpowder | ItemAttribute.InkRibbon | ItemAttribute.Weapon;
return (ItemHelper.GetItemAttributes(type) & mask) != 0;
}
}

private unsafe void TestEdits()
Expand Down

0 comments on commit ccbf6eb

Please sign in to comment.