scout.go 675 B

1234567891011121314151617181920212223242526272829303132
  1. package mapCall
  2. import (
  3. capp "f1-game/internal/cherry_app"
  4. nameActor "f1-game/internal/name/actor"
  5. nameRemote "f1-game/internal/name/remote"
  6. "f1-game/internal/pb"
  7. cfacade "github.com/cherry-game/cherry/facade"
  8. )
  9. var (
  10. Scout = &scoutCall{}
  11. )
  12. type scoutCall struct {
  13. }
  14. func (p *scoutCall) ScoutUpdateStatus(queueID, scoutType int32, playerID, endTime int64) int32 {
  15. req := &pb.ScoutRequest{
  16. QueueID: queueID,
  17. ScoutType: scoutType,
  18. PlayerID: playerID,
  19. EndTime: endTime,
  20. }
  21. return capp.CallWait(p.targetPath(), nameRemote.MapScout_UpdateStatus, req, nil)
  22. }
  23. func (p *scoutCall) targetPath() string {
  24. return cfacade.NewPath("", nameActor.Map_Scout)
  25. }