ServerOptionsProxy.lua 860 B

1234567891011121314151617181920212223242526272829303132333435
  1. local RemoteProxy = requireProxy("remote/RemoteProxy")
  2. local ServerOptionsProxy = class("ServerOptionsProxy", RemoteProxy)
  3. ServerOptionsProxy.NAME = global.ProxyTable.ServerOptionsProxy
  4. function ServerOptionsProxy:ctor()
  5. ServerOptionsProxy.super.ctor(self)
  6. self._data = {}
  7. end
  8. function ServerOptionsProxy:setOptions(data)
  9. if not data then
  10. return
  11. end
  12. self._data = data
  13. end
  14. function ServerOptionsProxy:setOptionByKey(k, v)
  15. self._data[k] = v
  16. end
  17. function ServerOptionsProxy:checkOption(id)
  18. return self._data[id]
  19. end
  20. function CHECK_SERVER_OPTION(id)
  21. local ServerOptionsProxy = global.Facade:retrieveProxy(global.ProxyTable.ServerOptionsProxy)
  22. if not ServerOptionsProxy then
  23. return false
  24. end
  25. return ServerOptionsProxy:checkOption(id)
  26. end
  27. return ServerOptionsProxy