From 3bc1019fd519743495453ad63cd4177d98c34361 Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Mon, 5 Aug 2024 14:16:53 +0800 Subject: [PATCH] =?UTF-8?q?vip=E6=AF=8F=E6=97=A5=E7=A4=BC=E5=8C=85?= =?UTF-8?q?=E5=8A=A0=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worldsrv/player.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/worldsrv/player.go b/worldsrv/player.go index 4e3388c..0ad6015 100644 --- a/worldsrv/player.go +++ b/worldsrv/player.go @@ -3756,7 +3756,6 @@ func (this *Player) SCVIPInfo() { VipId: cfg.VipId, VipEx: cfg.VipEx, Price: cfg.Price, - Privilege1: cfg.Privilege1, Privilege2: cfg.Privilege2, Privilege3: cfg.Privilege3, Privilege4: cfg.Privilege4, @@ -3769,6 +3768,15 @@ func (this *Player) SCVIPInfo() { ShopId7: cfg.ShopId7, MatchFreeTimes: cfg.MatchFreeTimes, } + money := cfg.Privilege1[0] + // 皮肤技能加成 + add := this.GetSkillAdd(common.SkillIdVipGift) + if add > 0 { + money += int32((float64(money) * float64(add)) / 100.00) + } + data.Privilege1 = make([]int32, len(cfg.Privilege1)) + copy(data.Privilege1, cfg.Privilege1) + data.Privilege1[0] = money for itemId, itemNum := range cfg.Award { data.Item = append(data.Item, &playerproto.ItemInfo{ ItemId: int32(itemId), @@ -3802,6 +3810,7 @@ func (this *Player) SCVIPInfo() { //pack.VipId = append(pack.VipId, this.WelfData.VIPGift...) } this.SendToClient(int(playerproto.PlayerPacketID_PACKET_SC_VIPINFO), pack) + logger.Logger.Tracef("send vipinfo to client:%v", pack) } func (this *Player) GetVIPExpByPay(payTotal int32) int32 { vips := VipMgrSington.GetVIPcfg(this.Platform)