implement npc shop

This commit is contained in:
Kengxxiao
2022-04-27 18:51:48 +08:00
committed by Melledy
parent ca7c335c94
commit 842acabe5a
13 changed files with 514 additions and 13 deletions

View File

@@ -109,6 +109,16 @@ public class Inventory implements Iterable<GameItem> {
return result;
}
public boolean addItem(GameItem item, ActionReason reason, boolean forceNotify) {
boolean result = addItem(item);
if (reason != null && (forceNotify || result)) {
getPlayer().sendPacket(new PacketItemAddHintNotify(item, reason));
}
return result;
}
public void addItems(Collection<GameItem> items) {
this.addItems(items, null);