Compare commits
2 Commits
09aa018fec
...
1edaac6773
Author | SHA1 | Date |
---|---|---|
|
1edaac6773 | |
|
523ed5b296 |
|
@ -4377,12 +4377,11 @@ func (this *Player) PhoneLotteryTask(taskId int32, num int64) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Player) InviteTask(scoreType int32, gameId int32, n int64) {
|
func InviteTask(platform string, psnid, snid, scoreType int32, n int64) {
|
||||||
if this.PSnId == 0 {
|
if psnid <= 0 || snid <= 0 {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
cfg := PlatformMgrSingleton.GetConfig(platform).ActInviteConfig
|
||||||
cfg := PlatformMgrSingleton.GetConfig(this.Platform).ActInviteConfig
|
|
||||||
|
|
||||||
switch scoreType {
|
switch scoreType {
|
||||||
case common.InviteScoreTypeBind:
|
case common.InviteScoreTypeBind:
|
||||||
|
@ -4391,9 +4390,9 @@ func (this *Player) InviteTask(scoreType int32, gameId int32, n int64) {
|
||||||
score, ok := cfg.GetPayScore()[n]
|
score, ok := cfg.GetPayScore()[n]
|
||||||
if ok {
|
if ok {
|
||||||
SaveInviteScore(&model.InviteScore{
|
SaveInviteScore(&model.InviteScore{
|
||||||
Platform: this.Platform,
|
Platform: platform,
|
||||||
SnId: this.SnId,
|
SnId: snid,
|
||||||
InviteSnId: this.PSnId,
|
InviteSnId: psnid,
|
||||||
Tp: scoreType,
|
Tp: scoreType,
|
||||||
Score: score,
|
Score: score,
|
||||||
Ts: time.Now().Unix(),
|
Ts: time.Now().Unix(),
|
||||||
|
@ -4401,9 +4400,9 @@ func (this *Player) InviteTask(scoreType int32, gameId int32, n int64) {
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
SaveInviteScore(&model.InviteScore{
|
SaveInviteScore(&model.InviteScore{
|
||||||
Platform: this.Platform,
|
Platform: platform,
|
||||||
SnId: this.SnId,
|
SnId: snid,
|
||||||
InviteSnId: this.PSnId,
|
InviteSnId: psnid,
|
||||||
Tp: common.InviteScoreTypeRecharge,
|
Tp: common.InviteScoreTypeRecharge,
|
||||||
Score: cfg.GetRechargeScore(),
|
Score: cfg.GetRechargeScore(),
|
||||||
Ts: time.Now().Unix(),
|
Ts: time.Now().Unix(),
|
||||||
|
|
|
@ -101,7 +101,6 @@ func (t *TaskHandle) TaskUpdate(id int, data any) {
|
||||||
|
|
||||||
case common.TaskTypePay: // 玩家充值
|
case common.TaskTypePay: // 玩家充值
|
||||||
p.PhoneLotteryTask(common.TaskTypePay, num)
|
p.PhoneLotteryTask(common.TaskTypePay, num)
|
||||||
p.InviteTask(common.InviteScoreTypePay, int32(info.GameID), num)
|
|
||||||
|
|
||||||
case common.TaskTypeWinOrLose: // 游戏输赢金币数量
|
case common.TaskTypeWinOrLose: // 游戏输赢金币数量
|
||||||
p.PhoneLotteryTask(common.TaskTypeWinOrLose, num)
|
p.PhoneLotteryTask(common.TaskTypeWinOrLose, num)
|
||||||
|
|
|
@ -1708,6 +1708,7 @@ func init() {
|
||||||
SnId: player.SnId,
|
SnId: player.SnId,
|
||||||
Num: money,
|
Num: money,
|
||||||
})
|
})
|
||||||
|
InviteTask(msg.Platform, player.PSnId, player.SnId, common.InviteScoreTypePay, money)
|
||||||
}
|
}
|
||||||
player.SendDiffData()
|
player.SendDiffData()
|
||||||
}
|
}
|
||||||
|
@ -1781,6 +1782,7 @@ func init() {
|
||||||
logger.Logger.Errorf("model.InsertDbShopLog err:%v.", err)
|
logger.Logger.Errorf("model.InsertDbShopLog err:%v.", err)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
InviteTask(msg.Platform, findPlayer.PSnId, findPlayer.SnId, common.InviteScoreTypePay, money)
|
||||||
}
|
}
|
||||||
|
|
||||||
//账变记录
|
//账变记录
|
||||||
|
@ -4160,10 +4162,17 @@ func init() {
|
||||||
SnId: player.SnId,
|
SnId: player.SnId,
|
||||||
Num: int64(info.ConsumeNum),
|
Num: int64(info.ConsumeNum),
|
||||||
})
|
})
|
||||||
|
InviteTask(msg.Platform, player.PSnId, player.SnId, common.InviteScoreTypePay, int64(info.ConsumeNum))
|
||||||
} else {
|
} else {
|
||||||
if state == 1 {
|
if state == 1 {
|
||||||
state = 3
|
state = 3
|
||||||
}
|
}
|
||||||
|
psnid, err := model.GetPlayerInviteSnid(msg.Platform, info.SnId)
|
||||||
|
if err != nil {
|
||||||
|
logger.Logger.Error("UpdateDbShopState.err:", err)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
InviteTask(msg.Platform, psnid, info.SnId, common.InviteScoreTypePay, int64(info.ConsumeNum))
|
||||||
}
|
}
|
||||||
err := model.UpdateDbShopState(msg.Platform, msg.OrderId, state)
|
err := model.UpdateDbShopState(msg.Platform, msg.OrderId, state)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue