facebook优化
This commit is contained in:
parent
f687b4f19a
commit
146db7a84f
@ -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
|
||||
}
|
||||
|
||||
@ -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{}{
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user