现金购买后vip经验获得调整
This commit is contained in:
parent
919129d70f
commit
8736f54fe1
|
@ -3817,9 +3817,9 @@ func (this *Player) SCVIPInfo() {
|
|||
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)
|
||||
return int32(math.Floor(float64(payTotal) * vips.MoneyRatio / 100))
|
||||
return payTotal * int64(vips.MoneyRatio)
|
||||
}
|
||||
|
||||
func (this *Player) VIPDraw(id, vip int32) {
|
||||
|
@ -3978,7 +3978,7 @@ func (this *Player) GetVIPLevel() int32 {
|
|||
vips := VipMgrSington.GetVIPcfg(this.Platform)
|
||||
vip := int32(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 {
|
||||
if allExp >= int64(v.VipEx) {
|
||||
vip = v.VipId
|
||||
|
@ -4111,7 +4111,7 @@ func (this *Player) GetPayGoodsInfo() {
|
|||
this.dirty = true
|
||||
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)
|
||||
|
||||
|
|
|
@ -3444,7 +3444,7 @@ func init() {
|
|||
player.MoneyTotal += int64(info.ConsumeTypeNum)
|
||||
player.dirty = true
|
||||
player.SendDiffData()
|
||||
info.Amount[2] = player.GetVIPExpByPay(info.ConsumeNum)
|
||||
info.Amount[2] = int32(player.GetVIPExpByPay(int64(info.ConsumeNum)))
|
||||
|
||||
var itemInfo []*playerproto.PayItem
|
||||
var items []*Item
|
||||
|
|
Loading…
Reference in New Issue