diff --git a/gamesrv/tienlen/scenepolicy_tienlen.go b/gamesrv/tienlen/scenepolicy_tienlen.go index cc47b8e..cf2d3f1 100644 --- a/gamesrv/tienlen/scenepolicy_tienlen.go +++ b/gamesrv/tienlen/scenepolicy_tienlen.go @@ -970,6 +970,10 @@ func (this *SceneHandCardStateTienLen) OnEnter(s *base.Scene) { playerEx.robotGameTimes-- sceneEx.robotGamingNum++ } + if _, ok := sceneEx.BilledList[playerEx.SnId]; !ok { + arr := make([]*BilledInfo, 0) + sceneEx.BilledList[playerEx.SnId] = &arr + } } } } diff --git a/worldsrv/action_player.go b/worldsrv/action_player.go index fddcb7a..cc86952 100644 --- a/worldsrv/action_player.go +++ b/worldsrv/action_player.go @@ -2663,8 +2663,8 @@ func CSBindTel(s *netlib.Session, packetId int, data interface{}, sid int64) err SaveInviteScore(&model.InviteScore{ Platform: p.Platform, SnId: p.SnId, - InviteSnId: p.InviterId, - Tp: common.InviteScoreTypeBind, + InviteSnId: p.PSnId, + Tp: common.InviteScoreTypeBindTel, Score: cfg.GetBindTelScore(), Ts: time.Now().Unix(), Money: 0, diff --git a/worldsrv/action_server.go b/worldsrv/action_server.go index 183f495..e051e3f 100644 --- a/worldsrv/action_server.go +++ b/worldsrv/action_server.go @@ -192,7 +192,7 @@ func init() { netlib.RegisterHandler(int(serverproto.SSPacketID_PACKET_GW_AUDIENCELEAVE), netlib.HandlerWrapper(func(s *netlib.Session, packetid int, pack interface{}) error { logger.Logger.Trace("receive PACKET_GW_AUDIENCELEAVE GWPlayerLeave:", pack) if msg, ok := pack.(*serverproto.GWPlayerLeave); ok { - scene := SceneMgrSingleton.GetScene(int(msg.GetRoomId())) + scene := SceneMgrSingleton.GetScene(int(msg.GetRoomId()), true) if scene != nil { p := PlayerMgrSington.GetPlayerBySnId(msg.GetPlayerId()) if p != nil { diff --git a/worldsrv/action_welfare.go b/worldsrv/action_welfare.go index bc800d9..d96d9bb 100644 --- a/worldsrv/action_welfare.go +++ b/worldsrv/action_welfare.go @@ -459,6 +459,17 @@ func CSBindInvite(s *netlib.Session, packetid int, data interface{}, sid int64) Ts: now.Unix(), Money: 0, }) + if len(p.Tel) > 0 { + SaveInviteScore(&model.InviteScore{ + Platform: p.Platform, + SnId: p.SnId, + InviteSnId: inviteSnId, + Tp: common.InviteScoreTypeBindTel, + Score: cfg.GetBindTelScore(), + Ts: time.Now().Unix(), + Money: 0, + }) + } } return nil }), task.CompleteNotifyWrapper(func(i interface{}, t task.Task) { diff --git a/worldsrv/playernotify.go b/worldsrv/playernotify.go index 29f2829..961eb79 100644 --- a/worldsrv/playernotify.go +++ b/worldsrv/playernotify.go @@ -84,7 +84,7 @@ func (p *PlayerNotify) SendToClient(tp common.NotifyType, packetId int, pack int if len(d.GetDatas()) == 0 { return } - scene := SceneMgrSingleton.GetScene(int(d.GetDatas()[0].GetRoomId())) + scene := SceneMgrSingleton.GetScene(int(d.GetDatas()[0].GetRoomId()), true) if scene == nil { return }