SetTreasure() 공개 메소드

Sets the values of the control based on current settings
public SetTreasure ( int prob, int itemId, int weaponId, int armorId ) : void
prob int Probablity of obtaining treasure
itemId int ID of item to be obtained
weaponId int ID of weapon to be obtained
armorId int ID of armor to be obtained
리턴 void
예제 #1
0
 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();
         }
     }
 }