mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2026-05-19 06:32:49 +08:00
Support giftPackage BatchUse
Co-authored-by: pris <lilch1022@hotmail.com>
This commit is contained in:
committed by
Melledy
Unverified
parent
8c7681bd6d
commit
86e6eef4e2
@@ -90,9 +90,6 @@ public class HandlerBuyGoodsReq extends PacketHandler {
|
||||
session.getPlayer().addShopLimit(sg.getGoodsId(), buyGoodsReq.getBoughtNum(), ShopManager.getShopNextRefreshTime(sg));
|
||||
GameItem item = new GameItem(GameData.getItemDataMap().get(sg.getGoodsItem().getId()));
|
||||
item.setCount(buyGoodsReq.getBoughtNum() * sg.getGoodsItem().getCount());
|
||||
if (sg.getShowId() > 0) {
|
||||
item.setRewardBoxId(sg.getShowId());
|
||||
}
|
||||
session.getPlayer().getInventory().addItem(item, ActionReason.Shop, true); // fix: not notify when got virtual item from shop
|
||||
session.send(new PacketBuyGoodsRsp(buyGoodsReq.getShopType(), session.getPlayer().getGoodsLimit(sg.getGoodsId()).getHasBoughtInPeriod(), buyGoodsReq.getGoodsListList().stream().filter(x -> x.getGoodsId() == goodsId).findFirst().get()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user