gamemgr_privateroom.go 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. package game
  2. import (
  3. "bet24.com/log"
  4. "bet24.com/servers/micros/audioroom/handler/config"
  5. )
  6. func (this *gamemgr) OnGameRuleRegistered(gameId int, gameRule string, desc string, targetOptions []int, userOptions []int, playTimeOptions []int) {
  7. //log.Debug("gamemgr.OnGameRuleRegistered gameId[%d] gameRule[%s]", gameId, gameRule)
  8. config.Mgr.AddGameRule(gameId, gameRule)
  9. }
  10. func (this *gamemgr) OnGameRuleDeregistered(gameId int, gameRule string) {
  11. log.Debug("gamemgr.OnGameRuleDeregistered gameId[%d] gameRule[%s]", gameId, gameRule)
  12. this.removeRoomsByGameRule(gameId, gameRule)
  13. config.Mgr.RemoveGameRule(gameId, gameRule)
  14. }
  15. func (this *gamemgr) OnRoomStart(roomNo int) {
  16. }
  17. func (this *gamemgr) OnRoomEnd(roomNo int, winners []int) {
  18. r := this.getRoom(roomNo)
  19. if r == nil {
  20. return
  21. }
  22. if this.onRoomEnd != nil {
  23. this.onRoomEnd(r.RoomId, roomNo)
  24. }
  25. this.removeRoom(r)
  26. }
  27. func (this *gamemgr) OnRoomUserScoreChanged(roomNo int, userId int, score int) {
  28. }
  29. func (this *gamemgr) OnRoomStatusChanged(roomNo int, old, new int) {
  30. }