Merge branch 'develop' of git.pogorockgames.com:mango-games/server/game into develop
This commit is contained in:
commit
6ac1a91320
|
@ -44,5 +44,5 @@ const (
|
|||
ETCDKEY_Spirit = "/game/spirit" // 小精灵配置
|
||||
ETCDKEY_RoomType = "/game/room_type" // 房间类型配置
|
||||
ETCDKEY_RoomConfig = "/game/room_config" // 房间配置
|
||||
ETCDKEY_RoomConfigSystem = "/game/system_room_config" // 系统房间配置
|
||||
ETCDKEY_RoomConfigSystem = "/game/room_system" // 系统房间配置
|
||||
)
|
||||
|
|
|
@ -39,6 +39,7 @@ const (
|
|||
PlayerOpStep //6,计步操作(1 开始,0结束)
|
||||
PlayerOpDraw //7,求和 1请求求和 2拒绝求和 3同意求和
|
||||
PlayerOpNextPlay //8,再来一局
|
||||
PlayerOpWin //9,胜利
|
||||
|
||||
// 人机对战操作
|
||||
PlayerOpAISwitch //9,ai开关 0关闭 1开启
|
||||
|
|
|
@ -1130,6 +1130,20 @@ func (this *SceneStatePlayerOp) OnPlayerOpNormal(s *base.Scene, p *base.Player,
|
|||
case rule.PlayerOpTest: // 测试 强制同步给所有的玩家
|
||||
returnFunc(chesstitians.OpResultCode_OPRC_Sucess)
|
||||
return true
|
||||
case rule.PlayerOpWin:
|
||||
if common.Config.IsDevMode {
|
||||
for _, seat := range sceneEx.seats {
|
||||
if seat != nil {
|
||||
if seat.GetSnId() == playerEx.GetSnId() {
|
||||
sceneEx.winSnId = seat.GetSnId()
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
returnFunc(chesstitians.OpResultCode_OPRC_Sucess)
|
||||
}
|
||||
return true
|
||||
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
|
|
@ -93,6 +93,8 @@ func init() {
|
|||
etcd.Register(etcd.ETCDKEY_Spirit, webapi.SpiritConfig{}, platformConfigEvent)
|
||||
// 竞技馆房间配置
|
||||
etcd.Register(etcd.ETCDKEY_RoomConfig, webapi.RoomConfig{}, handlerEvent)
|
||||
// 竞技馆系统房间配置
|
||||
etcd.Register(etcd.ETCDKEY_RoomConfigSystem, webapi.RoomConfigSystem{}, handlerEvent)
|
||||
// 竞技馆房间类型配置
|
||||
etcd.Register(etcd.ETCDKEY_RoomType, webapi.RoomType{}, handlerEvent)
|
||||
//娃娃机配置
|
||||
|
|
Loading…
Reference in New Issue