mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-22 03:45:10 +01:00
implement npc shop
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user