Compare commits

...

3 Commits

Author SHA1 Message Date
sk 45cb4ac678 Merge branch 'develop' of git.pogorockgames.com:mango-games/server/game into develop 2025-01-13 09:18:58 +08:00
sk 4e55ce186d add 红包雨任务 2025-01-13 09:18:48 +08:00
sk 894c28fa0e modify 推币机初始化数据 2025-01-10 16:27:06 +08:00
2 changed files with 9 additions and 4 deletions

View File

@ -53,10 +53,15 @@ func CSPushCoinInfo(s *netlib.Session, packetid int, data interface{}, sid int64
}
if p.WelfData.PushCoin == nil {
// 初始化
p.WelfData.PushCoin = &model.PushCoinData{
Power: PowerInit,
Exchange: make(map[int32]int32),
Items: make(map[int32]int64),
Items: map[int32]int64{
common.ItemIDVCard: 1,
common.ItemIDCoin: 50 * 5000,
common.ItemIDPlum: 1,
},
}
}
@ -216,9 +221,7 @@ func CSPushCoinPlayerOp(s *netlib.Session, packetid int, data interface{}, sid i
p.WelfData.PushCoin.Refresh++
// 1个v卡50个金币大梅花1个
p.WelfData.PushCoin.Items = map[int32]int64{
common.ItemIDVCard: 1,
common.ItemIDCoin: 50 * 5000,
common.ItemIDPlum: 1,
common.ItemIDCoin: 50 * 5000,
}
case activity.OpCodes_OP_Exchange:

View File

@ -2485,6 +2485,8 @@ func (this *WelfareMgr) GetRedPacket(p *Player, id int64) *welfare.SCRedPacketDr
ItemNum: reward,
}, mq.DBRedPacket)
TaskSubjectSingleton.Touch(common.TaskTypeBuyRedBag, &TaskData{SnId: p.SnId, Num: 1})
_, pack.RemainCount = RedPacketMgrInst.GetRemainTimesByConfig(p, cfg)
Send(welfare.OpResultCode_OPRC_Sucess)
return pack