好友打招呼奖励bug修复

This commit is contained in:
hahwu 2026-04-02 17:35:45 +08:00
parent 73007781c6
commit 16bfd16d64

View File

@ -419,6 +419,10 @@ func ReqFriendReplyHandle(player *Player, buf []byte) error {
ErrType := msg.FRIEND_REPLY_HANDLE_ERR_TYPE_NONE
now := GoUtil.Now()
items := make([]*item.Item, 0)
if ReplyInfo.Type == friend.REPLY_TYPE_GREETING_Get {
reply_items := baseCfg.GetFriendReplyReward()
items = append(items, reply_items...)
}
if req.Type == 1 && ReplyInfo.Uid > 10000 {
switch ReplyInfo.Type {
case friend.REPLY_TYPE_GREETING:
@ -436,9 +440,6 @@ func ReqFriendReplyHandle(player *Player, buf []byte) error {
Extra: ReplyData,
})
FriendMod.GreetingFriend(int(ReplyInfo.Uid))
case friend.REPLY_TYPE_GREETING_Get:
reply_items := baseCfg.GetFriendReplyReward()
items = append(items, reply_items...)
case friend.REPLY_TYPE_CATNIP: // 猫草大作战同意邀请
GameId := GoUtil.Int(ReplyInfo.Param)
activityInfo := player.GetActivityInfo(player.GetActivityId(activity.ACT_TYPE_CATNIP))
@ -482,7 +483,6 @@ func ReqFriendReplyHandle(player *Player, buf []byte) error {
} else {
ErrType = msg.FRIEND_REPLY_HANDLE_ERR_TYPE_CATNIP
}
}
}
if len(items) > 0 {