存钱罐道具显示添加

This commit is contained in:
DESKTOP-45ANQ2C\unis 2024-12-27 14:36:51 +08:00
parent f1a580bce5
commit 08be09284b
2 changed files with 18 additions and 3 deletions

View File

@ -2892,7 +2892,14 @@ func (this *Player) DoShopInfo(info *model.DbShop, isLogin bool) {
//钻石存储罐
if info.PageId == ShopPageDiamondBank {
WelfareMgrSington.DiamondBankTakeCoin(this)
arrItems := WelfareMgrSington.DiamondBankTakeCoin(this)
for _, v := range arrItems {
itemInfo = append(itemInfo, &playerproto.PayItem{
ItemId: v.ItemId,
ItemNum: v.ItemNum,
})
}
}
// 通行证

View File

@ -1988,7 +1988,7 @@ func (this *WelfareMgr) DiamondBankGetInfo(p *Player) {
}
// DiamondBankTakeCoin 钻石存钱罐领取钻石
func (this *WelfareMgr) DiamondBankTakeCoin(p *Player) {
func (this *WelfareMgr) DiamondBankTakeCoin(p *Player) (retItemArr []*model.Item) {
pack := &welfare.SCDiamondBankTakeDiamond{
OpRetCode: welfare.OpResultCode_OPRC_Error,
}
@ -2034,7 +2034,13 @@ func (this *WelfareMgr) DiamondBankTakeCoin(p *Player) {
ItemId: int32(k),
ItemNum: v,
})
retItemArr = append(retItemArr, &model.Item{
ItemId: int32(k),
ItemNum: v,
})
}
BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform,
SnId: p.SnId,
@ -2069,6 +2075,8 @@ func (this *WelfareMgr) DiamondBankTakeCoin(p *Player) {
logger.Logger.Tracef("DiamondBankTakeCoin snid: %v pack: %v", p.SnId, pack)
p.SendToClient(int(welfare.SPacketID_PACKET_SCDiamondBankTakeDiamond), pack)
}
return retItemArr
}
// 更新钻石存储罐数据