Merge branch 'develop' of git.pogorockgames.com:mango-games/server/game into develop
This commit is contained in:
commit
6684dbcec6
|
@ -74,7 +74,7 @@ type SceneEx struct {
|
||||||
// 游戏是否能开始
|
// 游戏是否能开始
|
||||||
func (this *SceneEx) CanStart() bool {
|
func (this *SceneEx) CanStart() bool {
|
||||||
//人数>=1自动开始
|
//人数>=1自动开始
|
||||||
if len(this.players) >= 1 && (this.GetRealPlayerNum() >= 1 || this.IsPreCreateScene() || this.IsHasPlaying()) {
|
if len(this.players) >= 1 && (this.GetRealPlayerNum() >= 1 || this.IsPreCreateScene() || this.IsHasPlaying()) && this.machineStatus == 1 {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
@ -191,7 +191,6 @@ func (this *SceneEx) ClawdollCreateRoomInfoPacket(s *base.Scene, p *base.Player)
|
||||||
RoundId: proto.Int(this.RoundId),
|
RoundId: proto.Int(this.RoundId),
|
||||||
ParamsEx: nil,
|
ParamsEx: nil,
|
||||||
GameFreeId: 0,
|
GameFreeId: 0,
|
||||||
BaseScore: proto.Int32(this.GetBaseScore()),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 玩家信息
|
// 玩家信息
|
||||||
|
|
|
@ -77,7 +77,7 @@ func (this *PolicyClawdoll) OnTick(s *base.Scene) {
|
||||||
if machineStatus == 0 {
|
if machineStatus == 0 {
|
||||||
//链接状态不可用 踢出所有玩家
|
//链接状态不可用 踢出所有玩家
|
||||||
for _, p := range sceneEx.players {
|
for _, p := range sceneEx.players {
|
||||||
sceneEx.delPlayer(p.Player)
|
sceneEx.PlayerLeave(p.Player, common.PlayerLeaveReason_RoomClose, false)
|
||||||
}
|
}
|
||||||
sceneEx.machineStatus = 0
|
sceneEx.machineStatus = 0
|
||||||
logger.Logger.Trace("娃娃机离线,当前场景暂停服务!")
|
logger.Logger.Trace("娃娃机离线,当前场景暂停服务!")
|
||||||
|
@ -97,7 +97,6 @@ func (this *PolicyClawdoll) OnPlayerEnter(s *base.Scene, p *base.Player) {
|
||||||
if s == nil || p == nil {
|
if s == nil || p == nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.Logger.Trace("(this *PolicyClawdoll) OnPlayerEnter, sceneId=", s.GetSceneId(), " player=", p.SnId)
|
logger.Logger.Trace("(this *PolicyClawdoll) OnPlayerEnter, sceneId=", s.GetSceneId(), " player=", p.SnId)
|
||||||
if sceneEx, ok := s.ExtraData.(*SceneEx); ok {
|
if sceneEx, ok := s.ExtraData.(*SceneEx); ok {
|
||||||
playerEx := &PlayerEx{Player: p}
|
playerEx := &PlayerEx{Player: p}
|
||||||
|
|
|
@ -71,7 +71,7 @@ func (this *MachineManager) Init() {
|
||||||
Addr: addr,
|
Addr: addr,
|
||||||
}
|
}
|
||||||
SetBaseParam(conn)
|
SetBaseParam(conn)
|
||||||
logger.Logger.Trace("设置每台娃娃机基础配置!")
|
fmt.Println("与娃娃机连接成功!设置每台娃娃机基础配置!Id = ", i+1, "addr = ", addr)
|
||||||
|
|
||||||
}
|
}
|
||||||
/* fmt.Println("Connected to server:\n", this.ConnMap[1].RemoteAddr())
|
/* fmt.Println("Connected to server:\n", this.ConnMap[1].RemoteAddr())
|
||||||
|
|
|
@ -54,7 +54,6 @@ message SCCLAWDOLLRoomInfo {
|
||||||
int32 TotalPlayer = 8; //房间总人数
|
int32 TotalPlayer = 8; //房间总人数
|
||||||
int32 RoundId = 9; //当前局数ID
|
int32 RoundId = 9; //当前局数ID
|
||||||
repeated int32 ParamsEx = 10; //其他参数
|
repeated int32 ParamsEx = 10; //其他参数
|
||||||
|
|
||||||
int32 GameFreeId = 15;
|
int32 GameFreeId = 15;
|
||||||
int32 BaseScore = 16; //基础分
|
int32 BaseScore = 16; //基础分
|
||||||
}
|
}
|
||||||
|
|
|
@ -1126,6 +1126,7 @@ func (this *ShopMgr) ExchangeList(p *Player) (ret bool) {
|
||||||
JPrice: info.JPrice,
|
JPrice: info.JPrice,
|
||||||
Id: info.Id,
|
Id: info.Id,
|
||||||
Cash: info.Cash,
|
Cash: info.Cash,
|
||||||
|
DPrice: info.DPrice,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
var telData []*shop.TelChargeData
|
var telData []*shop.TelChargeData
|
||||||
|
|
Loading…
Reference in New Issue