资源类型枚举处理

This commit is contained in:
meixiongfeng 2023-11-14 10:47:04 +08:00
parent 9c87a69872
commit 4bb8858cc5
141 changed files with 170 additions and 157 deletions

View File

@ -1133,3 +1133,8 @@ const (
OpencondTypePagoda OpencondType = 5 //爬塔
OpencondTypeSociaty OpencondType = 6 //工会等级
)
const (
GMResAddType int32 = 0
GMResDelType int32 = 1
)

View File

@ -69,7 +69,7 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.AcademyReceiveRe
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.ModuleBuried.TriggerBuried(session, comm.GetBuriedParam(comm.Rtype151, 1))
this.module.WriteUserLog(session.GetUserId(), "AcademyReceiveReq", level.Award)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "AcademyReceiveReq", level.Award)
})
}

View File

@ -67,7 +67,7 @@ func (this *apiComp) TeachingReceive(session comm.IUserSession, req *pb.AcademyT
this.module.DispenseRes(session, level.Award, true)
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "AcademyTeachingReceiveReq", level.Award)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "AcademyTeachingReceiveReq", level.Award)
})
}
session.SendMsg(string(this.module.GetType()), "teachingreceive", &pb.AcademyTeachingReceiveResp{Issucc: true})

View File

@ -81,7 +81,7 @@ func (this *apiComp) Award(session comm.IUserSession, req *pb.AchieveAwardReq) (
session.SendMsg(string(this.module.GetType()), "award", &pb.AchieveAwardResp{Id: req.Id, Award: atno})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "AchieveAwardReq", conf.TaskReward)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "AchieveAwardReq", conf.TaskReward)
})
return
}

View File

@ -98,7 +98,7 @@ func (this *apiComp) GetReward(session comm.IUserSession, req *pb.ActivityGetRew
})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "ActivityGetRewardReq", reward)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "ActivityGetRewardReq", reward)
})
return
}

View File

@ -77,7 +77,7 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.AddRechargeRecei
session.SendMsg(string(this.module.GetType()), "receive", &pb.AddRechargeReceiveResp{Id: req.Id, Award: award})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "AddRechargeReceiveReq", award)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "AddRechargeReceiveReq", award)
})
return
}

View File

@ -79,7 +79,7 @@ func (this *apiComp) ReceiveAll(session comm.IUserSession, req *pb.AddRechargeRe
})
session.SendMsg(string(this.module.GetType()), "receiveall", &pb.AddRechargeReceiveAllResp{Record: info.Record, Award: award})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "AddRechargeReceiveAllReq", award)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "AddRechargeReceiveAllReq", award)
})
return
}

View File

@ -99,7 +99,7 @@ func (this *apiComp) Buy(session comm.IUserSession, req *pb.ArenaBuyReq) (errdat
session.SendMsg(string(this.module.GetType()), "buy", &pb.MoonfantasyBuyResp{Issucc: true, BattleNum: info.Buynum})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "MoonfantasyBuyReq", []*cfg.Gameatn{{A: ticketitem.A, T: ticketitem.T, N: req.BuyNum}})
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "MoonfantasyBuyReq", []*cfg.Gameatn{{A: ticketitem.A, T: ticketitem.T, N: req.BuyNum}})
})
return
}

View File

@ -289,7 +289,7 @@ func (this *apiComp) ChallengeReward(session comm.IUserSession, req *pb.ArenaCha
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.ModuleBuried.TriggerBuried(session, tasks...)
if bReward {
this.module.WriteUserLog(session.GetUserId(), "ArenaChallengeRewardReq", reward.WinReward)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "ArenaChallengeRewardReq", reward.WinReward)
}
})

View File

@ -98,7 +98,7 @@ func (this *apiComp) PlotReward(session comm.IUserSession, req *pb.ArenaPlotRewa
})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "ArenaPlotRewardReq", atno)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "ArenaPlotRewardReq", atno)
})
return
}

View File

@ -73,7 +73,7 @@ func (this *apiComp) Award(session comm.IUserSession, req *pb.AtlasAwardReq) (er
Res: respRes,
})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "AtlasAwardReq", respRes)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "AtlasAwardReq", respRes)
})
return
}

View File

@ -63,7 +63,7 @@ func (this *apiComp) Award(session comm.IUserSession, req *pb.CanineRabbitAwardR
session.SendMsg(string(this.module.GetType()), "award", &pb.CanineRabbitAwardResp{Type: req.Type, Awardmap: info.Award, Award: atno})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "CanineRabbitAwardReq", res)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "CanineRabbitAwardReq", res)
})
return
}

View File

@ -71,7 +71,7 @@ func (this *apiComp) AllWeekReward(session comm.IUserSession, req *pb.Captureshe
}
session.SendMsg(string(this.module.GetType()), "allweekreward", &pb.CapturesheepAllWeekRewardResp{Weekreward: info.Weekreward, Award: award})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "CapturesheepAllWeekRewardReq", award)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "CapturesheepAllWeekRewardReq", award)
})
return
}

View File

@ -134,7 +134,7 @@ func (this *apiComp) Over(session comm.IUserSession, req *pb.CapturesheepOverReq
})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "CapturesheepOverReq", award)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "CapturesheepOverReq", award)
})
return
}

