Ajoute le nom de l'item dans la liste + corrige un bug de duplication
continuous-integration/drone/push Build is failing Details

master
Lou VALADE 2 years ago
parent c91426d333
commit c467be3e55

@ -54,8 +54,11 @@
@foreach (var item in Items)
{
<div>
<InventoryItem Item="item" NoDrop="true"/>
<p>@item.DisplayName</p>
</div>
<br/>
}
</div>
</div>

@ -17,3 +17,7 @@
height: 250px;
overflow: scroll;
}
.listeItem {
display: inline;
}

@ -39,8 +39,8 @@ namespace BlazorApp1.Components
internal void OnDrop()
{
Item CurrentHoldItem = new Item();//A remplir avec les valeurs de CurrentDragItem
//CurrentHoldItem = Parent.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);
if (NoDrop)
{
@ -54,7 +54,9 @@ namespace BlazorApp1.Components
CurrentHoldItem.Stack = CurrentHoldItem.Stack + this.Item.Stack;
this.Item = CurrentHoldItem;
}
else { return; }
else {
return;
}
}
else
@ -67,7 +69,7 @@ namespace BlazorApp1.Components
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 });
}

Loading…
Cancel
Save