Example #1
0
        private void editChestToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Chest     chest     = world.GetChest(mapNum, editPos.X, editPos.Y);
            FormChest formChest = new FormChest(chest);

            if (formChest.ShowDialog() == DialogResult.OK)
            {
                changeFlag   = true;
                chest.Offset = formChest.Offset;
                chest.ItemId = formChest.ItemId;
                picMap.Refresh();
            }
        }
Example #2
0
        private void addChestToolStripMenuItem_Click(object sender, EventArgs e)
        {
            int c = world.FindEmptyChestSlot();

            if (c < World.MAX_CHESTS)
            {
                Chest chest = world.GetChest(c);
                chest.Map    = mapNum;
                chest.Offset = Map.CalcOffset(editPos.X, editPos.Y);
                FormChest formChest = new FormChest(chest);
                if (formChest.ShowDialog() == DialogResult.OK)
                {
                    changeFlag   = true;
                    chest.Offset = formChest.Offset;
                    chest.ItemId = formChest.ItemId;
                    picMap.Refresh();
                }
            }
            else
            {
                MessageBox.Show("Maximum number of chests reached in this world!", "", MessageBoxButtons.OK);
            }
        }