Commit bce3e256 authored by zamlty's avatar zamlty
Browse files

Fix artifact & weapon generation by give command

parent 4c1dc34c
......@@ -95,18 +95,19 @@ public final class GiveCommand implements CommandHandler {
}
private void item(GenshinPlayer player, ItemData itemData, int amount) {
GenshinItem genshinItem = new GenshinItem(itemData);
if (itemData.isEquip()) {
List<GenshinItem> items = new LinkedList<>();
for (int i = 0; i < amount; i++) {
items.add(genshinItem);
items.add(new GenshinItem(itemData));
}
player.getInventory().addItems(items);
player.sendPacket(new PacketItemAddHintNotify(items, ActionReason.SubfieldDrop));
} else {
GenshinItem genshinItem = new GenshinItem(itemData);
genshinItem.setCount(amount);
player.getInventory().addItem(genshinItem);
player.sendPacket(new PacketItemAddHintNotify(genshinItem, ActionReason.SubfieldDrop));
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment