user_game.go 897 B

1234567891011121314151617181920212223242526272829303132333435
  1. package gatesink
  2. import (
  3. "bet24.com/log"
  4. "bet24.com/servers/fishhall/config"
  5. game "bet24.com/servers/micros/game/proto"
  6. "bet24.com/servers/transaction"
  7. "encoding/json"
  8. "fmt"
  9. )
  10. // 游戏列表
  11. func (this *user) getGameList(msg, data string) {
  12. retData := game.GetGameJson(this.getUserId(), this.GetIP(), this.getPartnerId(), this.getVersionCode())
  13. this.WriteMsg(msg, retData)
  14. }
  15. // 审核游戏名
  16. func (this *user) gameRequest(msg, data string) {
  17. var obj transaction.GameRequestInfo
  18. err := json.Unmarshal([]byte(data), &obj)
  19. if err != nil {
  20. log.Release("gameRequest Unmarshal data failed %v", data)
  21. this.WriteMsg(msg, "")
  22. return
  23. }
  24. requestGame := game.GetReviewGame(this.GetIP(), obj.PartnerID, obj.VersionCode)
  25. this.WriteMsg(msg, requestGame)
  26. return
  27. }
  28. func (this *user) sendLoginConfig() {
  29. this.WriteMsg("loginconfig", fmt.Sprintf("%d", config.HallConfig.LoginConfig))
  30. }