UIExpeditionDungeonInfoCtr.lua 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. local UIExpeditionDungeonInfoCtr = class("UIExpeditionDungeonInfoCtr", require("UICtrBase"))
  2. function UIExpeditionDungeonInfoCtr:Init(view)
  3. self.view = view
  4. end
  5. function UIExpeditionDungeonInfoCtr:SetData(data)
  6. self.asyncIdx = 0
  7. if data == nil then return end
  8. self.data = data
  9. self:RefreshMapData()
  10. end
  11. function UIExpeditionDungeonInfoCtr:GetAsyncIdx()
  12. self.asyncIdx = self.asyncIdx + 1
  13. return self.asyncIdx
  14. end
  15. function UIExpeditionDungeonInfoCtr:GetData()
  16. return self.data
  17. end
  18. function UIExpeditionDungeonInfoCtr:RefreshMapData()
  19. self.mapData = ManagerContainer.DataMgr.ExpeditionDataMgr:FindMapByTypeId(self.data)
  20. end
  21. function UIExpeditionDungeonInfoCtr:GetMapData()
  22. return self.mapData
  23. end
  24. function UIExpeditionDungeonInfoCtr:GetCurLevelId()
  25. local curLevelId = ManagerContainer.DataMgr.ExpeditionDataMgr:GetCurLevelId()
  26. local mapData = self:GetMapData()
  27. if mapData.isPassed then
  28. curLevelId = mapData.maxLevelNum
  29. end
  30. return curLevelId
  31. end
  32. function UIExpeditionDungeonInfoCtr:OnDispose()
  33. self.data = nil
  34. self.view = nil
  35. self.mapData = nil
  36. end
  37. return UIExpeditionDungeonInfoCtr