View File

@ -74,7 +74,7 @@ func (this *apiComp) WeekReward(session comm.IUserSession, req *pb.CapturesheepW
session.SendMsg(string(this.module.GetType()), "weekreward", &pb.CapturesheepWeekRewardResp{Id: req.Id, Award: award})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "CapturesheepWeekRewardReq", award)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "CapturesheepWeekRewardReq", award)
})
return
}

View File

@ -116,7 +116,7 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.CaravanBuyOrSe
this.module.Errorf("获得虚拟币失败:%v", errdata)
}
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "troll sell", addRes)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "troll sell", addRes)
})
this.module.ArrayBag(caravan)
@ -232,7 +232,7 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.CaravanBuyOrSe
this.module.Errorf("获得虚拟币失败:%v", errdata)
}
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "troll buy", []*cfg.Gameatn{{
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "troll buy", []*cfg.Gameatn{{
A: "attr",
T: "merchantmoney",
N: addScore,

View File

@ -99,7 +99,7 @@ func (this *apiComp) GetReward(session comm.IUserSession, req *pb.CaravanGetRewa
})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "CaravanGetRewardReq", atno)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "CaravanGetRewardReq", atno)
})
return
}

View File

@ -222,7 +222,7 @@ func (this *Caravan) InitCaravanTicket(session comm.IUserSession, conf *cfg.Game
errdata = this.DispenseRes(session, res, true) // 推送门票和虚拟币资源
go this.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.WriteUserLog(session.GetUserId(), "InitCaravanTicket", res)
this.WriteUserLog(session.GetUserId(), 0, "InitCaravanTicket", res)
})
return
}
@ -387,7 +387,7 @@ func (this *Caravan) TaskComplete(session comm.IUserSession, taskid ...int32) {
}
session.SendMsg(string(this.GetType()), "taskcomplete", resp)
go this.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.WriteUserLog(session.GetUserId(), "TaskComplete", conf.Reword)
this.WriteUserLog(session.GetUserId(), 0, "TaskComplete", conf.Reword)
})
}
}

View File

@ -54,7 +54,7 @@ func (this *apiComp) Award(session comm.IUserSession, req *pb.CatchbugsAwardReq)
session.SendMsg(string(this.module.GetType()), "award", &pb.CatchbugsAwardResp{Awardmap: info.Awards, Award: atno})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "CatchbugsAwardReq", atno)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "CatchbugsAwardReq", atno)
})
return
}

View File

@ -153,7 +153,7 @@ func (this *apiComp) Ask(session comm.IUserSession, req *pb.CombatAskReq) (errda
session.SendMsg(string(this.module.GetType()), "ask", &pb.CombatAskResp{Level: pitem})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "CombatAskReq", reward)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "CombatAskReq", reward)
})
return
}

View File

@ -101,7 +101,7 @@ func (this *apiComp) ChallengeReceive(session comm.IUserSession, req *pb.CombatC
}
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "CombatChallengeReceiveReq", atns)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "CombatChallengeReceiveReq", atns)
})
}
session.SendMsg(string(this.module.GetType()), "challengereceive", &pb.CombatChallengeReceiveResp{Level: req.Level, Manster: req.Manster, Atns: atns})

View File

@ -112,7 +112,7 @@ func (this *apiComp) Drop(session comm.IUserSession, req *pb.CombatDropReq) (err
session.SendMsg(string(this.module.GetType()), "drop", &pb.CombatDropResp{Level: req.Level, Atns: atns})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "CombatDropReq", atns)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "CombatDropReq", atns)
})
return
}

View File

@ -58,7 +58,7 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.DailytaskReceive
session.SendMsg(string(this.module.GetType()), "receive", &pb.DailytaskReceiveResp{Award: atno})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "DailytaskReceiveReq", atno)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "DailytaskReceiveReq", atno)
})
return
}

View File

@ -81,7 +81,7 @@ func (this *apiComp) Award(session comm.IUserSession, req *pb.DColorAwardReq) (e
session.SendMsg(string(this.module.GetType()), "award", &pb.DColorAwardResp{Atype: req.Atype, Award: atno, Awardmap: awards})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "DColorAwardReq", atno)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "DColorAwardReq", atno)
})
return
}

View File

@ -71,7 +71,7 @@ func (a *apiComp) Autoreceive(session comm.IUserSession, req *pb.DispatchAutoRec
session.SendMsg(string(a.module.GetType()), "autoreceive", rsp)
go a.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
a.module.WriteUserLog(session.GetUserId(), "DispatchAutoReceiveReq", res)
a.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "DispatchAutoReceiveReq", res)
})
return
}

View File

@ -69,7 +69,7 @@ func (a *apiComp) Notice(session comm.IUserSession, req *pb.DispatchNoticeReq) (
a.module.DispenseRes(session, []*cfg.Gameatn{atn}, true)
go a.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
a.module.WriteUserLog(session.GetUserId(), "恢复门票", atn)
a.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "恢复门票", atn)
})
}
}

View File

