Beispiel #1
0
 private void comboChunks_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (comboChunks.SelectedIndex >= 0)
     {
         //Try to..
         try
         {
             //Obtain our offset for our chunk
             int chunkOffset = ReflexiveData.Pointer + (comboChunks.SelectedIndex * ReflexiveData.Size);
             //Load values
             MetaEditorHandler.LoadPluginValues(Map, pnlValues, chunkOffset);
             //Close the IO
             Map.CloseIO();
         }
         //Incase of an error..
         catch
         {
             //Show our error
             MessageBox.Show("Could not load values for Reflexive/Structure: " + ReflexiveData.Name);
         }
     }
 }
Beispiel #2
0
        private void chunkDataForAllChunksToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //Check our chunk data
            if (ChunkClipboard.Chunk == null)
            {
                MessageBox.Show("There is no copied chunk.");
            }

            //Check our name and size.
            if (ChunkClipboard.Name != ReflexiveData.Name | ChunkClipboard.Size != ReflexiveData.Size)
            {
                MessageBox.Show("This chunk does not belong to this reflexive.");
            }


            //Open our IO
            Map.OpenIO();
            for (int i = 0; i < ReflexiveData.ChunkCount; i++)
            {
                //Go to the chunk offset
                Map.IO.Out.BaseStream.Position = ReflexiveData.Pointer + (i * ReflexiveData.Size);

                //Write our data
                Map.IO.Out.Write(ChunkClipboard.Chunk);
            }

            //Obtain our offset for our chunk
            int chunkOffset = ReflexiveData.Pointer + (comboChunks.SelectedIndex * ReflexiveData.Size);

            //Load values
            MetaEditorHandler.LoadPluginValues(Map, pnlValues, chunkOffset);

            //Set all values as editted.
            MetaEditorHandler.SetAllAsEditted(Map, pnlValues, chunkOffset);

            //Close our IO.
            Map.CloseIO();
        }