bug congired

master
Aurian JAULT 2 years ago
parent 9cb1d36242
commit b535946d5c

@ -11,7 +11,7 @@
} }
else else
{ {
<ItemInventory items="@inventory.inventoryItems[i]" Index="@i"/> <ItemInventory items="@inventory.inventoryItems[i]" Index="@i" NoDrop=false/>
} }
} }
</div> </div>

@ -28,6 +28,7 @@ namespace Blazor.Components
Parent.CurrentDragItem = this.Items; Parent.CurrentDragItem = this.Items;
Parent.inventory.inventoryItems[this.Index] = null; Parent.inventory.inventoryItems[this.Index] = null;
this.NoDrop = false; this.NoDrop = false;
if (this.Items == null) return;
Parent.Actions.Add(new InventoryAction("On drag start",this.Index,Items.item)); Parent.Actions.Add(new InventoryAction("On drag start",this.Index,Items.item));
Parent.update(); Parent.update();
} }
@ -40,6 +41,7 @@ namespace Blazor.Components
this.Items = Parent.CurrentDragItem; this.Items = Parent.CurrentDragItem;
NoDrop = true; NoDrop = true;
Parent.CurrentDragItem = null; Parent.CurrentDragItem = null;
if (this.Items == null) return;
Parent.Actions.Add(new InventoryAction("On Drop",this.Index,Items.item)); Parent.Actions.Add(new InventoryAction("On Drop",this.Index,Items.item));
return; return;
} }

Loading…
Cancel
Save