@ -94,7 +94,7 @@ func (a *apiComp) Receive(session comm.IUserSession, req *pb.DispatchReceiveReq)
session.SendMsg(string(a.module.GetType()), "receive", rsp)
go a.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
a.module.WriteUserLog(session.GetUserId(), "DispatchReceiveReq", res)
a.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "DispatchReceiveReq", res)
})
return
}

View File

@ -59,7 +59,7 @@ func (a *apiComp) Weekrecive(session comm.IUserSession, req *pb.DispatchWeekReci
if len(res) > 0 {
a.module.DispenseRes(session, res, true)
go a.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
a.module.WriteUserLog(session.GetUserId(), "DispatchWeekReciveReq", res)
a.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "DispatchWeekReciveReq", res)
})
}
session.SendMsg(string(a.module.GetType()), "weekrecive", rsp)

View File

@ -170,7 +170,7 @@ func (this *apiComp) Train(session comm.IUserSession, req *pb.DragonTrainReq) (e
if curLv > preLv { // 升级后统计任务
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.ModuleBuried.TriggerBuried(session, comm.GetBuriedParam(comm.Rtype235, dragon.Lv, utils.ToInt32(dragon.Dragonid)))
this.module.WriteUserLog(session.GetUserId(), "DragonTrainReq", atno)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "DragonTrainReq", atno)
})
}
return

View File

@ -58,7 +58,7 @@ func (this *apiComp) Award(session comm.IUserSession, req *pb.EgghuntAwardReq) (
session.SendMsg(string(this.module.GetType()), "award", &pb.EgghuntAwardResp{Id: req.Id, Award: atno})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "EgghuntAwardReq", atno)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "EgghuntAwardReq", atno)
})
return
}

View File

@ -100,7 +100,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.EnchantCha
return
}
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "EnchantChallengeOverReq", res)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "EnchantChallengeOverReq", res)
})
}

View File

@ -88,7 +88,7 @@ func (this *apiComp) BoxReward(session comm.IUserSession, req *pb.EntertainBoxRe
})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "EntertainBoxRewardReq", atno)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "EntertainBoxRewardReq", atno)
})
return
}

View File

@ -66,7 +66,7 @@ func (this *apiComp) Reward(session comm.IUserSession, req *pb.EntertainRewardRe
})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "EntertainRewardReq", atno)
this.module.WriteUserLog(session.GetUserId(),0, "EntertainRewardReq", atno)
})
return
}

View File

@ -582,7 +582,7 @@ func (this *Room) GameOver() (errdata *pb.ErrorData) {
return
}
go this.module.AsynHandleSession(this.szSession[winindex], func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "xxlGame", atno)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "xxlGame", atno)
})
this.szSession[winindex].Push()
}

View File

@ -110,7 +110,7 @@ func (this *apiComp) Sell(session comm.IUserSession, req *pb.EquipmentSellReq) (
}
session.SendMsg(string(this.module.GetType()), "sell", &pb.EquipmentSellResp{IsSucc: true, Reward: reward})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "EquipmentSellReq", reward)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "EquipmentSellReq", reward)
})
return
}

View File

@ -418,7 +418,7 @@ func (this *Equipment) SellEquipments(session comm.IUserSession, equs []string)
}
go func() {
this.WriteUserLog(session.GetUserId(), "SellEquipments", atno)
this.WriteUserLog(session.GetUserId(), 0, "SellEquipments", atno)
}()
return
}
@ -515,7 +515,7 @@ func (this *Equipment) RecycleEquipments(session comm.IUserSession, equs []strin
return
}
go func() {
this.WriteUserLog(session.GetUserId(), "RecycleEquipments", atno)
this.WriteUserLog(session.GetUserId(), 0, "RecycleEquipments", atno)
}()
return
}

View File

@ -61,7 +61,7 @@ func (this *apiComp) Getreward(session comm.IUserSession, req *pb.FriendGetrewar
session.SendMsg(string(this.module.GetType()), "getreward", rsp)
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "FriendGetrewardReq", globalConf.FriendPeize)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "FriendGetrewardReq", globalConf.FriendPeize)
})
return
}

View File

@ -133,7 +133,7 @@ func (this *apiComp) Zan(session comm.IUserSession, req *pb.FriendZanReq) (errda
// 赠送X次友情点
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.ModuleBuried.TriggerBuried(session, comm.GetBuriedParam(comm.Rtype11, 1))
this.module.WriteUserLog(session.GetUserId(), "FriendGetrewardReq", res)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "FriendGetrewardReq", res)
})
return
}

View File

@ -62,7 +62,7 @@ func (this *apiComp) ActivateAtlas(session comm.IUserSession, req *pb.GourmetAct
})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "GourmetActivateAtlasReq", conf.Unlockreward)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "GourmetActivateAtlasReq", conf.Unlockreward)
})
return
}

View File

@ -100,7 +100,7 @@ func (this *apiComp) CreateFood(session comm.IUserSession, req *pb.GourmetCreate
})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.ModuleBuried.TriggerBuried(session, comm.GetBuriedParam(comm.Rtype150, 1))
this.module.WriteUserLog(session.GetUserId(), "GourmetCreateFoodReq", atn)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "GourmetCreateFoodReq", atn)
})
return
}

View File

