This commit is contained in:
liwei1dao 2022-08-17 09:55:00 +08:00
commit 5452d8a93c

View File

@ -46,7 +46,10 @@ func (this *apiComp) GetReward(session comm.IUserSession, req *pb.PagodaGetRewar
if list.Reward == nil { if list.Reward == nil {
list.Reward = make(map[int32]bool, 0) list.Reward = make(map[int32]bool, 0)
} }
// 发奖励
if code = this.module.DispenseRes(session, _cfg.Reward, true); code != pb.ErrorCode_Success {
return
}
list.Reward[req.Id] = true list.Reward[req.Id] = true
mapData := make(map[string]interface{}, 0) mapData := make(map[string]interface{}, 0)
mapData["reward"] = list.Reward mapData["reward"] = list.Reward