好友小喇叭优化
This commit is contained in:
parent
5586a4aa4f
commit
dd90f57f70
@ -420,6 +420,7 @@ func (p *Player) Login() {
|
||||
if Duration > 604800 {
|
||||
FriendMod := p.PlayMod.getFriendMod()
|
||||
FriendMod.AddActLog(friend.ACT_LOG_TYPE_LOST_USER_RETURN, "")
|
||||
p.UpdateUserInfo()
|
||||
}
|
||||
|
||||
}
|
||||
@ -711,6 +712,7 @@ func (p *Player) HandleItem(itemList []*item.Item, Label string) error {
|
||||
})
|
||||
FriendMod := p.PlayMod.getFriendMod()
|
||||
FriendMod.AddActLog(friend.ACT_LOG_TYPE_GET_NEW_AVATAR_FRAME, "")
|
||||
p.UpdateUserInfo()
|
||||
p.PlayerDecoLog("avatar", Effect[0], Label)
|
||||
BackDataType[item.ITEM_TYPE_AVATAR] = struct{}{}
|
||||
case item.ITEM_TYPE_EMOJI: // 表情
|
||||
@ -722,6 +724,7 @@ func (p *Player) HandleItem(itemList []*item.Item, Label string) error {
|
||||
})
|
||||
FriendMod := p.PlayMod.getFriendMod()
|
||||
FriendMod.AddActLog(friend.ACT_LOG_TYPE_GET_NEW_EMOTION, "")
|
||||
p.UpdateUserInfo()
|
||||
p.PlayerDecoLog("emoji", Effect[0], Label)
|
||||
BackDataType[item.ITEM_TYPE_EMOJI] = struct{}{}
|
||||
case item.ITEM_TYPE_FACE: // 头像
|
||||
@ -733,6 +736,7 @@ func (p *Player) HandleItem(itemList []*item.Item, Label string) error {
|
||||
})
|
||||
FriendMod := p.PlayMod.getFriendMod()
|
||||
FriendMod.AddActLog(friend.ACT_LOG_TYPE_GET_NEW_AVATAR, "")
|
||||
p.UpdateUserInfo()
|
||||
p.PlayerDecoLog("face", Effect[0], Label)
|
||||
BackDataType[item.ITEM_TYPE_FACE] = struct{}{}
|
||||
case item.ITEM_TYPE_ACTIVITY_RACE: // 活动竞速
|
||||
@ -758,6 +762,7 @@ func (p *Player) HandleItem(itemList []*item.Item, Label string) error {
|
||||
Type, Name := playroomCfg.GetDecoInfo(Effect)
|
||||
FriendMod := p.PlayMod.getFriendMod()
|
||||
FriendMod.AddActLog(friend.ACT_LOG_TYPE_GET_NEW_DECORATION, "")
|
||||
p.UpdateUserInfo()
|
||||
p.TeLog("room_deco_get", map[string]interface{}{
|
||||
"room_deco_type": Type,
|
||||
"room_deco_name": Name,
|
||||
@ -772,6 +777,7 @@ func (p *Player) HandleItem(itemList []*item.Item, Label string) error {
|
||||
Name := playroomCfg.GetDressName(Effect)
|
||||
FriendMod := p.PlayMod.getFriendMod()
|
||||
FriendMod.AddActLog(friend.ACT_LOG_TYPE_GET_NEW_COSTUME, "")
|
||||
p.UpdateUserInfo()
|
||||
p.TeLog("pet_deco_get", map[string]interface{}{
|
||||
"pet_deco_type": Type,
|
||||
"pet_deco_name": Name,
|
||||
|
||||
@ -245,6 +245,9 @@ func RegHandbookAllReward(player *Player, buf []byte) error {
|
||||
})
|
||||
return err
|
||||
}
|
||||
FriendMod := player.PlayMod.getFriendMod()
|
||||
FriendMod.AddActLog(friend.ACT_LOG_TYPE_COMPLETE_HANDBOOK_ACHIEVEMENT, req.Type)
|
||||
player.UpdateUserInfo()
|
||||
player.PushClientRes(&msg.ResHandbookAllReward{
|
||||
Code: msg.RES_CODE_SUCCESS,
|
||||
})
|
||||
@ -560,7 +563,9 @@ func ReqDecorate(player *Player, buf []byte) error {
|
||||
if AreaId == 1 && DecorateId == 44 {
|
||||
FriendMod.AddActLog(friend.ACT_LOG_TYPE_COMPLETE_CLOAKROOM, "")
|
||||
}
|
||||
|
||||
if AreaId != DecorateMod.AreaId {
|
||||
FriendMod.AddActLog(friend.ACT_LOG_TYPE_COMPLETE_CHAPTER_SCENES, GoUtil.String(AreaId))
|
||||
}
|
||||
player.PlayMod.save()
|
||||
player.PushClientRes(DecorateMod.BackData())
|
||||
player.PushClientRes(&msg.ResDecorate{
|
||||
@ -1189,6 +1194,7 @@ func ReqCardCollectReward(player *Player, buf []byte) error {
|
||||
player.PlayMod.getChessMod().AddChessBuff(chess)
|
||||
player.PushClientRes(player.PlayMod.getOrderMod().BackData())
|
||||
}
|
||||
player.UpdateUserInfo()
|
||||
player.PlayMod.save()
|
||||
player.PushClientRes(CardMod.NotifyCard())
|
||||
player.PushClientRes(&msg.ResCardCollectReward{
|
||||
@ -1270,6 +1276,7 @@ func ReqAllCollectReward(player *Player, buf []byte) error {
|
||||
}
|
||||
FriendMod := player.PlayMod.getFriendMod()
|
||||
FriendMod.AddActLog(friend.ACT_LOG_TYPE_COMPLETE_ALL_CARDS, "all")
|
||||
player.UpdateUserInfo()
|
||||
player.PlayMod.save()
|
||||
player.TeLog("ReqAllCollectReward", map[string]interface{}{
|
||||
"item_list": itemList,
|
||||
@ -2988,6 +2995,7 @@ func ReqChampshipReward(player *Player, buf []byte) error {
|
||||
if MaxId == ChampshipMod.Reward {
|
||||
FriendMod := player.PlayMod.getFriendMod()
|
||||
FriendMod.AddActLog(friend.ACT_LOG_TYPE_GET_CHAMPIONSHIP_PRIZE, "")
|
||||
player.UpdateUserInfo()
|
||||
}
|
||||
player.TeLog("championship_reward", map[string]interface{}{
|
||||
"season_id": GoUtil.ZeroTimestamp(),
|
||||
@ -3099,6 +3107,8 @@ func ReqFriendTLUpvote(player *Player, buf []byte) error {
|
||||
To: int(FUid),
|
||||
SendT: GoUtil.Now(),
|
||||
}
|
||||
FriendMod.AddActLog(friend.ACT_LOG_TYPE_VISIT_UPVOTE, "")
|
||||
player.UpdateUserInfo()
|
||||
FriendMgrSend(m)
|
||||
player.PlayMod.save()
|
||||
player.PushClientRes(&msg.ResFriendTLUpvote{
|
||||
@ -3164,6 +3174,7 @@ func ReqChampshipRankReward(player *Player, buf []byte) error {
|
||||
if myPreRank <= 5 {
|
||||
FriendMod := player.PlayMod.getFriendMod()
|
||||
FriendMod.AddActLog(friend.ACT_LOG_TYPE_GET_CHAMPIONSHIP_RANK, GoUtil.String(myPreRank))
|
||||
player.UpdateUserInfo()
|
||||
}
|
||||
player.PlayMod.save()
|
||||
player.BackChampship()
|
||||
@ -3955,6 +3966,7 @@ func ReqPlayroomSelectReward(player *Player, buf []byte) error {
|
||||
})
|
||||
FriendMod := player.PlayMod.getFriendMod()
|
||||
FriendMod.AddActLog(friend.ACT_LOG_TYPE_GET_VISIT_GAME_PRIZE_1, "")
|
||||
player.UpdateUserInfo()
|
||||
PlayroomMod.ResetGame()
|
||||
player.PlayerDecoSetLog("emoji", int(req.EmojiId), "playroom_select_reward")
|
||||
player.PlayroomBackData()
|
||||
@ -4149,10 +4161,7 @@ func ReqPlayroomFlipReward(player *Player, buf []byte) error {
|
||||
if LimitedTimeEventMod.CheckExist(limitedTimeEvent.EVENT_TYPE_PET_THIEF) && Result == playroom.FLIP_TYPE_GOLD {
|
||||
player.GetPetThiefReward(Target)
|
||||
}
|
||||
if Result == playroom.FLIP_TYPE_GOLD {
|
||||
FriendMod := player.PlayMod.getFriendMod()
|
||||
FriendMod.AddActLog(friend.ACT_LOG_TYPE_GET_VISIT_GAME_PRIZE, "")
|
||||
}
|
||||
|
||||
err = player.HandleItem(Items1, msg.ITEM_POP_LABEL_PlayroomFlip.String())
|
||||
if err != nil {
|
||||
player.SendErrClienRes(&msg.ResPlayroomFlip{
|
||||
@ -4161,6 +4170,11 @@ func ReqPlayroomFlipReward(player *Player, buf []byte) error {
|
||||
})
|
||||
return err
|
||||
}
|
||||
if Result == playroom.FLIP_TYPE_GOLD {
|
||||
FriendMod := player.PlayMod.getFriendMod()
|
||||
FriendMod.AddActLog(friend.ACT_LOG_TYPE_GET_VISIT_GAME_PRIZE, "")
|
||||
player.UpdateUserInfo()
|
||||
}
|
||||
FriendMgrSend(&MsqMod.Msg{
|
||||
From: int(player.M_DwUin),
|
||||
To: Target,
|
||||
@ -4646,6 +4660,7 @@ func ReqFriendTreasureEnd(player *Player, buf []byte) error {
|
||||
}
|
||||
FriendMod := player.PlayMod.getFriendMod()
|
||||
FriendMod.AddActLog(friend.ACT_LOG_TYPE_OPEN_PET_TREASURE, "")
|
||||
player.UpdateUserInfo()
|
||||
player.TeLog("pet_treasure_open", map[string]interface{}{
|
||||
"pet_treasure_step": FriendTreasureMod.Shift,
|
||||
"pet_treasure_box": FriendTreasureMod.BoxItems,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user