@ -116,7 +116,7 @@ func (this *apiComp) Advreceive(session comm.IUserSession, req *pb.GrowtaskAdvRe
})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "GrowtaskAdvReceiveReq", atno)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "GrowtaskAdvReceiveReq", atno)
})
return
}

View File

@ -77,7 +77,7 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.GrowtaskReceiveR
})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "GrowtaskReceiveReq", reward)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "GrowtaskReceiveReq", reward)
})
return
}

View File

@ -206,7 +206,7 @@ func (this *apiComp) ChallengeFinish(session comm.IUserSession, req *pb.GuildGve
Boosticket: member.Boosticket,
})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "GuildGveChallengeFinishReq", award)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "GuildGveChallengeFinishReq", award)
})
return
}

View File

@ -73,7 +73,7 @@ func (this *apiComp) Roulette(session comm.IUserSession, req *pb.GuildGveRoulett
session.SendMsg(string(this.module.GetType()), "roulette", &pb.GuildGveRouletteResp{Cid: confs[index].Id, Award: award})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "GuildGveRouletteReq", confs[index].Reward)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "GuildGveRouletteReq", confs[index].Reward)
})
return
}

View File

@ -372,7 +372,7 @@ func (this *apiComp) DrawCard(session comm.IUserSession, req *pb.HeroDrawCardReq
this.module.SendTaskMsg(session, szStar, req.DrawCount, req.DrawType)
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "HeroDrawCardReq", atno)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "HeroDrawCardReq", atno)
})
return
}

View File

@ -100,7 +100,7 @@ func (this *apiComp) PeachReward(session comm.IUserSession, req *pb.HeroPeachRew
session.SendMsg(string(this.module.GetType()), HeroPeachRewardReq, rsp)
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "HeroPeachRewardReq", reward)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "HeroPeachRewardReq", reward)
})
return
}

View File

@ -117,7 +117,7 @@ func (this *apiComp) StrengthenUpStar(session comm.IUserSession, req *pb.HeroStr
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.ModuleBuried.TriggerBuried(session, tasks...)
if len(starConf.Starup) > 0 {
this.module.WriteUserLog(session.GetUserId(), "HeroStrengthenUpStarReq", starConf.Starup)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "HeroStrengthenUpStarReq", starConf.Starup)
}
})
return

View File

@ -73,7 +73,7 @@ func (this *apiComp) TalentReset(session comm.IUserSession, req *pb.HeroTalentRe
this.module.Errorf("DispenseRes err,uid:%s,item:%v", session.GetUserId(), res)
} // 返还升级的天赋点数
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "HeroTalentResetReq", res)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "HeroTalentResetReq", res)
})
}

View File

@ -868,7 +868,7 @@ func (this *ModelHero) createHero(session comm.IUserSession, heroCfgId string, c
if len(res) > 0 { // 资源统一发放
this.module.DispenseRes(session, res, true)
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "create hero", res)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "create hero", res)
})
}
return
@ -973,7 +973,7 @@ func (this *ModelHero) GetDrawCardReward(session comm.IUserSession, szCards []st
rsp = append(rsp, &pb.AtnoData{Atno: atno})
}
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "GetDrawCardReward", rsp)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "GetDrawCardReward", rsp)
})
return
}

View File

@ -108,7 +108,7 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.HeroTaskReceiveR
}
session.SendMsg(string(this.module.GetType()), "receive", &pb.HeroTaskReceiveResp{Hero: req.Hero, Stage: req.Stage, Award: award})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "HeroTaskReceiveReq", award)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "HeroTaskReceiveReq", award)
})
return

View File

@ -71,7 +71,7 @@ func (this *apiComp) Reset(session comm.IUserSession, req *pb.HoroscopeResetReq)
}
session.SendMsg(string(this.module.GetType()), "reset", &pb.HoroscopeResetResp{Issucc: true, Info: info, Award: consume})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "HoroscopeResetReq", res)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "HoroscopeResetReq", res)
})
return

View File

@ -204,7 +204,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.HuntingCha
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype200, 1))
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.ModuleBuried.TriggerBuried(session, tasks...)
this.module.WriteUserLog(session.GetUserId(), "HuntingChallengeOverReq", szAtno)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "HuntingChallengeOverReq", szAtno)
})
return
}

View File

@ -93,7 +93,7 @@ func (this *apiComp) Complete(session comm.IUserSession, req *pb.IsLandCompleteR
session.SendMsg(string(this.module.GetType()), "complete", &pb.IsLandCompleteResp{Level: req.Level, Award: award})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "IsLandCompleteReq", award)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "IsLandCompleteReq", award)
})
return
}

View File

@ -70,7 +70,7 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.IsLandReceiveReq
session.SendMsg(string(this.module.GetType()), "receive", &pb.IsLandReceiveResp{Info: info, Award: award})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "IsLandReceiveReq", award)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "IsLandReceiveReq", award)
})
return
}

View File

@ -109,7 +109,7 @@ func (this *apiComp) BuyPhysical(session comm.IUserSession, req *pb.ItemsBuyPhys
})
session.SendMsg(string(this.module.GetType()), "buyphysical", &pb.ItemsBuyPhysicalResp{Issucc: true, PhysicalBuyNum: user.Physicalbuynum, Asets: atno})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "ItemsBuyPhysicalReq", atno)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "ItemsBuyPhysicalReq", atno)
})
return
}

