@Override
	public void setIngameTrades(List<IngameTrade> trades) {

		// info
		int tableOffset = romEntry.getValue("TradeTableOffset");
		int tableSize = romEntry.getValue("TradeTableSize");
		int nicknameLength = romEntry.getValue("TradeNameLength");
		int[] unused = romEntry.arrayEntries.get("TradesUnused");
		int unusedOffset = 0;
		int entryLength = nicknameLength + 3;
		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;
			rom[entryOffset] = (byte) pokeNumToRBYTable[trade.requestedPokemon.number];
			rom[entryOffset + 1] = (byte) pokeNumToRBYTable[trade.givenPokemon.number];
			if (romEntry.getValue("CanChangeTrainerText") > 0) {
				writeFixedLengthString(trade.nickname, entryOffset + 3,
						nicknameLength);
			}
		}
	}