Compare commits

..

No commits in common. "1edaac6773f485ce11d8e9f14e4b01c333e12d61" and "09aa018fec93dbe7feff90ae4f16535a2b3cf630" have entirely different histories.

3 changed files with 11 additions and 18 deletions

View File

@ -4377,11 +4377,12 @@ func (this *Player) PhoneLotteryTask(taskId int32, num int64) {
}
}
func InviteTask(platform string, psnid, snid, scoreType int32, n int64) {
if psnid <= 0 || snid <= 0 {
func (this *Player) InviteTask(scoreType int32, gameId int32, n int64) {
if this.PSnId == 0 {
return
}
cfg := PlatformMgrSingleton.GetConfig(platform).ActInviteConfig
cfg := PlatformMgrSingleton.GetConfig(this.Platform).ActInviteConfig
switch scoreType {
case common.InviteScoreTypeBind:
@ -4390,9 +4391,9 @@ func InviteTask(platform string, psnid, snid, scoreType int32, n int64) {
score, ok := cfg.GetPayScore()[n]
if ok {
SaveInviteScore(&model.InviteScore{
Platform: platform,
SnId: snid,
InviteSnId: psnid,
Platform: this.Platform,
SnId: this.SnId,
InviteSnId: this.PSnId,
Tp: scoreType,
Score: score,
Ts: time.Now().Unix(),
@ -4400,9 +4401,9 @@ func InviteTask(platform string, psnid, snid, scoreType int32, n int64) {
})
} else {
SaveInviteScore(&model.InviteScore{
Platform: platform,
SnId: snid,
InviteSnId: psnid,
Platform: this.Platform,
SnId: this.SnId,
InviteSnId: this.PSnId,
Tp: common.InviteScoreTypeRecharge,
Score: cfg.GetRechargeScore(),
Ts: time.Now().Unix(),

View File

@ -101,6 +101,7 @@ func (t *TaskHandle) TaskUpdate(id int, data any) {
case common.TaskTypePay: // 玩家充值
p.PhoneLotteryTask(common.TaskTypePay, num)
p.InviteTask(common.InviteScoreTypePay, int32(info.GameID), num)
case common.TaskTypeWinOrLose: // 游戏输赢金币数量
p.PhoneLotteryTask(common.TaskTypeWinOrLose, num)

View File

@ -1708,7 +1708,6 @@ func init() {
SnId: player.SnId,
Num: money,
})
InviteTask(msg.Platform, player.PSnId, player.SnId, common.InviteScoreTypePay, money)
}
player.SendDiffData()
}
@ -1782,7 +1781,6 @@ func init() {
logger.Logger.Errorf("model.InsertDbShopLog err:%v.", err)
return nil
}
InviteTask(msg.Platform, findPlayer.PSnId, findPlayer.SnId, common.InviteScoreTypePay, money)
}
//账变记录
@ -4162,17 +4160,10 @@ func init() {
SnId: player.SnId,
Num: int64(info.ConsumeNum),
})
InviteTask(msg.Platform, player.PSnId, player.SnId, common.InviteScoreTypePay, int64(info.ConsumeNum))
} else {
if state == 1 {
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)
if err != nil {