void StoreParty() { int tO = 0x38; // Team offset in section for (int i = 0; i < TEAM_SIZE; i++) { PokeData sDat = TeamInfo.pokeTeam[i]; sDat.Store(); int j = i * 100; gs.StoreUInt(tO + 0x00 + j, sDat.persVal); gs.StoreUInt(tO + 0x04 + j, sDat.otId); gs.StoreBytes(tO + 0x08 + j, NICK_LEN, PkmString.GetBytes(sDat.nickname)); gs.StoreUShort(tO + 0x12 + j, sDat.lang); gs.StoreBytes(tO + 0x14 + j, NAME_SIZE, PkmString.GetBytes(sDat.otName)); gs.StoreUShort(tO + 0x1C + j, sDat.checksum); gs.StoreBytes(tO + 0x20 + j, 48, sDat.data); gs.StoreUInt(tO + 0x50 + j, sDat.status); gs.StoreByte(tO + 0x54 + j, sDat.level); gs.StoreUShort(tO + 0x56 + j, sDat.hp); gs.StoreUShort(tO + 0x58 + j, sDat.maxHp); gs.StoreUShort(tO + 0x5A + j, sDat.atk); gs.StoreUShort(tO + 0x5C + j, sDat.def); gs.StoreUShort(tO + 0x5E + j, sDat.spd); gs.StoreUShort(tO + 0x60 + j, sDat.sp_a); gs.StoreUShort(tO + 0x62 + j, sDat.sp_d); } }
void StoreTrainerInfo() { gs.StoreBytes(0x00, NAME_SIZE, PkmString.GetBytes(TrainerInfo.playerName)); gs.StoreByte(0x08, (byte)TrainerInfo.playerGender); gs.StoreUShort(0x0A, TrainerInfo.playerId.Public); gs.StoreUShort(0x0C, TrainerInfo.playerId.Secret); gs.StoreUShort(0x0E, TrainerInfo.playTime.hours); gs.StoreByte(0x10, TrainerInfo.playTime.minutes); gs.StoreByte(0x11, TrainerInfo.playTime.seconds); }