UIExpeditionWinCtr.lua 995 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. local UIExpeditionWinCtr = class("UIExpeditionWinCtr", require("UICtrBase"))
  2. function UIExpeditionWinCtr:Init(view)
  3. self.view = view
  4. end
  5. function UIExpeditionWinCtr:SetData(data)
  6. self.buffs = nil
  7. self.asyncIdx = 0
  8. if data == nil then return end
  9. self.data = data
  10. self.buffIds = self.data[1]
  11. self.inBattling = self.data[2]
  12. self:InitBuffData()
  13. end
  14. function UIExpeditionWinCtr:GetAsyncIdx()
  15. self.asyncIdx = self.asyncIdx + 1
  16. return self.asyncIdx
  17. end
  18. function UIExpeditionWinCtr:GetData()
  19. return self.data
  20. end
  21. function UIExpeditionWinCtr:OnDispose()
  22. self.data = nil
  23. self.view = nil
  24. self.buffs = nil
  25. end
  26. function UIExpeditionWinCtr:InitBuffData()
  27. self.buffs = {}
  28. for i = 1, #self.buffIds do
  29. local buff = ManagerContainer.CfgMgr:GetExpeditionBuffCfgById(self.buffIds[i])
  30. self.buffs[#self.buffs + 1] = buff
  31. end
  32. end
  33. function UIExpeditionWinCtr:GetBuffs()
  34. return self.buffs
  35. end
  36. function UIExpeditionWinCtr:InBattling()
  37. return self.inBattling
  38. end
  39. return UIExpeditionWinCtr