View File

@ -92,7 +92,7 @@ func (this *apiComp) Decompose(session comm.IUserSession, req *pb.ItemsDecompose
session.SendMsg(string(this.module.GetType()), "decompose", &pb.ItemsDecomposeResp{GridId: req.GridId, Amount: req.Amount, Issucc: true, Asets: atno})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "ItemsDecomposeReq", atno)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "ItemsDecomposeReq", atno)
})
return
}

View File

@ -71,7 +71,7 @@ func (this *apiComp) PotionSynthesis(session comm.IUserSession, req *pb.ItemsPot
session.SendMsg(string(this.module.GetType()), "potionsynthesis", &pb.ItemsPotionSynthesisResp{Succ: true, Id: req.Id, Num: req.Num})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "ItemsPotionSynthesisReq", give)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "ItemsPotionSynthesisReq", give)
})
return

View File

@ -73,7 +73,7 @@ func (this *apiComp) SellItem(session comm.IUserSession, req *pb.ItemsSellItemRe
}
session.SendMsg(string(this.module.GetType()), "sellitem", &pb.ItemsSellItemResp{GridId: req.GridId, Amount: req.Amount, Issucc: true, Asets: atno})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "ItemsSellItemReq", atno)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "ItemsSellItemReq", atno)
})
return
}

View File

@ -88,7 +88,7 @@ func (this *apiComp) Sellinbulk(session comm.IUserSession, req *pb.ItemsSellinbu
session.SendMsg(string(this.module.GetType()), "sellitem", &pb.ItemsSellinbulkResp{Grids: req.Grids, Amount: req.Amount, Issucc: issucc})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "ItemsSellinbulkReq", sale)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "ItemsSellinbulkReq", sale)
})
return
}

View File

@ -546,7 +546,7 @@ func (this *ModelItemsComp) buyTicket(session comm.IUserSession, buy int32) (inf
})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "buyTicket", res)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "buyTicket", res)
})
return
}
@ -604,7 +604,7 @@ func (this *ModelItemsComp) recoverTicket(session comm.IUserSession) (errdata *p
this.module.DispenseRes(session, []*cfg.Gameatn{{A: ticketitem.A, T: ticketitem.T, N: ticketNum}}, true)
info.Recovertimeunifiedticket = time.Unix(info.Recovertimeunifiedticket, 0).Add(time.Duration(ticketNum) * time.Minute).Unix()
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "recoverTicket", []*cfg.Gameatn{{A: ticketitem.A, T: ticketitem.T, N: ticketNum}})
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "recoverTicket", []*cfg.Gameatn{{A: ticketitem.A, T: ticketitem.T, N: ticketNum}})
})
}
}
@ -829,7 +829,7 @@ func (this *ModelItemsComp) useitem(session comm.IUserSession, gid string, amoun
}
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "useitem", atno)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "useitem", atno)
})
return
}

View File

@ -365,7 +365,7 @@ func (this *Items) SellItem(session comm.IUserSession, items map[string]int32, b
this.itemsChangePush(session, change) //推送道具背包变化
}
go this.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.WriteUserLog(session.GetUserId(), "SellItem", atno)
this.WriteUserLog(session.GetUserId(), 0, "SellItem", atno)
})
return
}

View File

@ -92,7 +92,7 @@ func (this *apiComp) Reward(session comm.IUserSession, req *pb.JielongRewardReq)
})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "JielongRewardReq", atno)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "JielongRewardReq", atno)
})
return
}

View File

@ -104,7 +104,7 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.KFTaskReceiveReq
})
session.SendMsg(string(this.module.GetType()), "receive", &pb.KFTaskReceiveResp{Id: req.Id, Award: award})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "KFTaskReceiveReq", award)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "KFTaskReceiveReq", award)
})
return

View File

@ -108,7 +108,7 @@ func (this *apiComp) GetStoryReward(session comm.IUserSession, req *pb.LibraryGe
})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "LibraryGetStoryRewardReq", atno)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "LibraryGetStoryRewardReq", atno)
})
return
}

View File

@ -73,7 +73,7 @@ func (this *apiComp) LvReward(session comm.IUserSession, req *pb.LibraryLvReward
Reward: atno,
})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "LibraryLvRewardReq", atno)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "LibraryLvRewardReq", atno)
})
return
}

View File

@ -69,7 +69,7 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.LinestoryReceive
}
session.SendMsg(string(this.module.GetType()), LinestorySubTypeReceive, rsp)
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "LinestoryReceiveReq", conf.Reward)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "LinestoryReceiveReq", conf.Reward)
})
return
}

View File

@ -61,7 +61,7 @@ func (this *apiComp) GetUserMailAttachment(session comm.IUserSession, req *pb.Ma
session.SendMsg(string(this.module.GetType()), "getusermailattachment", &pb.MailGetUserMailAttachmentResp{Mail: mail})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "MailGetUserMailAttachmentReq", res)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "MailGetUserMailAttachmentReq", res)
})
return
}
@ -124,7 +124,7 @@ func (this *apiComp) GetAllMailAttachment(session comm.IUserSession, req *pb.Mai
Ids: mailIds,
})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "MailGetAllMailAttachmentReq", atno)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "MailGetAllMailAttachmentReq", atno)
})
return
}

