diff --git a/protocol/welfare/welfare.proto b/protocol/welfare/welfare.proto index 9500e85..c90735e 100644 --- a/protocol/welfare/welfare.proto +++ b/protocol/welfare/welfare.proto @@ -378,7 +378,7 @@ message SCPigbankTakeCoin{ OpResultCode OpRetCode = 1; // 结果 int64 TakeCoinNum = 2; // 领取金币数量 int32 TakeTimes = 3; // 领取次数 - //repeated PigBankCoinInfo info = 4; + repeated PropInfo RewardItems = 4; } // 钻石存钱罐信息 @@ -411,7 +411,7 @@ message SCDiamondBankTakeDiamond{ OpResultCode OpRetCode = 1; // 结果 double TakeDiamondNum = 2; // 领取钻石数量 int32 TakeTimes = 3; // 领取次数 - //repeated PigBankDiamondInfo info = 4; + //repeated PropInfo RewardItems = 4; } // 赛季通行证信息 diff --git a/worldsrv/welfmgr.go b/worldsrv/welfmgr.go index 582b218..cae5fd8 100644 --- a/worldsrv/welfmgr.go +++ b/worldsrv/welfmgr.go @@ -1891,6 +1891,11 @@ func (this *WelfareMgr) PigbankTakeCoin(p *Player) { p.WelfData.PigBank.TakeRecord[infoData.Id] = p.WelfData.PigBank.BankCoin } + pack.RewardItems = append(pack.RewardItems, &welfare.PropInfo{ + ItemId: common.ItemIDCoin, + ItemNum: p.WelfData.PigBank.BankCoin, + }) + if infoData.GoldExc != nil { // 发放奖励道具 var items []*model.Item @@ -1899,6 +1904,11 @@ func (this *WelfareMgr) PigbankTakeCoin(p *Player) { ItemId: int32(v.ItemId), ItemNum: v.ItemNum, }) + + pack.RewardItems = append(pack.RewardItems, &welfare.PropInfo{ + ItemId: v.ItemId, + ItemNum: v.ItemNum, + }) } BagMgrSingleton.AddItems(&model.AddItemParam{ Platform: p.Platform, @@ -2059,6 +2069,12 @@ func (this *WelfareMgr) DiamondBankTakeCoin(p *Player) (retItemArr []*model.Item // 发放奖励道具 if infoData.DiamondExc != nil { var items []*model.Item + + retItemArr = append(retItemArr, &model.Item{ + ItemId: common.ItemIDDiamond, + ItemNum: addDiamond, + }) + for _, v := range infoData.DiamondExc { items = append(items, &model.Item{ ItemId: v.ItemId,