public PlayerCharacterRecords(List <byte> rawByteList) { for (int nRecord = 0; nRecord < TOTAL_CHARACTER_RECORDS; nRecord++) { byte[] characterArray = new byte[CHARACTER_OFFSET]; // start at 0x02 byte because the first two characters are 0x0000 rawByteList.CopyTo(nRecord * CHARACTER_OFFSET, characterArray, 0x00, PlayerCharacterRecord.CHARACTER_RECORD_BYTE_ARRAY_SIZE); Records[nRecord] = new PlayerCharacterRecord(characterArray); } }
public void SwapPositions(int nFirstPos, int nSecondPos) { int nActiveRecs = this.TotalPartyMembers(); if (nFirstPos > nActiveRecs || nSecondPos > nActiveRecs) { throw new Ultima5ReduxException("Asked to swap a party member who doesn't exist First:#" + nFirstPos.ToString() + " Second:#" + nSecondPos.ToString()); } PlayerCharacterRecord tempRec = Records[nFirstPos]; Records[nFirstPos] = Records[nSecondPos]; Records[nSecondPos] = tempRec; }