facebook优化

This commit is contained in:
hahwu 2025-01-21 19:29:44 +08:00
parent 056dd07c15
commit a9f9f1d1dd

View File

@ -2564,6 +2564,12 @@ func ReqAutoAddInviteFriend(args []interface{}) error {
proto.Unmarshal(buf, req)
FriendMod := player.PlayMod.getFriendMod()
Uid := int(req.Id)
if Uid == 0 {
player.PushClientRes(&msg.ResAutoAddInviteFriend{
ResultCode: int32(msg.RES_CODE_FAIL),
})
return fmt.Errorf("Uid wrong %d", Uid)
}
FriendMod.AddFriend(Uid)
player.PlayMod.save()
player.PushClientRes(&msg.ResAutoAddInviteFriend{