vip每日礼包加成

This commit is contained in:
sk 2024-08-05 14:16:53 +08:00
parent a227b67976
commit 3bc1019fd5
1 changed files with 10 additions and 1 deletions

View File

@ -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)