Merge branch 'develop' of git.pogorockgames.com:mango-games/server/game into develop

This commit is contained in:
DESKTOP-45ANQ2C\unis 2024-09-27 09:33:33 +08:00
commit 6ac1a91320
4 changed files with 32 additions and 15 deletions

View File

@ -44,5 +44,5 @@ const (
ETCDKEY_Spirit = "/game/spirit" // 小精灵配置 ETCDKEY_Spirit = "/game/spirit" // 小精灵配置
ETCDKEY_RoomType = "/game/room_type" // 房间类型配置 ETCDKEY_RoomType = "/game/room_type" // 房间类型配置
ETCDKEY_RoomConfig = "/game/room_config" // 房间配置 ETCDKEY_RoomConfig = "/game/room_config" // 房间配置
ETCDKEY_RoomConfigSystem = "/game/system_room_config" // 系统房间配置 ETCDKEY_RoomConfigSystem = "/game/room_system" // 系统房间配置
) )

View File

@ -39,6 +39,7 @@ const (
PlayerOpStep //6,计步操作(1 开始0结束) PlayerOpStep //6,计步操作(1 开始0结束)
PlayerOpDraw //7,求和 1请求求和 2拒绝求和 3同意求和 PlayerOpDraw //7,求和 1请求求和 2拒绝求和 3同意求和
PlayerOpNextPlay //8,再来一局 PlayerOpNextPlay //8,再来一局
PlayerOpWin //9,胜利
// 人机对战操作 // 人机对战操作
PlayerOpAISwitch //9,ai开关 0关闭 1开启 PlayerOpAISwitch //9,ai开关 0关闭 1开启

View File

@ -1130,6 +1130,20 @@ func (this *SceneStatePlayerOp) OnPlayerOpNormal(s *base.Scene, p *base.Player,
case rule.PlayerOpTest: // 测试 强制同步给所有的玩家 case rule.PlayerOpTest: // 测试 强制同步给所有的玩家
returnFunc(chesstitians.OpResultCode_OPRC_Sucess) returnFunc(chesstitians.OpResultCode_OPRC_Sucess)
return true 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 return true
} }

View File

@ -93,6 +93,8 @@ func init() {
etcd.Register(etcd.ETCDKEY_Spirit, webapi.SpiritConfig{}, platformConfigEvent) etcd.Register(etcd.ETCDKEY_Spirit, webapi.SpiritConfig{}, platformConfigEvent)
// 竞技馆房间配置 // 竞技馆房间配置
etcd.Register(etcd.ETCDKEY_RoomConfig, webapi.RoomConfig{}, handlerEvent) etcd.Register(etcd.ETCDKEY_RoomConfig, webapi.RoomConfig{}, handlerEvent)
// 竞技馆系统房间配置
etcd.Register(etcd.ETCDKEY_RoomConfigSystem, webapi.RoomConfigSystem{}, handlerEvent)
// 竞技馆房间类型配置 // 竞技馆房间类型配置
etcd.Register(etcd.ETCDKEY_RoomType, webapi.RoomType{}, handlerEvent) etcd.Register(etcd.ETCDKEY_RoomType, webapi.RoomType{}, handlerEvent)
//娃娃机配置 //娃娃机配置