Added interaction for trees and stones, added items wood, stone, book and slimeball, v1.4.0
This commit is contained in:
@@ -357,19 +357,32 @@ namespace Assets.Scripts
|
||||
Item endItem = endDrag.getItem(endDrag.getCurrentBag());
|
||||
if (endItem != null)
|
||||
{
|
||||
if (((Equipment)endItem).getPlace() != startDrag.place)
|
||||
if (endItem is Equipment)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (startDrag.place == ItemPlace.BAG)
|
||||
{
|
||||
startDrag.setItem(endItem, endDrag.getCurrentBag());
|
||||
if (((Equipment)endItem).getPlace() != startDrag.place)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
startDrag.setEquip((Equipment)endItem);
|
||||
inventory.calculateStatBoost(attributes, false);
|
||||
inventory.calculateStatBoost(((Equipment)endItem).getAttributes(), true);
|
||||
if (startDrag.place == ItemPlace.BAG)
|
||||
{
|
||||
startDrag.setItem(endItem, endDrag.getCurrentBag());
|
||||
}
|
||||
else
|
||||
{
|
||||
if (endItem is Equipment)
|
||||
{
|
||||
startDrag.setEquip((Equipment)endItem);
|
||||
inventory.calculateStatBoost(attributes, false);
|
||||
inventory.calculateStatBoost(((Equipment)endItem).getAttributes(), true);
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
isSwap = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user