Compare commits
No commits in common. "4cf1b00b4d32ac42decf5798d2e1d82193eae1db" and "6ab8c5506ee938e62e94cf2d79005e66df143810" have entirely different histories.
4cf1b00b4d
...
6ab8c5506e
|
@ -354,11 +354,6 @@ func (svc *PlayerDataSvc) GetPlayerDataBySnId(args *model.GetPlayerDataBySnIdArg
|
|||
}
|
||||
cplayerdata.Update(bson.M{"snid": args.SnId}, bson.M{"$set": param})
|
||||
}
|
||||
if p.GuideStep >= 0 && p.CreateTime.Unix() < model.GameParamData.GuideTs {
|
||||
p.GuideStep = -1
|
||||
param["guidestep"] = p.GuideStep
|
||||
cplayerdata.Update(bson.M{"snid": args.SnId}, bson.M{"$set": param})
|
||||
}
|
||||
}
|
||||
|
||||
var code string
|
||||
|
|
|
@ -15,10 +15,8 @@ type ClientLog struct {
|
|||
}
|
||||
|
||||
type CustomData struct {
|
||||
Event string `json:"event"` // 新手引导 guide
|
||||
Platform string `json:"platform"` // 平台id
|
||||
GuideTp int32 `json:"guide_tp"` // 新手引导类型 1完成步骤 2跳过新手引导
|
||||
N int64 `json:"n"` // 完成步骤的序号,或者跳过新手引导的序号
|
||||
GuideTp int32 `json:"guide_tp"`
|
||||
N int64 `json:"n"`
|
||||
}
|
||||
|
||||
type ClientLogMysql ClientLog
|
||||
|
|
|
@ -82,8 +82,7 @@ type GameParam struct {
|
|||
TestRankMatchAward bool // 测试段位奖励领取通知,直接改玩家排位积分使玩家获得奖励
|
||||
RankPlayerPermitMaxNum int32 // 赛季通行证积分排行榜最大人数
|
||||
PermitInitScore int64 // 赛季通行证初始积分
|
||||
GuideStepMaxNum int32 // 新手引导步骤最大值
|
||||
GuideTs int64 // 新手引导时间戳,小于这个时间的玩家不显示新手引导
|
||||
GuideStepMaxNum int32 // 引导步骤最大值
|
||||
}
|
||||
|
||||
var GameParamPath = "../data/gameparam.json"
|
||||
|
@ -214,7 +213,4 @@ func InitGameParam() {
|
|||
if GameParamData.GuideStepMaxNum == 0 {
|
||||
GameParamData.GuideStepMaxNum = 4
|
||||
}
|
||||
if GameParamData.GuideTs == 0 {
|
||||
GameParamData.GuideTs = 1724623200
|
||||
}
|
||||
}
|
||||
|
|
11
model/jyb.go
11
model/jyb.go
|
@ -286,10 +286,9 @@ type JybItem struct {
|
|||
}
|
||||
|
||||
type JybLog struct {
|
||||
Id string `json:"jybId"` // 礼包id
|
||||
Ts int64 `json:"ts"` // 时间戳
|
||||
SnId int32 `json:"snid"` // 玩家id
|
||||
Tp int32 `json:"tp"` // 礼包类型 1:通用礼包 2:专属礼包
|
||||
Name string `json:"name"` // 礼包名称
|
||||
Award []*JybItem `json:"award"` // 礼包奖励
|
||||
Ts int64 `json:"ts"`
|
||||
SnId int32 `json:"snid"`
|
||||
Tp int32 `json:"tp"` // 礼包类型 1:通用礼包 2:专属礼包
|
||||
Name string `json:"name"` // 礼包名称
|
||||
Award []*JybItem `json:"award"`
|
||||
}
|
||||
|
|
2
public
2
public
|
@ -1 +1 @@
|
|||
Subproject commit 5f2585b78dd35b299adec741802c83e4961de5e8
|
||||
Subproject commit 677abd66845fe40919e38580a3e269b5343b8b1c
|
|
@ -3054,10 +3054,8 @@ func CSUpdateAttribute(s *netlib.Session, packetId int, data interface{}, sid in
|
|||
switch msg.GetTp() {
|
||||
case common.AttributeGuideStep, common.AttributeGuideSkip:
|
||||
d := model.CustomData{
|
||||
Event: "guide",
|
||||
Platform: p.Platform,
|
||||
GuideTp: msg.GetTp(),
|
||||
N: int64(stepId),
|
||||
GuideTp: msg.GetTp(),
|
||||
N: int64(stepId),
|
||||
}
|
||||
b, _ := json.Marshal(d)
|
||||
LogChannelSingleton.WriteLog(&model.ClientLogMysql{
|
||||
|
|
|
@ -593,7 +593,6 @@ func (this *BagMgr) VerifyUpJybInfo(p *Player, args *model.VerifyUpJybInfoArgs)
|
|||
}
|
||||
}
|
||||
jybLog := &model.JybLog{
|
||||
Id: jyb.JybId.Hex(),
|
||||
Ts: time.Now().Unix(),
|
||||
SnId: p.SnId,
|
||||
Tp: jyb.CodeType,
|
||||
|
|
|
@ -3771,20 +3771,15 @@ func (this *Player) SCVIPInfo() {
|
|||
ShopId7: cfg.ShopId7,
|
||||
MatchFreeTimes: cfg.MatchFreeTimes + this.GetSkillAdd(common.SkillIdVipTimes),
|
||||
}
|
||||
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)
|
||||
for i := 0; i < len(cfg.Privilege1); {
|
||||
if cfg.Privilege1[i] == common.ItemIDCoin && i+1 < len(cfg.Privilege1) {
|
||||
money := cfg.Privilege1[i+1]
|
||||
// 皮肤技能加成
|
||||
add := this.GetSkillAdd(common.SkillIdVipGift)
|
||||
if add > 0 {
|
||||
money += int32((float64(money) * float64(add)) / 100.00)
|
||||
}
|
||||
cfg.Privilege1[i+1] = money
|
||||
}
|
||||
i += 2
|
||||
}
|
||||
data.Privilege1[0] = money
|
||||
for itemId, itemNum := range cfg.Award {
|
||||
data.Item = append(data.Item, &playerproto.ItemInfo{
|
||||
ItemId: int32(itemId),
|
||||
|
@ -3853,38 +3848,17 @@ func (this *Player) VIPDraw(id int32) {
|
|||
if data.VipId == this.VIP {
|
||||
pack.OpRetCode = playerproto.OpResultCode_OPRC_Sucess
|
||||
this.WelfData.VIPBag[this.VIP][0] = 1
|
||||
var money, addVipExp int64
|
||||
for i := 0; i < len(data.Privilege1); {
|
||||
if i+1 < len(data.Privilege1) {
|
||||
switch data.Privilege1[i] {
|
||||
case common.ItemIDCoin:
|
||||
money = int64(data.Privilege1[i+1])
|
||||
// 皮肤技能加成
|
||||
add := this.GetSkillAdd(common.SkillIdVipGift)
|
||||
if add > 0 {
|
||||
money += int64((float64(money) * float64(add)) / 100.00)
|
||||
}
|
||||
this.AddCoin(money, 0, common.GainWay_VIPGift, "sys", "VIP每日礼包")
|
||||
case common.ItemIDVipExp:
|
||||
addVipExp = int64(float64(data.Privilege1[i+1]) / vips.MoneyRatio)
|
||||
this.AddMoneyPayTotal(addVipExp)
|
||||
default:
|
||||
BagMgrSingleton.AddItemsV2(&ItemParam{
|
||||
P: this,
|
||||
Change: []*Item{
|
||||
{
|
||||
ItemId: data.Privilege1[i],
|
||||
ItemNum: int64(data.Privilege1[i+1]),
|
||||
},
|
||||
},
|
||||
GainWay: common.GainWay_VIPGift,
|
||||
Operator: "system",
|
||||
Remark: "VIP每日礼包",
|
||||
})
|
||||
}
|
||||
}
|
||||
i += 2
|
||||
//金币数量
|
||||
money := data.Privilege1[0]
|
||||
// 皮肤技能加成
|
||||
add := this.GetSkillAdd(common.SkillIdVipGift)
|
||||
if add > 0 {
|
||||
money += int32((float64(money) * float64(add)) / 100.00)
|
||||
}
|
||||
//vip经验
|
||||
addVipExp := int64(float64(data.Privilege1[1]) / vips.MoneyRatio)
|
||||
this.AddCoin(int64(money), 0, common.GainWay_VIPGift, "sys", "VIP每日礼包")
|
||||
this.AddMoneyPayTotal(addVipExp)
|
||||
pack.Vip = this.VIP
|
||||
logger.Logger.Tracef("玩家领取VIP每日礼包成功!snid = %v,Vip = %v,金币数量 = %v,addVipEx = %v", this.SnId, this.VIP, money, addVipExp)
|
||||
//VIP礼包统计数据
|
||||
|
|
Loading…
Reference in New Issue