View File

@ -87,7 +87,7 @@ func (this *apiComp) BoosChallengeOver(session comm.IUserSession, req *pb.Mainli
Reward: aeward,
})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "MainlineBoosChallengeOverReq", aeward)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "MainlineBoosChallengeOverReq", aeward)
})
return
}

View File

@ -82,7 +82,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.MainlineCh
}) // 数据推送
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "MainlineChallengeOverReq false", conf.PsConsume)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "MainlineChallengeOverReq false", conf.PsConsume)
})
return
}
@ -197,7 +197,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.MainlineCh
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.ModuleBuried.TriggerBuried(session, tasks...)
this.module.ModuleSys.CheckOpenCond(session, comm.OpencondTypeMaxmapid, req.Level)
this.module.WriteUserLog(session.GetUserId(), "MainlineChallengeOverReq", reward)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "MainlineChallengeOverReq", reward)
})
return
}

View File

@ -137,7 +137,7 @@ func (this *apiComp) LevelPass(session comm.IUserSession, req *pb.MainlineLevelP
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.ModuleBuried.TriggerBuried(session, tasks...)
this.module.WriteUserLog(session.GetUserId(), "MainlineLevelPassReq", aeward)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "MainlineLevelPassReq", aeward)
})
return
}

View File

@ -156,7 +156,7 @@ func (this *apiComp) ReceiveAward(session comm.IUserSession, req *pb.MainlineRec
})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "MainlineReceiveAwardReq", reward)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "MainlineReceiveAwardReq", reward)
})
return
}

View File

@ -92,7 +92,7 @@ func (this *apiComp) ShopBuy(session comm.IUserSession, req *pb.MainlineShopBuyR
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.ModuleBuried.TriggerBuried(session, tasks...)
this.module.WriteUserLog(session.GetUserId(), "MainlineShopBuyReq", atno)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "MainlineShopBuyReq", atno)
})
return
}

View File

@ -96,7 +96,7 @@ func (this *apiComp) TaskChapteReward(session comm.IUserSession, req *pb.Mainlin
})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "MainlineTaskChapteRewardReq", award)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "MainlineTaskChapteRewardReq", award)
})
return
}

View File

@ -78,7 +78,7 @@ func (this *apiComp) TaskReceive(session comm.IUserSession, req *pb.MainlineTask
session.SendMsg(string(this.module.GetType()), "taskreceive", &pb.MainlineTaskReceiveResp{Id: req.Id, Award: award})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "MainlineTaskReceiveReq", award)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "MainlineTaskReceiveReq", award)
})
return
}

View File

@ -39,16 +39,22 @@ func (this *modelUserLog) Init(service core.IService, module core.IModule, comp
}
// 用户操作明细数据记录
func (this *modelUserLog) AddUserLog(uid string, tag string, data interface{}) {
func (this *modelUserLog) AddUserLog(uid string, itype int32, tag string, data interface{}) {
var (
dbModel *db.DBModel
err error
jsonStr []byte
logType string
)
if jsonStr, err = json.Marshal(data); err != nil {
log.Errorln(err)
return
}
if itype == 0 {
logType = "add" // 新增资源类型
} else if itype == 1 {
logType = "sub" // 消耗资源类型
}
if db.IsCross() { //如果是跨服 直接找到对应的本服
if tag, _, b := utils.UIdSplit(uid); b {
if conn, err := db.ServerDBConn(tag); err == nil {
@ -57,6 +63,7 @@ func (this *modelUserLog) AddUserLog(uid string, tag string, data interface{}) {
Id: primitive.NewObjectID().Hex(),
Uid: uid,
ExpireAt: time.Now().Add(time.Hour * 24 * 8).Unix(),
Logtype: logType,
Tag: tag,
Data: string(jsonStr),
}); err != nil {
@ -71,6 +78,7 @@ func (this *modelUserLog) AddUserLog(uid string, tag string, data interface{}) {
Uid: uid,
ExpireAt: time.Now().Add(time.Hour * 24 * 8).Unix(),
Tag: tag,
Logtype: logType,
Data: string(jsonStr),
}); err != nil {
log.Errorln(err)

View File

@ -955,6 +955,6 @@ func (this *ModuleBase) AsynHandleSession(session comm.IUserSession, handle func
}
//写用户日志
func (this *ModuleBase) WriteUserLog(uid string, tag string, data interface{}) {
this.userlog.AddUserLog(uid, tag, data)
func (this *ModuleBase) WriteUserLog(uid string, itype int32, tag string, data interface{}) {
this.userlog.AddUserLog(uid, itype, tag, data)
}

View File

@ -44,7 +44,7 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.MoonfantasyRecei
return
}
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "MoonfantasyReceiveReq", boss.PsMg)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "MoonfantasyReceiveReq", boss.PsMg)
})
return
} else {
@ -54,7 +54,7 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.MoonfantasyRecei
this.module.DispenseRes(session, boss.Prize, true)
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "MoonfantasyReceiveReq", boss.Prize)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "MoonfantasyReceiveReq", boss.Prize)
})
}

