diff --git a/common/constant.go b/common/constant.go index 730ae3d..6a5e340 100644 --- a/common/constant.go +++ b/common/constant.go @@ -793,3 +793,5 @@ const ( ) const PermitStartTsKey = "permit_start_ts" + +const PermitAdd = 0.2 // 典藏通行证赛季积分多加,百分比 diff --git a/worldsrv/action_task.go b/worldsrv/action_task.go index 30fa879..b62c7c2 100644 --- a/worldsrv/action_task.go +++ b/worldsrv/action_task.go @@ -77,7 +77,7 @@ func SendReward(p *Player, m map[int64]int64, tp int32) { var items []*Item for k, v := range m { if k == common.ItemIDPermit && isPermit { - v += v / 2 // 增加50% + v += int64(float64(v) * common.PermitAdd) } items = append(items, &Item{ ItemId: int32(k), @@ -186,7 +186,7 @@ func CSTaskReward(s *netlib.Session, packetId int, data interface{}, sid int64) SendReward(p, data.Award, msg.Tp) for k, vv := range data.GetAward() { if k == common.ItemIDPermit && isPermit { - vv += vv / 2 // 增加50% + vv += int64(float64(vv) * common.PermitAdd) } ret.Reward[k] = ret.Reward[k] + vv }