@Override
	public void setIngameTrades(List<IngameTrade> trades) {
		// info
		int tableOffset = romEntry.getValue("TradeTableOffset");
		int tableSize = romEntry.getValue("TradeTableSize");
		int[] unused = romEntry.arrayEntries.get("TradesUnused");
		int unusedOffset = 0;
		int entryLength = 60;
		int tradeOffset = 0;

		for (int entry = 0; entry < tableSize; entry++) {
			if (unusedOffset < unused.length && unused[unusedOffset] == entry) {
				unusedOffset++;
				continue;
			}
			IngameTrade trade = trades.get(tradeOffset++);
			int entryOffset = tableOffset + entry * entryLength;
			writeFixedLengthString(trade.nickname, entryOffset, 12);
			writeWord(entryOffset + 12,
					pokeNumTo3GIndex(trade.givenPokemon.number));
			for (int i = 0; i < 6; i++) {
				rom[entryOffset + 14 + i] = (byte) trade.ivs[i];
			}
			writeWord(entryOffset + 24, trade.otId);
			writeWord(entryOffset + 40, trade.item);
			writeFixedLengthString(trade.otName, entryOffset + 43, 11);
			writeWord(entryOffset + 56,
					pokeNumTo3GIndex(trade.requestedPokemon.number));
		}
	}