|
|
@ -39,8 +39,8 @@ namespace BlazorApp1.Components
|
|
|
|
|
|
|
|
|
|
|
|
internal void OnDrop()
|
|
|
|
internal void OnDrop()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Item CurrentHoldItem = new Item();//A remplir avec les valeurs de CurrentDragItem
|
|
|
|
Item CurrentHoldItem = new Item(Parent.CurrentDragItem.Id, Parent.CurrentDragItem.DisplayName, Parent.CurrentDragItem.Name, Parent.CurrentDragItem.StackSize, Parent.CurrentDragItem.Stack, Parent.CurrentDragItem.MaxDurability, Parent.CurrentDragItem.EnchantCategories, Parent.CurrentDragItem.RepairWith, Parent.CurrentDragItem.CreatedDate, Parent.CurrentDragItem.UpdatedDate, Parent.CurrentDragItem.ImageBase64);
|
|
|
|
//CurrentHoldItem = Parent.CurrentDragItem;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (NoDrop)
|
|
|
|
if (NoDrop)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -54,7 +54,9 @@ namespace BlazorApp1.Components
|
|
|
|
CurrentHoldItem.Stack = CurrentHoldItem.Stack + this.Item.Stack;
|
|
|
|
CurrentHoldItem.Stack = CurrentHoldItem.Stack + this.Item.Stack;
|
|
|
|
this.Item = CurrentHoldItem;
|
|
|
|
this.Item = CurrentHoldItem;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else { return; }
|
|
|
|
else {
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
else
|
|
|
@ -67,7 +69,7 @@ namespace BlazorApp1.Components
|
|
|
|
|
|
|
|
|
|
|
|
private void OnDragStart()
|
|
|
|
private void OnDragStart()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Parent.CurrentDragItem = this.Item;
|
|
|
|
Parent.CurrentDragItem = new Item(this.Item.Id, this.Item.DisplayName, this.Item.Name, this.Item.StackSize, 1, this.Item.MaxDurability, this.Item.EnchantCategories, this.Item.RepairWith, this.Item.CreatedDate, this.Item.UpdatedDate, this.Item.ImageBase64);
|
|
|
|
|
|
|
|
|
|
|
|
Parent.Actions.Add(new CraftingAction { Action = "Drag Start", Item = this.Item, Index = this.Index });
|
|
|
|
Parent.Actions.Add(new CraftingAction { Action = "Drag Start", Item = this.Item, Index = this.Index });
|
|
|
|
}
|
|
|
|
}
|
|
|
|