Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
        void SetParty()
        {
            int tO = 0x38; // Team offset in section

            for (int i = 0; i < TEAM_SIZE * 100; i += 100)
            {
                PokeData newMon = new PokeData();
                newMon.persVal  = gs.GetUInt(tO + 0x00 + i);
                newMon.otId     = gs.GetUInt(tO + 0x04 + i);
                newMon.nickname = PkmString.GetString(gs.GetBytes(tO + 0x08 + i, NICK_LEN));
                newMon.lang     = gs.GetUShort(tO + 0x12 + i);
                newMon.otName   = PkmString.GetString(gs.GetBytes(tO + 0x14 + i, NAME_SIZE));
                newMon.checksum = gs.GetUShort(tO + 0x1C + i);
                newMon.data     = gs.GetBytes(tO + 0x20 + i, 48);
                newMon.status   = gs.GetUInt(tO + 0x50 + i);
                newMon.level    = gs.GetByte(tO + 0x54 + i);
                newMon.hp       = gs.GetUShort(tO + 0x56 + i);
                newMon.maxHp    = gs.GetUShort(tO + 0x58 + i);
                newMon.atk      = gs.GetUShort(tO + 0x5A + i);
                newMon.def      = gs.GetUShort(tO + 0x5C + i);
                newMon.spd      = gs.GetUShort(tO + 0x5E + i);
                newMon.sp_a     = gs.GetUShort(tO + 0x60 + i);
                newMon.sp_d     = gs.GetUShort(tO + 0x62 + i);
                newMon.Init();

                TeamInfo.pokeTeam[i / 100] = newMon;
            }
        }
Exemplo n.º 3
0
 private void viewPoke_Click(object sender, EventArgs e)
 {
     pokeditor = (PokeData)boxData.CurrentCell.Tag;
     UpdateEdit();
 }