Example #1
0
        public override bool Equals(object obj)
        {
            if (!(obj is TotemRelic))
            {
                return(false);
            }

            TotemRelic totem = obj as TotemRelic;

            return(totem.ID == this.ID);
        }
        private int FindIndex(ComboBox cbox, TotemRelic totem)
        {
            foreach (TotemRelic t in cbox.Items)
            {
                if (t.Equals(totem))
                {
                    return(cbox.Items.IndexOf(t));
                }
            }

            return(-1);
        }
        private void cboCHTotem_SelectedIndexChanged(object sender, EventArgs e)
        {
            TotemRelic totem = cboCHTotem.SelectedItem as TotemRelic;

            lblCHTotemDesc.Text = totem.Description;

            if (!_bLoading)
            {
                if (totem.ID != 0 && !chkEquipTotems.Checked)
                {
                    cboLHWTotem.SelectedIndex = 0;
                    cboHWTotem.SelectedIndex  = 0;
                }
                ((CalculationOptionsRestoSham)(Character.CalculationOptions)).Totems[HealSpells.ChainHeal] = totem;
                Character.OnItemsChanged();
            }
        }