internal void WritePendant(FileStream rom, Region region, PendantItemType itemType) { var regionAddresses = GetRegionAddresses(region); var pendantValues = GetPendantValues(itemType); for (int i = 0; i < regionAddresses.Count; i++) { rom.WriteBytes(regionAddresses[i], pendantValues[i]); } }
private List <byte> GetPendantValues(PendantItemType itemType) { var pendantValues = new Dictionary <PendantItemType, List <byte> > { { PendantItemType.GreenPendant, new List <byte> { 0x04, 0x04, 0x38, 0x00, 0x01 } }, { PendantItemType.RedPendant, new List <byte> { 0x01, 0x01, 0x32, 0x00, 0x03 } }, { PendantItemType.BluePendant, new List <byte> { 0x02, 0x02, 0x34, 0x00, 0x02 } } }; return(pendantValues[itemType]); }
public PendantItem(PendantItemType insertedItem) { Type = insertedItem; }
internal bool PendantAtLocation(string locationName, PendantItemType item) { var itemAtLocation = GetItemAtLocation <PendantItem>(SpecialLocations, locationName); return(itemAtLocation?.Type == item); }