示例#1
0
 private void CBweapons_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (CBweapons.SelectedItem != null)
     {
         TBitem.Clear();
         TBequiped.Clear();
         weapon ase = (weapon)CBweapons.SelectedItem;
         viimeksivalittu = ase;
         Naytaweapon(ase, CBweapons);
     }
 }
示例#2
0
 private void CBboots_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (CBboots.SelectedItem != null)
     {
         TBitem.Clear();
         TBequiped.Clear();
         Boots boots = (Boots)CBboots.SelectedItem;
         viimeksivalittu = boots;
         Naytabootsit(boots, CBboots);
     }
 }
示例#3
0
 private void CBbelts_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (CBbelts.SelectedItem != null)
     {
         TBitem.Clear();
         TBequiped.Clear();
         Belt belt = (Belt)CBbelts.SelectedItem;
         viimeksivalittu = belt;
         Naytabeltti(belt, CBbelts);
     }
 }
示例#4
0
 private void CBgloves_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (CBgloves.SelectedItem != null)
     {
         TBitem.Clear();
         TBequiped.Clear();
         Gloves glove = (Gloves)CBgloves.SelectedItem;
         viimeksivalittu = glove;
         Naytaglovet(glove, CBgloves);
     }
 }
示例#5
0
 private void CBrings_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (CBrings.SelectedItem != null)
     {
         TBitem.Clear();
         TBequiped.Clear();
         Ring ring = (Ring)CBrings.SelectedItem;
         viimeksivalittu = ring;
         Naytaringi(ring, CBrings);
     }
 }
示例#6
0
 private void CBbody_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (CBbody.SelectedItem != null)
     {
         TBitem.Clear();
         TBequiped.Clear();
         Body armor = (Body)CBbody.SelectedItem;
         viimeksivalittu = armor;
         Naytabodyarmor(armor, CBbody);
     }
 }
示例#7
0
 private void CBhelmet_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (CBhelmet.SelectedItem != null)
     {
         TBitem.Clear();
         TBequiped.Clear();
         Helmet helmet = (Helmet)CBhelmet.SelectedItem;
         viimeksivalittu = helmet;
         Naytahelmet(helmet, CBhelmet);
     }
 }
示例#8
0
 private void BTequip_Click(object sender, EventArgs e)
 {
     if (CBbelts.SelectedItem != null)
     {
         viimeksivalittu         = (Belt)CBbelts.SelectedItem;
         viimeksivalittu.Equiped = true;
         newinventory.Remove(viimeksivalittu);
         player.Belt.Equiped = false;
         newinventory.Add(player.Belt);
         player.Belt = (Belt)viimeksivalittu;
     }
     if (CBbody.SelectedItem != null)
     {
         viimeksivalittu         = (Body)CBbody.SelectedItem;
         viimeksivalittu.Equiped = true;
         newinventory.Remove(viimeksivalittu);
         player.Body.Equiped = false;
         newinventory.Add(player.Body);
         player.Body = (Body)viimeksivalittu;
     }
     if (CBboots.SelectedItem != null)
     {
         viimeksivalittu         = (Boots)CBboots.SelectedItem;
         viimeksivalittu.Equiped = true;
         newinventory.Remove(viimeksivalittu);
         player.Boots.Equiped = false;
         newinventory.Add(player.Boots);
         player.Boots = (Boots)viimeksivalittu;
     }
     if (CBgloves.SelectedItem != null)
     {
         viimeksivalittu         = (Gloves)CBgloves.SelectedItem;
         viimeksivalittu.Equiped = true;
         newinventory.Remove(viimeksivalittu);
         player.Gloves.Equiped = false;
         newinventory.Add(player.Gloves);
         player.Gloves = (Gloves)viimeksivalittu;
     }
     if (CBhelmet.SelectedItem != null)
     {
         viimeksivalittu         = (Helmet)CBhelmet.SelectedItem;
         viimeksivalittu.Equiped = true;
         newinventory.Remove(viimeksivalittu);
         player.Helmet.Equiped = false;
         newinventory.Add(player.Helmet);
         player.Helmet = (Helmet)viimeksivalittu;
     }
     if (CBrings.SelectedItem != null)
     {
         viimeksivalittu         = (Ring)CBrings.SelectedItem;
         viimeksivalittu.Equiped = true;
         newinventory.Remove(viimeksivalittu);
         player.Ring.Equiped = false;
         newinventory.Add(player.Ring);
         player.Ring = (Ring)viimeksivalittu;
     }
     if (CBweapons.SelectedItem != null)
     {
         viimeksivalittu         = (weapon)CBweapons.SelectedItem;
         viimeksivalittu.Equiped = true;
         newinventory.Remove(viimeksivalittu);
         player.Weapon.Equiped = false;
         newinventory.Add(player.Weapon);
         player.Weapon = (weapon)viimeksivalittu;
     }
     ClearAllComboboxes();
     Itemsorting();
     game.Setplayerinv(newinventory, player);
 }