facebook优化

This commit is contained in:
hahwu 2025-01-21 18:26:33 +08:00
parent cf18a5db20
commit e112a9528e
3 changed files with 15 additions and 5 deletions

View File

@ -834,3 +834,10 @@ func Benchmark(player *Player) {
player.HandleInChampshipRank()
player.HandleInUserRank()
}
func GetUidByFaceBook(Fb int) int {
sqlStr := "SELECT dwUin FROM t_player_baseinfo WHERE FaceBookId = ?"
Uid := 0
db.SqlDb.Get(&Uid, sqlStr, Fb)
return Uid
}

View File

@ -2563,14 +2563,15 @@ func ReqAutoAddInviteFriend(args []interface{}) error {
req := &msg.ReqAutoAddInviteFriend{}
proto.Unmarshal(buf, req)
FriendMod := player.PlayMod.getFriendMod()
FriendMod.AddFriend(int(req.Id))
Uid := GetUidByFaceBook(int(req.Id))
FriendMod.AddFriend(Uid)
player.PlayMod.save()
player.PushClientRes(&msg.ResAutoAddInviteFriend{
ResultCode: 1,
})
G_GameLogicPtr.FriendMgrSend(&MsqMod.Msg{
From: int(player.M_DwUin),
To: int(req.Id),
To: Uid,
Type: MsqMod.HANDLE_TYPE_INVITE_ADD_FRIEND,
})
player.TeLog("friend_add", map[string]interface{}{

View File

@ -66,9 +66,11 @@ func UnitOrder(p *Player) error {
}
func UnitChess(p *Player) error {
ChessMod := p.PlayMod.getChessMod()
Color := order.RandChessColor(ChessMod.GetEmitList())
fmt.Print(Color)
CardMod := p.PlayMod.getCardMod()
for i := 0; i < 1000; i++ {
CardId := CardMod.RandCard(3)
fmt.Println(CardId)
}
return nil
}