|
|
- GuildSupportInfoMainThankNameItem = GuildSupportInfoMainThankNameItem or BaseClass(BaseItem)
-
- local GuildSupportInfoMainThankNameItem = GuildSupportInfoMainThankNameItem
- GuildSupportInfoMainThankNameItem.Width = 162
- GuildSupportInfoMainThankNameItem.Height = 22
- function GuildSupportInfoMainThankNameItem:__init()
- self.base_file = "guild"
- self.layout_file = "GuildSupportInfoMainThankNameItem"
- self.is_delay_callback = true
- self.model = GuildModel:getInstance()
- self:Load()
- end
-
- function GuildSupportInfoMainThankNameItem:Load_callback()
- self.nodes = {
- "name/vip", "name:tmp", "name/sex:img",
- }
- self:GetChildren(self.nodes)
-
-
- if self.need_refreshData then
- self:SetData(self.data,self.index,self.type)
- end
- self:InitEvent()
- end
-
- function GuildSupportInfoMainThankNameItem:InitEvent()
-
- end
-
- function GuildSupportInfoMainThankNameItem:__delete()
- if self.vipItem then
- self.vipItem:DeleteMe()
- self.vipItem = nil
- end
- end
-
- function GuildSupportInfoMainThankNameItem:SetData(data,index,type)
- self.data = data
- self.index = index
- self.type = type
- if self.is_loaded then
- self.need_refreshData = false
- else
- self.need_refreshData = true
- return
- end
- if not self.data or (not self.data.name and self.type ~= GuildModel.SupportThankType.SpellList) then return end
- if not self.vipItem then
- self.vipItem = RoleVipItem.New(self.vip)
- end
- --以下就是玩家的个人数据
- if self.type == GuildModel.SupportThankType.SpellList and self.data.role_id < 10 then -- 社团拼单假人
- self.name_tmp.text = "社团助手"
- self.vipItem:SetData(0, 0)
- self.sex_img.enabled = false
- else
- self.name_tmp.text = self.data.name
- self.vipItem:SetData(self.data.vip_flag,self.data.sup_vip_type)
- self.sex_img.enabled = true
- if self.data.sex then
- lua_resM:setImageSprite(self, self.sex_img, "common_asset", self.data.sex == 1 and "com_boy" or "com_girl", true)
- end
- end
- end
-
|