Compare commits
3 Commits
63f3d02349
...
ba1b4ae7c7
Author | SHA1 | Date |
---|---|---|
|
ba1b4ae7c7 | |
|
905ff11095 | |
|
59f772c519 |
|
@ -301,11 +301,13 @@ func (this *CSInviteFriendHandler) Process(s *netlib.Session, packetid int, data
|
||||||
SrcHead: proto.Int32(p.Head),
|
SrcHead: proto.Int32(p.Head),
|
||||||
SrcHeadUrl: proto.String(p.HeadUrl),
|
SrcHeadUrl: proto.String(p.HeadUrl),
|
||||||
OpRetCode: opRetCode,
|
OpRetCode: opRetCode,
|
||||||
GameId: proto.Int(p.scene.gameId),
|
|
||||||
RoomId: proto.Int(p.scene.sceneId),
|
|
||||||
Pos: proto.Int32(msg.GetPos()),
|
Pos: proto.Int32(msg.GetPos()),
|
||||||
RoleId: int32(roleId),
|
RoleId: int32(roleId),
|
||||||
}
|
}
|
||||||
|
if p.scene != nil {
|
||||||
|
pack.GameId = int32(p.scene.gameId)
|
||||||
|
pack.RoomId = int32(p.scene.sceneId)
|
||||||
|
}
|
||||||
proto.SetDefaults(pack)
|
proto.SetDefaults(pack)
|
||||||
player.SendToClient(int(friend.FriendPacketID_PACKET_SCInviteFriend), pack)
|
player.SendToClient(int(friend.FriendPacketID_PACKET_SCInviteFriend), pack)
|
||||||
logger.Logger.Trace("SCInviteFriendHandler: ", pack)
|
logger.Logger.Trace("SCInviteFriendHandler: ", pack)
|
||||||
|
|
|
@ -330,7 +330,7 @@ func (m *CoinSceneMgr) TouchCreateRoom(platform string, gameFreeId int32) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
gf := PlatformMgrSingleton.GetGameFree(platform, gameFreeId)
|
gf := PlatformMgrSingleton.GetGameFree(platform, gameFreeId)
|
||||||
if gf.Status && gf.DbGameFree.GetCreateRoomNum() > 0 {
|
if gf != nil && gf.GetDbGameFree().GetCreateRoomNum() > 0 {
|
||||||
logger.Logger.Tracef("TouchCreateRoom platform:%v gameFreeId:%v", platform, gameFreeId)
|
logger.Logger.Tracef("TouchCreateRoom platform:%v gameFreeId:%v", platform, gameFreeId)
|
||||||
m.delayCache = append(m.delayCache, &CreateRoomCache{
|
m.delayCache = append(m.delayCache, &CreateRoomCache{
|
||||||
platformName: platform,
|
platformName: platform,
|
||||||
|
|
|
@ -270,7 +270,7 @@ func (csp *CoinScenePool) playerEnter(p *Player, roomId int32, exclude []int32,
|
||||||
logger.Logger.Infof("(csp *CoinScenePool) PlayerEnter create new scene:%v snid:%v gamefreeid:%v", scene.sceneId, p.SnId, csp.ID())
|
logger.Logger.Infof("(csp *CoinScenePool) PlayerEnter create new scene:%v snid:%v gamefreeid:%v", scene.sceneId, p.SnId, csp.ID())
|
||||||
csp.AddScene(scene)
|
csp.AddScene(scene)
|
||||||
} else {
|
} else {
|
||||||
logger.Logger.Errorf("Create %v scene failed.", csp.ID())
|
logger.Logger.Warnf("Create %v scene failed.", csp.ID())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -212,14 +212,14 @@ func (l *CoinScenePoolLocal) NewScene(pool *CoinScenePool, p *Player) *Scene {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if dbCreateRoom == nil {
|
if dbCreateRoom == nil {
|
||||||
logger.Logger.Tracef("CoinScenePool CreateLocalGameNewScene failed! playerTakeCoin:%v ", playerTakeCoin)
|
logger.Logger.Errorf("CoinScenePool CreateLocalGameNewScene failed! playerTakeCoin:%v ", playerTakeCoin)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
if len(dbCreateRoom.GetBetRange()) != 0 && dbCreateRoom.GetBetRange()[0] != 0 {
|
if len(dbCreateRoom.GetBetRange()) != 0 && dbCreateRoom.GetBetRange()[0] != 0 {
|
||||||
baseScore = common.RandInt32Slice(dbCreateRoom.GetBetRange())
|
baseScore = common.RandInt32Slice(dbCreateRoom.GetBetRange())
|
||||||
}
|
}
|
||||||
if baseScore == 0 {
|
if baseScore == 0 {
|
||||||
logger.Logger.Tracef("CoinScenePool CreateLocalGameNewScene failed! BaseScore==0")
|
logger.Logger.Errorf("CoinScenePool CreateLocalGameNewScene failed! BaseScore==0")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
scene := SceneMgrSingleton.CreateScene(&CreateSceneParam{
|
scene := SceneMgrSingleton.CreateScene(&CreateSceneParam{
|
||||||
|
|
|
@ -779,7 +779,7 @@ func (this *FriendMgr) FriendRefuse(p *Player, destP *model.BindFriend) {
|
||||||
}), task.CompleteNotifyWrapper(func(data interface{}, tt task.Task) {
|
}), task.CompleteNotifyWrapper(func(data interface{}, tt task.Task) {
|
||||||
//拒绝了不提醒
|
//拒绝了不提醒
|
||||||
if data != nil {
|
if data != nil {
|
||||||
logger.Logger.Error("FriendRefuse data:", data)
|
logger.Logger.Warn("FriendRefuse data:", data)
|
||||||
SendToClick(friend.OpResultCode_OPRC_Error)
|
SendToClick(friend.OpResultCode_OPRC_Error)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -507,21 +507,25 @@ type CreateSceneParam struct {
|
||||||
func (m *SceneMgr) CreateScene(args *CreateSceneParam) *Scene {
|
func (m *SceneMgr) CreateScene(args *CreateSceneParam) *Scene {
|
||||||
logger.Logger.Tracef("SceneMgr NewScene %v", args)
|
logger.Logger.Tracef("SceneMgr NewScene %v", args)
|
||||||
if args.GF == nil {
|
if args.GF == nil {
|
||||||
|
logger.Logger.Errorf("SceneMgr NewScene GameFree is nil")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
if args.Platform == nil {
|
if args.Platform == nil {
|
||||||
|
logger.Logger.Errorf("SceneMgr NewScene Platform is nil")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
if args.GS == nil {
|
if args.GS == nil {
|
||||||
args.GS = GameSessMgrSington.GetMinLoadSess(int(args.GF.GetGameId()))
|
args.GS = GameSessMgrSington.GetMinLoadSess(int(args.GF.GetGameId()))
|
||||||
}
|
}
|
||||||
if args.GS == nil {
|
if args.GS == nil {
|
||||||
|
logger.Logger.Errorf("SceneMgr NewScene GameServer is nil")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// 创建房间
|
// 创建房间
|
||||||
s := NewScene(args)
|
s := NewScene(args)
|
||||||
if s == nil {
|
if s == nil {
|
||||||
|
logger.Logger.Errorf("SceneMgr NewScene Scene is nil")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
m.scenes[args.RoomId] = s
|
m.scenes[args.RoomId] = s
|
||||||
|
|
|
@ -2258,7 +2258,7 @@ func init() {
|
||||||
state = msg.GetState()
|
state = msg.GetState()
|
||||||
player := PlayerMgrSington.GetPlayerBySnId(info.SnId)
|
player := PlayerMgrSington.GetPlayerBySnId(info.SnId)
|
||||||
if player == nil {
|
if player == nil {
|
||||||
if info.State == 1 {
|
if msg.State == 1 {
|
||||||
state = 3
|
state = 3
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue