UIForge1Ctr.lua 721 B

123456789101112131415161718192021222324252627282930313233
  1. local UIForge1Ctr = class("UIForge1Ctr", require("UICtrBase"))
  2. function UIForge1Ctr:Init(view)
  3. self.view = view
  4. end
  5. function UIForge1Ctr:SetData(data)
  6. self.asyncIdx = 0
  7. if data == nil then return end
  8. self.data = data
  9. end
  10. function UIForge1Ctr:GetAsyncIdx()
  11. self.asyncIdx = self.asyncIdx + 1
  12. return self.asyncIdx
  13. end
  14. function UIForge1Ctr:GetData()
  15. return self.data
  16. end
  17. function UIForge1Ctr:SendEquipForge(cfgId, count)
  18. local oldData = ManagerContainer.CfgMgr:GetEquipById(cfgId)
  19. ManagerContainer.NetManager:SendMessage(ProtoMsgId.CS_EQUIP_FORGE_REQ, {config_id = cfgId, once = count, equip_type = oldData.Type})
  20. end
  21. function UIForge1Ctr:OnDispose()
  22. self.data = nil
  23. self.view = nil
  24. end
  25. return UIForge1Ctr