Ejemplo n.º 1
0
    public void IsEligibleForQuickDrop_ThisItemIsNotStackable_ReturnsTrue()
    {
        IEquippableItemIconConstArg arg;
        TestEqpII testEqpII = CreateTestEqpII(out arg);
        IUIItem   item      = arg.item;

        item.IsStackable().Returns(false);

        Assert.That(testEqpII.TestIsEligibleForQuickDrop(), Is.True);
    }
Ejemplo n.º 2
0
        public override void InitImage()
        {
            thisStateEngine.SetToDisemptifyingState();
            if (thisItemIcon.GetItemQuantity() == 0 && thisItemIcon.LeavesGhost())
            {
                thisItemIcon.Ghostify();
            }
            IUIItem item = thisItemIcon.GetUIItem();

            if (item.IsStackable())
            {
                thisItemIcon.SetQuantityInstantly(0);
                thisItemIcon.UpdateQuantity(thisItemIcon.GetItemQuantity(), true);
            }
        }
Ejemplo n.º 3
0
 public void UpdateQuantity(int targetQuantity, bool doesIncrement)
 {
     SetQuantity(targetQuantity);
     if (thisItem.IsStackable())
     {
         if (doesIncrement)
         {
             thisQuantityAnimationEngine.AnimateQuantityImageIncrementally(targetQuantity);
         }
         else
         {
             thisQuantityAnimationEngine.AnimateQuantityImageAtOnce(targetQuantity);
         }
     }
 }
Ejemplo n.º 4
0
    public void IsEligibleForQuickDrop_ThisItemIsStackable_ThisHasSameItemAsHoveredEqpII_ReturnsFalse()
    {
        IEquippableItemIconConstArg arg;
        TestEqpII testEqpII = CreateTestEqpII(out arg);
        IUIItem   item      = arg.item;

        item.IsStackable().Returns(true);
        IEquippableItemIcon hoveredEqpII = Substitute.For <IEquippableItemIcon>();
        IEquippableUIItem   hoveredItem  = Substitute.For <IEquippableUIItem>();

        hoveredEqpII.GetEquippableItem().Returns(hoveredItem);
        item.IsSameAs(hoveredItem).Returns(true);
        ((IEquippableIITAManager)arg.iiTAM).GetHoveredEqpII().Returns(hoveredEqpII);

        Assert.That(testEqpII.TestIsEligibleForQuickDrop(), Is.False);
    }