View File

@ -63,7 +63,7 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.OldtimesReceiveR
if len(res) > 0 {
this.module.DispenseRes(session, res, true)
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "OldtimesReceiveReq", res)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "OldtimesReceiveReq", res)
})
}
session.SendMsg(string(this.module.GetType()), "receive", rsp)

View File

@ -192,7 +192,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.PagodaChal
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.ModuleSys.CheckOpenCond(session, comm.OpencondTypePagoda, conf.Key)
this.module.ModuleBuried.TriggerBuried(session, comm.GetBuriedParam(comm.Rtype168, pagoda.Data[conf.Tab], conf.Tab))
this.module.WriteUserLog(session.GetUserId(), "PagodaChallengeOverReq", conf.Reward)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "PagodaChallengeOverReq", conf.Reward)
})
return
}

View File

@ -68,7 +68,7 @@ func (this *apiComp) GetReward(session comm.IUserSession, req *pb.PagodaGetRewar
Atno: atno,
})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "PagodaGetRewardReq", atno)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "PagodaGetRewardReq", atno)
})
}
return

View File

@ -188,7 +188,7 @@ func (this *apiComp) ChallengeRaceOver(session comm.IUserSession, req *pb.Pagoda
}
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.ModuleBuried.TriggerBuried(session, tasks...)
this.module.WriteUserLog(session.GetUserId(), "PagodaChallengeRaceOverReq", atno)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "PagodaChallengeRaceOverReq", atno)
})
return
}

View File

@ -71,7 +71,7 @@ func (this *apiComp) AllWeekReward(session comm.IUserSession, req *pb.ParkourAll
}
session.SendMsg(string(this.module.GetType()), "allweekreward", &pb.CapturesheepAllWeekRewardResp{Weekreward: info.Weekreward, Award: award})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "CapturesheepAllWeekRewardReq", award)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "CapturesheepAllWeekRewardReq", award)
})
return
}

View File

@ -74,7 +74,7 @@ func (this *apiComp) WeekReward(session comm.IUserSession, req *pb.ParkourWeekRe
}
session.SendMsg(string(this.module.GetType()), "weekreward", &pb.CapturesheepWeekRewardResp{Id: req.Id, Award: award})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "CapturesheepWeekRewardReq", award)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "CapturesheepWeekRewardReq", award)
})
return
}

View File

@ -584,7 +584,7 @@ func (this *Parkour) overtimer(task *timewheel.Task, args ...interface{}) {
Award: award[v.GetUserId()],
})
go this.AsynHandleSession(v, func(session comm.IUserSession) {
this.WriteUserLog(session.GetUserId(), "ParkourRaceOverPush", award[v.GetUserId()])
this.WriteUserLog(session.GetUserId(), 0, "ParkourRaceOverPush", award[v.GetUserId()])
})
sessions = append(sessions, v)
}

View File

@ -143,7 +143,7 @@ func (this *modelActivityComp) deliverybyid(session comm.IUserSession, id int32)
return
}
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "deliverybyid", conf.Item)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "deliverybyid", conf.Item)
})
return
}
@ -210,7 +210,7 @@ func (this *modelActivityComp) delivery(session comm.IUserSession, pid string) (
return
}
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "delivery", conf.Item)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "delivery", conf.Item)
})
return
}

View File

@ -103,7 +103,7 @@ func (this *modelDailyComp) deliverybyid(session comm.IUserSession, id int32) (e
return
}
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "deliverybyid", conf.Item)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "deliverybyid", conf.Item)
})
return
}
@ -154,7 +154,7 @@ func (this *modelDailyComp) delivery(session comm.IUserSession, pid string) (err
return
}
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "delivery", conf.Item)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "delivery", conf.Item)
})
return
}

View File

@ -208,7 +208,7 @@ func (this *Pay) Rpc_ModulePayDelivery(ctx context.Context, args *pb.PayDelivery
go this.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.ModuleHero.RechargeMoney(args.Uid, args.Price)
this.ModuleBuried.TriggerBuried(session, comm.GetBuriedParam(comm.Rtype229, 1, conf.Pid))
this.WriteUserLog(session.GetUserId(), "Rpc_ModulePayDelivery", res)
this.WriteUserLog(session.GetUserId(), 0, "Rpc_ModulePayDelivery", res)
})
return
}
@ -316,7 +316,7 @@ func (this *Pay) ModulePayDelivery(session comm.IUserSession, Productid string,
}
}
go this.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.WriteUserLog(session.GetUserId(), "ModulePayDelivery", res)
this.WriteUserLog(session.GetUserId(), 0, "ModulePayDelivery", res)
this.ModuleHero.RechargeMoney(session.GetUserId(), conf.Amount)
})
return

View File

@ -64,7 +64,7 @@ func (this *apiComp) GetGymBuff(session comm.IUserSession, req *pb.PracticeGetGy
session.SendMsg(string(this.module.GetType()), "getgymbuff", &pb.PracticeGetGymBuffResp{Buffid: buff.Id, Award: award})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.ModuleBuried.TriggerBuried(session, tasks...)
this.module.WriteUserLog(session.GetUserId(), "PracticeGetGymBuffReq", award)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "PracticeGetGymBuffReq", award)
})
return
}

