competitivewaterpool.go 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. package competitivewaterpool
  2. import (
  3. pb "bet24.com/servers/micros/waterpool/proto"
  4. )
  5. func Run() {
  6. mgr = newCompetitiveWaterPoolMgr()
  7. }
  8. func Dump(param1 string) {
  9. switch param1 {
  10. case "info":
  11. mgr.dump()
  12. case "refresh":
  13. mgr.loadRedisConfig(true)
  14. }
  15. }
  16. func GetInventoryType(gameId int, roomName string) int {
  17. return mgr.getInventoryType(gameId, roomName)
  18. }
  19. func ReduceInventoryValue(gameId int, roomName string, reduceValue, roomType int) {
  20. mgr.reduceInventoryValue(gameId, roomName, reduceValue, roomType)
  21. }
  22. func GetInventoryList(gameId int) pb.InventoryList {
  23. return mgr.getInventoryList(gameId)
  24. }
  25. func UpdateInventoryList(gameId int, roomName string, roomType, inventoryValue, minInventoryValue, maxInventoryValue,
  26. maxControlRate int) pb.InventoryList {
  27. return mgr.updateInventoryList(gameId, roomName, roomType, inventoryValue, minInventoryValue, maxInventoryValue, maxControlRate)
  28. }
  29. func GetInventoryValue(gameId, roomType int, roomName string) int {
  30. return mgr.getInventoryValue(gameId, roomType, roomName)
  31. }