现金购买后vip经验获得调整

This commit is contained in:
sk 2024-08-22 16:07:17 +08:00
parent 919129d70f
commit 8736f54fe1
2 changed files with 5 additions and 5 deletions

View File

@ -3817,9 +3817,9 @@ func (this *Player) SCVIPInfo() {
logger.Logger.Tracef("send vipinfo to client:%v", pack) logger.Logger.Tracef("send vipinfo to client:%v", pack)
} }
func (this *Player) GetVIPExpByPay(payTotal int32) int32 { func (this *Player) GetVIPExpByPay(payTotal int64) int64 {
vips := VipMgrSington.GetVIPcfg(this.Platform) vips := VipMgrSington.GetVIPcfg(this.Platform)
return int32(math.Floor(float64(payTotal) * vips.MoneyRatio / 100)) return payTotal * int64(vips.MoneyRatio)
} }
func (this *Player) VIPDraw(id, vip int32) { func (this *Player) VIPDraw(id, vip int32) {
@ -3978,7 +3978,7 @@ func (this *Player) GetVIPLevel() int32 {
vips := VipMgrSington.GetVIPcfg(this.Platform) vips := VipMgrSington.GetVIPcfg(this.Platform)
vip := int32(0) vip := int32(0)
if vips != nil && this.MoneyPayTotal != 0 { if vips != nil && this.MoneyPayTotal != 0 {
allExp := int64(float64(this.MoneyPayTotal) * vips.MoneyRatio) allExp := this.MoneyPayTotal * int64(vips.MoneyRatio)
for _, v := range vips.List { for _, v := range vips.List {
if allExp >= int64(v.VipEx) { if allExp >= int64(v.VipEx) {
vip = v.VipId vip = v.VipId
@ -4111,7 +4111,7 @@ func (this *Player) GetPayGoodsInfo() {
this.dirty = true this.dirty = true
this.SendDiffData() this.SendDiffData()
info.Amount[2] = this.GetVIPExpByPay(info.ConsumeNum) info.Amount[2] = int32(this.GetVIPExpByPay(int64(info.ConsumeNum)))
BagMgrSingleton.AddItems(this, items, 0, info.GainWay, info.Operator, info.Remark, 0, 0, false) BagMgrSingleton.AddItems(this, items, 0, info.GainWay, info.Operator, info.Remark, 0, 0, false)

View File

@ -3444,7 +3444,7 @@ func init() {
player.MoneyTotal += int64(info.ConsumeTypeNum) player.MoneyTotal += int64(info.ConsumeTypeNum)
player.dirty = true player.dirty = true
player.SendDiffData() player.SendDiffData()
info.Amount[2] = player.GetVIPExpByPay(info.ConsumeNum) info.Amount[2] = int32(player.GetVIPExpByPay(int64(info.ConsumeNum)))
var itemInfo []*playerproto.PayItem var itemInfo []*playerproto.PayItem
var items []*Item var items []*Item