Beispiel #1
0
        /// <summary>
        /// Cancels a drag
        /// </summary>
        public void Cancel()
        {
            this.IsBeingCancelled = true;

            // let the owner know.
            this.sackPanel.CancelDrag(this);

            // now clear things out
            this.item = null;

            // If the item came from the equipment panel,
            // recalcuate the gear stats before clearing out the sackPanel.
            // The item needs to be cleared at this point to get the correct calculation.
            EquipmentPanel equipmentPanel = sackPanel as EquipmentPanel;

            equipmentPanel?.GetGearStatBonus();

            this.sack             = null;
            this.sackPanel        = null;
            this.AutoMove         = AutoMoveLocation.NotSet;
            this.IsBeingCancelled = false;
        }