| 123456789101112131415161718192021222324252627282930313233343536373839 |
- package actorRemote
- import (
- capp "f1-game/internal/cherry_app"
- nameActor "f1-game/internal/name/actor"
- nameRemote "f1-game/internal/name/remote"
- "f1-game/internal/pb"
- cfacade "github.com/cherry-game/cherry/facade"
- )
- type gameOps struct {
- }
- func newGameOps() *gameOps {
- return &gameOps{}
- }
- func (p *gameOps) GetDBReport(gameNodeID string) (*pb.DBQueueReportList, int32) {
- rsp := &pb.DBQueueReportList{}
- errCode := capp.CallWait(p.targetPath(gameNodeID), nameRemote.Ops_DbReport, nil, rsp)
- return rsp, errCode
- }
- func (p *gameOps) Online(gameNodeID string) (int64, int32) {
- rsp := &pb.I64{}
- errCode := capp.CallWait(p.targetPath(gameNodeID), nameRemote.Ops_Online, nil, rsp)
- return rsp.Value, errCode
- }
- // 设置战斗验证开关
- func (p *gameOps) SetBattleValidation(gameNodeID string, req *pb.Bool) int32 {
- return capp.CallWait(p.targetPath(gameNodeID), nameRemote.Ops_SetBattleValidation, req, nil)
- }
- func (*gameOps) targetPath(gameNodeID string) string {
- targetPath := cfacade.NewPath(gameNodeID, nameActor.GameOps)
- return targetPath
- }
|