日志优化
This commit is contained in:
parent
b966557d03
commit
ac736dc6bd
@ -2738,6 +2738,7 @@ func ReqShippingOrder(player *Player, buf []byte) error {
|
||||
func ReqChampshipReward(player *Player, buf []byte) error {
|
||||
ChampshipMod := player.PlayMod.getChampshipMod()
|
||||
todayActivityId, _ := player.GetChampshipActivityId()
|
||||
RewardId := ChampshipMod.Reward
|
||||
itemList := ChampshipMod.GetReward(todayActivityId)
|
||||
err := player.HandleItem(itemList, msg.ITEM_POP_LABEL_ChampshipReward.String())
|
||||
if err != nil {
|
||||
@ -2759,13 +2760,17 @@ func ReqChampshipReward(player *Player, buf []byte) error {
|
||||
FriendMod.AddActLog(friend.ACT_LOG_TYPE_GET_CHAMPIONSHIP_PRIZE, "")
|
||||
player.UpdateUserInfo()
|
||||
}
|
||||
player.TeLog("championship_reward", map[string]interface{}{
|
||||
"season_id": GoUtil.ZeroTimestamp(),
|
||||
"champship_step_id": ChampshipMod.Reward,
|
||||
"reward_type": "step",
|
||||
"item_list": itemList,
|
||||
"champship_score": ChampshipMod.Score,
|
||||
})
|
||||
for i := RewardId + 1; i <= ChampshipMod.Reward; i++ {
|
||||
items, _ := champshipCfg.GetRewardItems(i)
|
||||
player.TeLog("championship_reward", map[string]interface{}{
|
||||
"season_id": GoUtil.ZeroTimestamp(),
|
||||
"champship_step_id": i,
|
||||
"reward_type": "step",
|
||||
"item_list": items,
|
||||
"champship_score": ChampshipMod.Score,
|
||||
})
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@ -27,3 +27,11 @@ func TestGetChampshipActivityId(t *testing.T) {
|
||||
res := champshipCfg.GetChampshipActivityId()
|
||||
t.Logf("res:%v", res)
|
||||
}
|
||||
|
||||
func TestReqChampshipReward(t *testing.T) {
|
||||
p1 := new(game.Player)
|
||||
p1.InitPlayer("3625212")
|
||||
ChampshipMod := p1.GetChampshipMod()
|
||||
ChampshipMod.Score = 1000
|
||||
game.ReqChampshipReward(p1, nil)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user