示例#1
0
            public bool Equals(CombatActionQueueItem other)
            {
                if (other == null)
                {
                    return(false);
                }

                if (CombatAction.GetType() != other.CombatAction.GetType())
                {
                    return(false);
                }

                switch (CombatAction)
                {
                case PerkAction perk:
                    return(perk == ((PerkAction)other.CombatAction));

                case Item item:
                    Item item1 = item;
                    Item item2 = (Item)other.CombatAction;
                    return(item.LowId == ((Item)other.CombatAction).LowId && item.HighId == ((Item)other.CombatAction).HighId && item.QualityLevel == ((Item)other.CombatAction).QualityLevel);

                case Spell spell:
                    return(spell == ((Spell)other.CombatAction));

                default:
                    return(false);
                }
            }