View File

@ -91,7 +91,7 @@ func (this *apiComp) NPCBattkleFinish(session comm.IUserSession, req *pb.Practic
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.ModuleBuried.TriggerBuried(session, tasks...)
this.module.WriteUserLog(session.GetUserId(), "PracticeNPCBattkleFinishReq", award)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "PracticeNPCBattkleFinishReq", award)
})
return
}

View File

@ -305,7 +305,7 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.PracticeReceiveR
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.ModuleBuried.TriggerBuried(session, tasks...)
this.module.WriteUserLog(session.GetUserId(), "PracticeReceiveReq", award)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "PracticeReceiveReq", award)
})
return
}

View File

@ -81,7 +81,7 @@ func (this *apiComp) UnLock(session comm.IUserSession, req *pb.PracticeUnLockReq
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.ModuleBuried.TriggerBuried(session, tasks...)
this.module.WriteUserLog(session.GetUserId(), "PracticeUnLockReq", res)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "PracticeUnLockReq", res)
})
return

View File

@ -88,7 +88,7 @@ func (this *apiComp) BuyGift(session comm.IUserSession, req *pb.PrivilegeBuyGift
})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "PrivilegeBuyGiftReq", atno)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "PrivilegeBuyGiftReq", atno)
})
return
}

View File

@ -193,7 +193,7 @@ func (this *Privilege) Delivery(session comm.IUserSession, cId string) (errdata
// 推送
session.SendMsg(string(this.GetType()), PrivilegeBuyYuekaResp, &pb.PrivilegeBuyYuekaResp{Data: list})
go this.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.WriteUserLog(session.GetUserId(), "PrivilegeBuyYuekaReq", items)
this.WriteUserLog(session.GetUserId(), 0, "PrivilegeBuyYuekaReq", items)
})
return
}
@ -227,7 +227,7 @@ func (this *Privilege) RenewPrivilegeCard(session comm.IUserSession, cId string)
}
session.SendMsg(string(this.GetType()), PrivilegeBuyYuekaResp, &pb.PrivilegeGetListResp{Data: list})
go this.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.WriteUserLog(session.GetUserId(), "PrivilegeGetListReq", conf.DisposableReward)
this.WriteUserLog(session.GetUserId(), 0, "PrivilegeGetListReq", conf.DisposableReward)
})
} else {
errdata = &pb.ErrorData{

View File

@ -97,7 +97,7 @@ func (this *PushGiftbag) Delivery(session comm.IUserSession, pid string) (errdat
})
session.SendMsg(string(this.GetType()), "chanage", &pb.PushGiftbagChanagePush{Item: info.Item})
go this.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.WriteUserLog(session.GetUserId(), "PushGiftbagChanagePush", conf.Lbid)
this.WriteUserLog(session.GetUserId(), 0, "PushGiftbagChanagePush", conf.Lbid)
})
return
}

View File

@ -93,7 +93,7 @@ func (this *apiComp) Answer(session comm.IUserSession, req *pb.QuestionnaireAnsw
}
this.module.DispenseRes(session, groupconfig.Reward, true)
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "QuestionnaireAnswerReq", groupconfig.Reward)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "QuestionnaireAnswerReq", groupconfig.Reward)
})
}
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype203, 1, req.Group))

View File

@ -125,7 +125,7 @@ func (this *Reputation) Upgrade(session comm.IUserSession, raceType int32, fv in
this.DispenseRes(session, []*cfg.Gameatn{reward}, false)
}
go this.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.WriteUserLog(session.GetUserId(), "ReputationUpgrade", reward)
this.WriteUserLog(session.GetUserId(), 0, "ReputationUpgrade", reward)
})
}

View File

@ -238,7 +238,7 @@ func (this *apiComp) Buy(session comm.IUserSession, req *pb.ShopBuyReq) (errdata
if len(tasks) > 0 {
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.ModuleBuried.TriggerBuried(session, tasks...)
this.module.WriteUserLog(session.GetUserId(), "ShopBuyResq", award)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "ShopBuyResq", award)
})
}
return

View File

@ -169,7 +169,7 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.ShopCenterReceiv
}
session.SendMsg(string(this.module.GetType()), "receive", &pb.ShopCenterReceiveResp{Fid: req.Fid, Pid: req.Pid, Award: award})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "ShopCenterReceiveReq", award)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "ShopCenterReceiveReq", award)
})
return
}

View File

@ -60,7 +60,7 @@ func (this *apiComp) AtlasAward(session comm.IUserSession, req *pb.SmithyAtlasAw
Reward: atno,
})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), "SmithyAtlasAwardReq", atno)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "SmithyAtlasAwardReq", atno)
})
return
}

View File

@ -374,7 +374,7 @@ func (this *apiComp) ForgeEquip(session comm.IUserSession, req *pb.SmithyForgeEq
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.ModuleBuried.TriggerBuried(session, tasks...)
this.module.WriteUserLog(session.GetUserId(), "SmithyForgeEquipReq", atno)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "SmithyForgeEquipReq", atno)
})
return

Some files were not shown because too many files have changed in this diff Show More