facebook优化
This commit is contained in:
parent
f687b4f19a
commit
146db7a84f
@ -834,3 +834,10 @@ func Benchmark(player *Player) {
|
|||||||
player.HandleInChampshipRank()
|
player.HandleInChampshipRank()
|
||||||
player.HandleInUserRank()
|
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{}
|
req := &msg.ReqAutoAddInviteFriend{}
|
||||||
proto.Unmarshal(buf, req)
|
proto.Unmarshal(buf, req)
|
||||||
FriendMod := player.PlayMod.getFriendMod()
|
FriendMod := player.PlayMod.getFriendMod()
|
||||||
FriendMod.AddFriend(int(req.Id))
|
Uid := GetUidByFaceBook(int(req.Id))
|
||||||
|
FriendMod.AddFriend(Uid)
|
||||||
player.PlayMod.save()
|
player.PlayMod.save()
|
||||||
player.PushClientRes(&msg.ResAutoAddInviteFriend{
|
player.PushClientRes(&msg.ResAutoAddInviteFriend{
|
||||||
ResultCode: 1,
|
ResultCode: 1,
|
||||||
})
|
})
|
||||||
G_GameLogicPtr.FriendMgrSend(&MsqMod.Msg{
|
G_GameLogicPtr.FriendMgrSend(&MsqMod.Msg{
|
||||||
From: int(player.M_DwUin),
|
From: int(player.M_DwUin),
|
||||||
To: int(req.Id),
|
To: Uid,
|
||||||
Type: MsqMod.HANDLE_TYPE_INVITE_ADD_FRIEND,
|
Type: MsqMod.HANDLE_TYPE_INVITE_ADD_FRIEND,
|
||||||
})
|
})
|
||||||
player.TeLog("friend_add", map[string]interface{}{
|
player.TeLog("friend_add", map[string]interface{}{
|
||||||
|
|||||||
@ -66,9 +66,11 @@ func UnitOrder(p *Player) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func UnitChess(p *Player) error {
|
func UnitChess(p *Player) error {
|
||||||
ChessMod := p.PlayMod.getChessMod()
|
CardMod := p.PlayMod.getCardMod()
|
||||||
Color := order.RandChessColor(ChessMod.GetEmitList())
|
for i := 0; i < 1000; i++ {
|
||||||
fmt.Print(Color)
|
CardId := CardMod.RandCard(3)
|
||||||
|
fmt.Println(CardId)
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user