implement npc shop

This commit is contained in:
Kengxxiao
2022-04-27 18:51:48 +08:00
committed by Melledy
parent 0e3a80407e
commit 3e0ccbbbde
11 changed files with 492 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);