Merge branch 'develop' of git.pogorockgames.com:mango-games/server/game into develop

This commit is contained in:
sk 2024-04-28 16:47:49 +08:00
commit 0cc96a5747
1 changed files with 7 additions and 9 deletions

View File

@ -684,16 +684,14 @@ func (this *ShopMgr) GetAmountFinal(p *Player, shopId, vipShopId int32) int64 {
// 商城购买 额外增加道具
func (this *ShopMgr) ShopAddItem(shopInfo *model.ShopInfo, p *Player) {
if shopInfo.AddItemInfo != nil {
for _, info := range shopInfo.AddItemInfo {
item := &Item{ItemId: info.ItemId, ItemNum: info.ItemNum, ObtainTime: time.Now().Unix()}
BagMgrSingleton.AddJybBagInfo(p, []*Item{item}, 0, common.GainWay_Shop_Buy, "system", shopInfo.Name)
data := srvdata.PBDB_GameItemMgr.GetData(item.ItemId)
if data != nil {
BagMgrSingleton.RecordItemLog(p.Platform, p.SnId, ItemObtain, shopInfo.ItemId, data.Name, shopInfo.Amount, "商城购买")
}
PetMgrSington.CheckShowRed(p)
for _, info := range shopInfo.AddItemInfo {
item := &Item{ItemId: info.ItemId, ItemNum: info.ItemNum, ObtainTime: time.Now().Unix()}
BagMgrSingleton.AddJybBagInfo(p, []*Item{item}, 0, common.GainWay_Shop_Buy, "system", shopInfo.Name)
data := srvdata.PBDB_GameItemMgr.GetData(item.ItemId)
if data != nil {
BagMgrSingleton.RecordItemLog(p.Platform, p.SnId, ItemObtain, info.ItemId, data.Name, info.ItemNum, "商城购买")
}
PetMgrSington.CheckShowRed(p)
}
}