private void ButtonTreasureClick(object sender, EventArgs e)
{
using (var dialog = new TreasureSelectDialog())
{
dialog.SetTreasure(this._enemy.treasure_prob, this._enemy.item_id,
this._enemy.weapon_id, this._enemy.armor_id);
if (dialog.ShowDialog() == DialogResult.OK)
{
this._enemy.treasure_prob = dialog.TreasureProbablity;
this._enemy.item_id = this._enemy.weapon_id = this._enemy.armor_id = 0;
if (dialog.ItemId > 0)
this._enemy.item_id = dialog.ItemId;
else if (dialog.WeaponId > 0)
this._enemy.weapon_id = dialog.WeaponId;
else if (dialog.ArmorId > 0)
this._enemy.armor_id = dialog.ArmorId;
this.RefreshTreasure();
}
}
}