This commit is contained in:
puxuan 2025-10-29 19:16:19 +08:00
parent 1d36eeccce
commit 1bffe0dd00
37 changed files with 368 additions and 420 deletions

View File

@ -141,37 +141,37 @@ local item = {
["icon"]="21", ["icon"]="21",
["box_drop"]={ ["box_drop"]={
{ {
["type"]=2, ["type"]=3,
["id"]=111, ["id"]=111,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=211, ["id"]=211,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=311, ["id"]=311,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=411, ["id"]=411,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=511, ["id"]=511,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=611, ["id"]=611,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
@ -184,37 +184,37 @@ local item = {
["icon"]="22", ["icon"]="22",
["box_drop"]={ ["box_drop"]={
{ {
["type"]=2, ["type"]=3,
["id"]=112, ["id"]=112,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=212, ["id"]=212,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=312, ["id"]=312,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=412, ["id"]=412,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=512, ["id"]=512,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=612, ["id"]=612,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
@ -227,37 +227,37 @@ local item = {
["icon"]="23", ["icon"]="23",
["box_drop"]={ ["box_drop"]={
{ {
["type"]=2, ["type"]=3,
["id"]=121, ["id"]=121,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=221, ["id"]=221,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=321, ["id"]=321,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=421, ["id"]=421,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=521, ["id"]=521,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=621, ["id"]=621,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
@ -270,37 +270,37 @@ local item = {
["icon"]="24", ["icon"]="24",
["box_drop"]={ ["box_drop"]={
{ {
["type"]=2, ["type"]=3,
["id"]=122, ["id"]=122,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=222, ["id"]=222,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=322, ["id"]=322,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=422, ["id"]=422,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=522, ["id"]=522,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=622, ["id"]=622,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
@ -313,37 +313,37 @@ local item = {
["icon"]="25", ["icon"]="25",
["box_drop"]={ ["box_drop"]={
{ {
["type"]=2, ["type"]=3,
["id"]=123, ["id"]=123,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=223, ["id"]=223,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=323, ["id"]=323,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=423, ["id"]=423,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=523, ["id"]=523,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=623, ["id"]=623,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
@ -356,37 +356,37 @@ local item = {
["icon"]="26", ["icon"]="26",
["box_drop"]={ ["box_drop"]={
{ {
["type"]=2, ["type"]=3,
["id"]=131, ["id"]=131,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=231, ["id"]=231,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=331, ["id"]=331,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=431, ["id"]=431,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=531, ["id"]=531,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=631, ["id"]=631,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
@ -399,37 +399,37 @@ local item = {
["icon"]="27", ["icon"]="27",
["box_drop"]={ ["box_drop"]={
{ {
["type"]=2, ["type"]=3,
["id"]=132, ["id"]=132,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=232, ["id"]=232,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=332, ["id"]=332,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=432, ["id"]=432,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=532, ["id"]=532,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=632, ["id"]=632,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
@ -442,37 +442,37 @@ local item = {
["icon"]="28", ["icon"]="28",
["box_drop"]={ ["box_drop"]={
{ {
["type"]=2, ["type"]=3,
["id"]=133, ["id"]=133,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=233, ["id"]=233,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=333, ["id"]=333,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=433, ["id"]=433,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=533, ["id"]=533,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=633, ["id"]=633,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
@ -485,37 +485,37 @@ local item = {
["icon"]="29", ["icon"]="29",
["box_drop"]={ ["box_drop"]={
{ {
["type"]=2, ["type"]=3,
["id"]=134, ["id"]=134,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=234, ["id"]=234,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=334, ["id"]=334,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=434, ["id"]=434,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=534, ["id"]=534,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=634, ["id"]=634,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
@ -528,37 +528,37 @@ local item = {
["icon"]="30", ["icon"]="30",
["box_drop"]={ ["box_drop"]={
{ {
["type"]=2, ["type"]=3,
["id"]=141, ["id"]=141,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=241, ["id"]=241,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=341, ["id"]=341,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=441, ["id"]=441,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=541, ["id"]=541,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=641, ["id"]=641,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
@ -571,37 +571,37 @@ local item = {
["icon"]="31", ["icon"]="31",
["box_drop"]={ ["box_drop"]={
{ {
["type"]=2, ["type"]=3,
["id"]=142, ["id"]=142,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=242, ["id"]=242,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=342, ["id"]=342,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=442, ["id"]=442,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=542, ["id"]=542,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=642, ["id"]=642,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
@ -614,37 +614,37 @@ local item = {
["icon"]="32", ["icon"]="32",
["box_drop"]={ ["box_drop"]={
{ {
["type"]=2, ["type"]=3,
["id"]=143, ["id"]=143,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=243, ["id"]=243,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=343, ["id"]=343,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=443, ["id"]=443,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=543, ["id"]=543,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=643, ["id"]=643,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
@ -657,37 +657,37 @@ local item = {
["icon"]="33", ["icon"]="33",
["box_drop"]={ ["box_drop"]={
{ {
["type"]=2, ["type"]=3,
["id"]=144, ["id"]=144,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=244, ["id"]=244,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=344, ["id"]=344,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=444, ["id"]=444,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=544, ["id"]=544,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=644, ["id"]=644,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
@ -700,37 +700,37 @@ local item = {
["icon"]="34", ["icon"]="34",
["box_drop"]={ ["box_drop"]={
{ {
["type"]=2, ["type"]=3,
["id"]=145, ["id"]=145,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=245, ["id"]=245,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=345, ["id"]=345,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=445, ["id"]=445,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=545, ["id"]=545,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=645, ["id"]=645,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
@ -743,37 +743,37 @@ local item = {
["icon"]="35", ["icon"]="35",
["box_drop"]={ ["box_drop"]={
{ {
["type"]=2, ["type"]=3,
["id"]=151, ["id"]=151,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=251, ["id"]=251,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=351, ["id"]=351,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=451, ["id"]=451,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=551, ["id"]=551,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=651, ["id"]=651,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
@ -786,37 +786,37 @@ local item = {
["icon"]="36", ["icon"]="36",
["box_drop"]={ ["box_drop"]={
{ {
["type"]=2, ["type"]=3,
["id"]=152, ["id"]=152,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=252, ["id"]=252,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=352, ["id"]=352,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=452, ["id"]=452,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=552, ["id"]=552,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=652, ["id"]=652,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
@ -829,37 +829,37 @@ local item = {
["icon"]="37", ["icon"]="37",
["box_drop"]={ ["box_drop"]={
{ {
["type"]=2, ["type"]=3,
["id"]=153, ["id"]=153,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=253, ["id"]=253,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=353, ["id"]=353,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=453, ["id"]=453,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=553, ["id"]=553,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=653, ["id"]=653,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
@ -872,37 +872,37 @@ local item = {
["icon"]="38", ["icon"]="38",
["box_drop"]={ ["box_drop"]={
{ {
["type"]=2, ["type"]=3,
["id"]=154, ["id"]=154,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=254, ["id"]=254,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=354, ["id"]=354,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=454, ["id"]=454,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=554, ["id"]=554,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=654, ["id"]=654,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
@ -915,37 +915,37 @@ local item = {
["icon"]="39", ["icon"]="39",
["box_drop"]={ ["box_drop"]={
{ {
["type"]=2, ["type"]=3,
["id"]=155, ["id"]=155,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=255, ["id"]=255,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=355, ["id"]=355,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=455, ["id"]=455,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=555, ["id"]=555,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100
}, },
{ {
["type"]=2, ["type"]=3,
["id"]=655, ["id"]=655,
["num"]=1, ["num"]=1,
["weight"]=100 ["weight"]=100

View File

@ -714,17 +714,14 @@ GConst.GAMEOBJECT_LAYER = {
GConst.REWARD_TYPE = { GConst.REWARD_TYPE = {
REWARD_NONE = 0, REWARD_NONE = 0,
ITEM = 1, ITEM = 1,
EQUIP = 2, HERO = 2,
HERO = 3, EQUIP = 3,
LEGACY = 4,
RUNES = 5,
} }
GConst.REWARD_TYPE_NUM = { GConst.REWARD_TYPE_NUM = {
ITEM = 1, ITEM = 1,
EQUIP = 2, HERO = 2,
SOUL = 3, EQUIP = 3,
COLLECTION = 4,
} }
GConst.INT_TO_STRING = { GConst.INT_TO_STRING = {

View File

@ -64,6 +64,10 @@ function TipsManager:showRewardTips(rewardId, rewardType, tarPrefabObj, alignTyp
return return
end end
end end
elseif rewardType == GConst.REWARD_TYPE.EQUIP then
-- 展示装备tips
ModuleManager.EquipManager:showEquipInfoUI({id = rewardId, showType = GConst.EquipConst.INFO_SHOW_TYPE.PREVIEW})
return
end end
local desc = self:getRewardDesc(rewardId, rewardType) local desc = self:getRewardDesc(rewardId, rewardType)
self:showDescTips(desc, tarPrefabObj, alignType) self:showDescTips(desc, tarPrefabObj, alignType)

View File

@ -23,10 +23,10 @@ function TaskCell:refresh(id, period)
if not self.rewardCell then if not self.rewardCell then
self.rewardCell = CellManager:addCellComp(uiMap["task_cell.reward_cell"], GConst.TYPEOF_LUA_CLASS.REWARD_CELL) self.rewardCell = CellManager:addCellComp(uiMap["task_cell.reward_cell"], GConst.TYPEOF_LUA_CLASS.REWARD_CELL)
end end
self.rewardCell:refreshByConfig(cfg.reward[1]) self.rewardCell:refreshByConfig(cfg.reward[1], false, taskInfo.collect)
uiMap["task_cell.num"]:setText(cfg.reward[2].num) uiMap["task_cell.num"]:setText(cfg.reward[2].num)
uiMap["task_cell.mask"]:setVisible(taskInfo.collect) uiMap["task_cell.mask"]:setVisible(taskInfo.collect)
uiMap["task_cell.check_img"]:setVisible(taskInfo.collect) -- uiMap["task_cell.check_img"]:setVisible(taskInfo.collect)
self:getBaseObject():addClickListener(function() self:getBaseObject():addClickListener(function()
self:onClick(id, period) self:onClick(id, period)
end) end)

View File

@ -44,7 +44,7 @@ function TaskComp:refresh(parentUI, day, period)
end) end)
else else
self.rewardCells[id]:hideFrameAnimation() self.rewardCells[id]:hideFrameAnimation()
self.rewardCells[id]:clearClickListener() self.rewardCells[id]:setClickShowTips()
end end
end end

View File

@ -50,7 +50,7 @@ function ActBountyCellV1:refresh(day, maxDay, info)
GFunc.setGrey(self.dayIcon:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_IMAGE), false) GFunc.setGrey(self.dayIcon:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_IMAGE), false)
else else
self.freeRewardCell:hideFrameAnimation() self.freeRewardCell:hideFrameAnimation()
self.freeRewardCell:clearClickListener() self.freeRewardCell:setClickShowTips()
self.dayTx:setVisible(freeGot) self.dayTx:setVisible(freeGot)
self.dayTxGrey:setVisible(not freeGot) self.dayTxGrey:setVisible(not freeGot)
GFunc.setGrey(self.bg:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_IMAGE), not freeGot) GFunc.setGrey(self.bg:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_IMAGE), not freeGot)
@ -78,8 +78,8 @@ function ActBountyCellV1:refresh(day, maxDay, info)
else else
self.proRewardCells[1]:hideFrameAnimation() self.proRewardCells[1]:hideFrameAnimation()
self.proRewardCells[2]:hideFrameAnimation() self.proRewardCells[2]:hideFrameAnimation()
self.proRewardCells[1]:clearClickListener() self.proRewardCells[1]:setClickShowTips()
self.proRewardCells[2]:clearClickListener() self.proRewardCells[2]:setClickShowTips()
end end
end end

View File

@ -266,7 +266,7 @@ function BountyMainUI:refreshPreviewReward(idx)
return return
end end
self.previewRewardCellComp:refreshByConfig(info.reward_pro) self.previewRewardCellComp:refreshByConfig(info.reward_pro)
self.previewRewardCellComp:setNumTx(GConst.EMPTY_STRING) self.previewRewardCellComp:showRewardNum(GConst.EMPTY_STRING)
self.previewRewardNumTx:setText("X" .. GFunc.getRewardNum(info.reward_pro)) self.previewRewardNumTx:setText("X" .. GFunc.getRewardNum(info.reward_pro))
self.previewRewardLvTx:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_1, idx)) self.previewRewardLvTx:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_1, idx))
end end

View File

@ -167,7 +167,7 @@ function BattleArmorResultUI:refreshRewards()
if index <= MAX_SCROLL_SHOW_COUNT and self.animRewards[index] == nil then if index <= MAX_SCROLL_SHOW_COUNT and self.animRewards[index] == nil then
self.animRewards[index] = self:showRewardAppearAnim(index, cell) self.animRewards[index] = self:showRewardAppearAnim(index, cell)
end end
cell:showFirstPass(index <= self.firstPassIdx) cell:setShowFirstTag(index <= self.firstPassIdx)
end) end)
self.rewardScrollRectComp:setFadeArgs(0.05, 0.3) self.rewardScrollRectComp:setFadeArgs(0.05, 0.3)

View File

@ -101,7 +101,7 @@ function BattleBoxOpenUI:getDouble()
if battleController then if battleController then
battleController.doubleMystery = true battleController.doubleMystery = true
end end
self.rewardCell:setNumTx(self.rewards.num * 2) self.rewardCell:showRewardNum(self.rewards.num * 2)
self.okBtn:setActive(true) self.okBtn:setActive(true)
self.adBtn:setActive(false) self.adBtn:setActive(false)
end end

View File

@ -379,7 +379,7 @@ function BattleResultUI:refreshRewards()
self.animRewards[index] = self:showRewardAppearAnim(index, cell) self.animRewards[index] = self:showRewardAppearAnim(index, cell)
end end
cell:showRightUpIcon(index <= self.mysteryBoxIdx, GConst.ATLAS_PATH.COMMON, "common_chest_1") cell:showRightUpIcon(index <= self.mysteryBoxIdx, GConst.ATLAS_PATH.COMMON, "common_chest_1")
cell:showFirstPass(index <= self.firstPassIdx) cell:setShowFirstTag(index <= self.firstPassIdx)
if self.isDouble then if self.isDouble then
cell:setNumTxDouble() cell:setNumTxDouble()
end end

View File

@ -267,7 +267,7 @@ function BountyMainUI:refreshPreviewReward(idx)
return return
end end
self.previewRewardCellComp:refreshByConfig(info.reward_pro) self.previewRewardCellComp:refreshByConfig(info.reward_pro)
self.previewRewardCellComp:setNumTx(GConst.EMPTY_STRING) self.previewRewardCellComp:showRewardNum(GConst.EMPTY_STRING)
self.previewRewardNumTx:setText("X" .. GFunc.getRewardNum(info.reward_pro)) self.previewRewardNumTx:setText("X" .. GFunc.getRewardNum(info.reward_pro))
self.previewRewardLvTx:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_1, idx)) self.previewRewardLvTx:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_1, idx))
end end

View File

@ -134,35 +134,35 @@ function EquipCell:showLight(show)
end end
function EquipCell:setTouchEnable(enable) function EquipCell:setTouchEnable(enable)
self:getBaseObject():setTouchEnable(enable == true) self.baseObject:setTouchEnable(enable == true)
end end
function EquipCell:addClickListener(func) function EquipCell:addClickListener(func)
self:getBaseObject():addClickListener(func) self.baseObject:addClickListener(func)
end end
function EquipCell:removeClickListener() function EquipCell:removeClickListener()
self:getBaseObject():removeClickListener() self.baseObject:removeClickListener()
end end
function EquipCell:getAnchoredPositionX() function EquipCell:getAnchoredPositionX()
return self:getBaseObject():getAnchoredPositionX() return self.baseObject:getAnchoredPositionX()
end end
function EquipCell:setVisible(visible, scale) function EquipCell:setVisible(visible, scale)
self:getBaseObject():setVisible(visible, scale) self.baseObject:setVisible(visible, scale)
end end
function EquipCell:setActive(active) function EquipCell:setActive(active)
self:getBaseObject():setActive(active) self.baseObject:setActive(active)
end end
function EquipCell:addRedPoint(offsetX, offsetY, scale) function EquipCell:addRedPoint(offsetX, offsetY, scale)
self:getBaseObject():addRedPoint(offsetX, offsetY, scale) self.baseObject:addRedPoint(offsetX, offsetY, scale)
end end
function EquipCell:removeRedPoint() function EquipCell:removeRedPoint()
self:getBaseObject():removeRedPoint() self.baseObject:removeRedPoint()
end end
-- function EquipCell:showEffectUp() -- function EquipCell:showEffectUp()
-- if self.effectUp == nil and self.parentUI then -- if self.effectUp == nil and self.parentUI then

View File

@ -20,8 +20,15 @@ end
function ItemCell:_refresh(itemId, count) function ItemCell:_refresh(itemId, count)
local cfg = ConfigManager:getConfig("item")[itemId] local cfg = ConfigManager:getConfig("item")[itemId]
if not cfg then
return
end
self.bg:setSprite(GConst.ATLAS_PATH.ICON_ITEM, GConst.FRAME_QLT[cfg.qlt]) self.bg:setSprite(GConst.ATLAS_PATH.ICON_ITEM, GConst.FRAME_QLT[cfg.qlt])
self.num:setText(GFunc.num2Str(count)) if not count then
self.num:setText("")
else
self.num:setText(GFunc.num2Str(count))
end
if cfg.type == GConst.ItemConst.ITEM_TYPE.HERO_FRAGMENT then if cfg.type == GConst.ItemConst.ITEM_TYPE.HERO_FRAGMENT then
local heroInfo = ConfigManager:getConfig("hero")[cfg.parameter] local heroInfo = ConfigManager:getConfig("hero")[cfg.parameter]
if heroInfo then if heroInfo then
@ -29,7 +36,8 @@ function ItemCell:_refresh(itemId, count)
else else
self.icon:setSprite(GConst.ATLAS_PATH.COMMON, "common_alpha") self.icon:setSprite(GConst.ATLAS_PATH.COMMON, "common_alpha")
end end
self.fragment:setVisible(true) -- self.fragment:setVisible(true)
self.fragment:setVisible(false)
else else
self.icon:setSprite(GConst.ATLAS_PATH.ICON_ITEM, cfg.icon) self.icon:setSprite(GConst.ATLAS_PATH.ICON_ITEM, cfg.icon)
self.fragment:setVisible(false) self.fragment:setVisible(false)
@ -67,4 +75,8 @@ function ItemCell:setNum(numStr)
num:setText(numStr) num:setText(numStr)
end end
function ItemCell:setActive(active)
self.baseObject:setActive(active)
end
return ItemCell return ItemCell

View File

@ -1,238 +1,119 @@
local RewardCell = class("RewardCell", BaseCell) local RewardCell = class("RewardCell", BaseCell)
local EFFECT_LIGHT = "assets/prefabs/effects/ui/vfx_ui_arena_gift_b02.prefab"
function RewardCell:init() function RewardCell:init()
local uiMap = self:getUIMap() local uiMap = self:getUIMap()
self.content = uiMap["reward_cell.content"]
self.icon = uiMap["reward_cell.item_bg.icon"]
self.frameBg = uiMap["reward_cell.item_bg"]
self.mask = uiMap["reward_cell.item_bg.mask"]
self.check = uiMap["reward_cell.check"]
self.numTx = uiMap["reward_cell.item_bg.num"]
self.fragment = uiMap["reward_cell.item_bg.fragment"]
self.rightUpIcon = uiMap["reward_cell.item_bg.right_up_icon"]
self.matchImg = uiMap["reward_cell.item_bg.match_img"]
self.frameAni = uiMap["reward_cell.frame_ani"] self.frameAni = uiMap["reward_cell.frame_ani"]
self.lock = uiMap["reward_cell.lock"] self.itemCell = uiMap["reward_cell.item_cell"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.ITEM_CELL)
-- 首通 self.equipCell = uiMap["reward_cell.equip_cell"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.EQUIP_CELL)
self.firstPass = uiMap["reward_cell.first"] self.imgSelect = uiMap["reward_cell.img_select"]
self.firstPassTx = uiMap["reward_cell.first.tx_first"]
-- 皮肤
self.skin = uiMap["reward_cell.skin"]
self.skinQlt = uiMap["reward_cell.skin.img_qlt"]
-- 特效
self.rootEffect = uiMap["reward_cell.root_effect"]
-- 选中框
self.select = uiMap["reward_cell.content.item_bg.select"]
-- 自选
self.choose = uiMap["reward_cell.choose"]
-- 概率标记 -- 概率标记
self.probNode = uiMap["reward_cell.content.prob"] self.probNode = uiMap["reward_cell.prob"]
self.txProb = uiMap["reward_cell.content.prob.tx_prob"] self.txProb = uiMap["reward_cell.prob.tx_prob"]
self.firstNode = uiMap["reward_cell.first_bg"]
self.txfirst = uiMap["reward_cell.first_bg.first_tx"]
self:setShowSelect(false)
self:hideFrameAnimation() self:hideFrameAnimation()
self.baseObject:addClickListener(function()
if self.clickCallback then
self.clickCallback()
elseif self.rewardId ~= nil then
ModuleManager.TipsManager:showRewardTips(self.rewardId, self.rewardType, self.baseObject)
end
end)
self:setShowProbTag(false) self:setShowProbTag(false)
self:setShowFirstTag(false)
end end
function RewardCell:refresh(reward) function RewardCell:refresh(reward, mask, check)
self:showMask(false, false)
if reward.type == GConst.REWARD_TYPE.ITEM then if reward.type == GConst.REWARD_TYPE.ITEM then
local info = ConfigManager:getConfig("item")[reward.item.id] self.id = reward.item.id
if info == nil then self.num = reward.item.num
return self.type = reward.type
end self.itemCell:setActive(true)
self.rewardId = reward.item.id self.equipCell:setActive(false)
self.rewardType = reward.type
self:_refreshItem(info, reward.item.count)
else
self.rewardId = nil
end
self:showFirstPass(false)
end
-- 展示自选 self.itemCell:refreshByCfg(reward.item.id, reward.item.num or reward.item.count)
function RewardCell:refreshByChoose() elseif reward.type == GConst.REWARD_TYPE.EQUIP then
self.choose:setVisible(true) self.id = reward.equip.cfg_id
self.content:setVisible(false) self.type = reward.type
self.itemCell:setActive(false)
self.equipCell:setActive(true)
self.equipCell:refreshByServer(reward.equip)
end
self:showMask(mask, check)
self:showCheck(check)
self:setShowProbTag(false)
self:setShowFirstTag(false)
self:setClickShowTips()
end end
function RewardCell:refreshById(id, num) function RewardCell:refreshById(id, num)
local reward = {id = id, type = GConst.REWARD_TYPE.ITEM, num = num} self.id = id
self:refreshByConfig(reward) self.num = num
self.type = GConst.REWARD_TYPE.ITEM
self.itemCell:setActive(true)
self.equipCell:setActive(false)
self.itemCell:refreshByCfg(self.id, self.num)
self:showMask(false, false)
self:showCheck(false)
self:setShowProbTag(false)
self:setShowFirstTag(false)
self:setClickShowTips()
end end
function RewardCell:refreshByConfig(reward, mask, check) function RewardCell:refreshByConfig(reward, mask, check)
self.id = reward.id
self.type = reward.type
self.num = reward.num
if reward.type == GConst.REWARD_TYPE_NUM.ITEM then
self.itemCell:setActive(true)
self.equipCell:setActive(false)
local num = reward.num or reward.count
self.itemCell:refreshByCfg(reward.id, num)
elseif reward.type == GConst.REWARD_TYPE_NUM.EQUIP then
self.itemCell:setActive(false)
self.equipCell:setActive(true)
self.equipCell:refreshByCfg(reward.id, reward.lv)
end
self:showMask(mask, check) self:showMask(mask, check)
if reward.type == GConst.REWARD_TYPE.ITEM then self:showCheck(check)
local info = ConfigManager:getConfig("item")[reward.id] self:setShowProbTag(false)
if info == nil then self:setShowFirstTag(false)
return self:setClickShowTips()
end
self.rewardId = reward.id
self.rewardType = reward.type
self:_refreshItem(info, reward.num)
else
self.rewardId = nil
end
self:showFirstPass(false)
end
function RewardCell:refreshItemById(itemId, count, mask, check)
self:showMask(mask, check)
local info = ConfigManager:getConfig("item")[itemId]
if info == nil then
return
end
self.rewardId = itemId
self.rewardType = GConst.REWARD_TYPE.ITEM
self:_refreshItem(info, count)
self:showFirstPass(false)
end
function RewardCell:_refreshItem(info, count)
self.choose:setVisible(false)
self.select:setActive(false)
self.lock:setVisible(false)
self.content:setVisible(true)
self.numTx:setVisible(true)
self.frameBg:setSprite(GConst.ATLAS_PATH.ICON_ITEM, GConst.FRAME_QLT[info.qlt])
if count and count > 0 then
if count > 100 then
self.numTx:setText(GFunc.num2Str(count))
else
self.numTx:setText(GFunc.intToString(count))
end
self.count = count
else
self.numTx:setText(GConst.EMPTY_STRING)
end
if info.type == GConst.ItemConst.ITEM_TYPE.HERO_FRAGMENT then
-- 英雄碎片道具
self.skin:setVisible(false)
self.fragment:setVisible(true)
local heroInfo = ConfigManager:getConfig("hero")[info.parameter]
if heroInfo then
self.icon:setSprite(GConst.ATLAS_PATH.ICON_HERO, heroInfo.icon)
self.matchImg:setVisible(true)
self.matchImg:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HeroConst.MATCH_ICON_NAME[heroInfo.position])
else
self.icon:setSprite(GConst.ATLAS_PATH.COMMON, "common_alpha")
self.matchImg:setVisible(false)
end
elseif info.type == GConst.ItemConst.ITEM_TYPE.SKIN then
-- 皮肤道具
self.skin:setVisible(true)
self.matchImg:setVisible(false)
self.fragment:setVisible(false)
local skinInfo = ConfigManager:getConfig("skin")[info.parameter]
if skinInfo then
self.skin:setVisible(true)
self.icon:setSprite(GConst.ATLAS_PATH.ICON_HERO, skinInfo.icon)
self.skin:setSprite(GConst.ATLAS_PATH.ICON_HERO, "frame_dec_" .. skinInfo.qlt)
self.skinQlt:setSprite(GConst.ATLAS_PATH.HERO, "hero_skin_" .. skinInfo.qlt)
self.frameBg:setSprite(GConst.ATLAS_PATH.ICON_ITEM, GConst.FRAME_QLT[skinInfo.qlt])
else
self.icon:setSprite(GConst.ATLAS_PATH.COMMON, "common_alpha")
end
else
-- 其他
self.icon:setSprite(GConst.ATLAS_PATH.ICON_ITEM, info.icon)
self.fragment:setVisible(false)
self.matchImg:setVisible(false)
self.skin:setVisible(false)
end
self:showLight(false)
end end
function RewardCell:refreshByEntity(entity) function RewardCell:refreshByEntity(entity)
local type = entity:getType() local type = entity:getType()
local id = entity:getId()
if type == GConst.REWARD_TYPE.ITEM then if type == GConst.REWARD_TYPE.ITEM then
local info = ConfigManager:getConfig("item")[id] local id = entity:getId()
if info == nil then self:refreshByConfig({type = type, id = id, num = entity:getNum()})
return
end
self.rewardId = id
self.rewardType = type
self:_refreshItem(info, entity:getNum())
else
self.rewardId = nil
end
self:showMask(false, false)
self:showFirstPass(false)
end
function RewardCell:setIconSprite(atlas, res)
self.icon:setSprite(atlas, res)
end
function RewardCell:setNumTxDouble()
if self.count then
local count = self.count * 2
if count > 100 then
self.numTx:setText(GFunc.num2Str(count))
else
self.numTx:setText(GFunc.intToString(count))
end
end end
end end
function RewardCell:setNumTx(str) function RewardCell:setShowSelect(show, scale)
self.numTx:setText(str) self.imgSelect:setActive(show)
end end
function RewardCell:showMask(show, syncCheck) function RewardCell:setShowProbTag(show, prob)
self.mask:setVisible(show == true) if self.probNode == nil or self.txProb == nil then
self:showCheck(syncCheck) return
end
self.probNode:setVisible(show)
self.txProb:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT_MESH_PRO).fontSize = 24 -- 临时处理大版本的时候再修改prefab
self.txProb:setText((prob or 0) .. "%")
end
function RewardCell:setShowFirstTag(show)
if self.firstNode == nil or self.txfirst == nil then
return
end
self.firstNode:setVisible(show)
self.txfirst:setText(I18N:getGlobalText(I18N.GlobalConst.FIRST_PASS))
end end
function RewardCell:hideCountTx() -- 展示spine动画高亮框
self:setNumTx(GConst.EMPTY_STRING) function RewardCell:showFrameAnimation(scale)
end
function RewardCell:showCheck(show)
self.check:setVisible(show == true)
end
function RewardCell:setVisible(visible)
self.baseObject:setActive(visible)
end
function RewardCell:setActive(visible)
self.baseObject:setActive(visible)
end
function RewardCell:setAnchoredPositionX(x)
self.baseObject:setAnchoredPositionX(x)
end
function RewardCell:setTouchEnable(enable)
self.baseObject:setTouchEnable(enable)
end
function RewardCell:addClickListener(callback)
self.clickCallback = callback
end
function RewardCell:clearClickListener()
self.clickCallback = nil
end
function RewardCell:setLocalScale(x, y, z)
self.baseObject:setLocalScale(x, y, z)
end
function RewardCell:showFrameAnimation(rewardType)
self.frameAni:setActive(true) self.frameAni:setActive(true)
self.frameAni:getComponent(GConst.TYPEOF_UNITY_CLASS.ANIMATOR).enabled = true self.frameAni:getComponent(GConst.TYPEOF_UNITY_CLASS.ANIMATOR).enabled = true
if self.frameAniType ~= GConst.REWARD_TYPE.ITEM then if self.frameAniType ~= GConst.REWARD_TYPE.ITEM then
@ -247,51 +128,96 @@ function RewardCell:hideFrameAnimation()
self.frameAni:setActive(false) self.frameAni:setActive(false)
end end
function RewardCell:showRightUpIcon(show, atlas, iconName) function RewardCell:showMask(show, syncCheck)
self.rightUpIcon:setVisible(show) self.itemCell:showMask(show)
if not show then self.equipCell:showMask(show)
return self:showCheck(syncCheck)
end
self.rightUpIcon:setSprite(atlas, iconName)
end end
-- 展示首通标记 function RewardCell:showCheck(show)
function RewardCell:showFirstPass(show) self.itemCell:showCheck(show)
self.firstPass:setVisible(show == true) self.equipCell:showCheck(show)
if show then
self.firstPassTx:setText(I18N:getGlobalText(I18N.GlobalConst.FIRST_PASS))
end
end end
-- 展示锁定标记
function RewardCell:showLock(show) function RewardCell:showLock(show)
self.lock:setVisible(show == true) self.itemCell:showLock(show)
self.equipCell:showLock(show)
end end
-- 展示光效 function RewardCell:hideRewardNum()
function RewardCell:showLight(show, ui) self.itemCell:setNum(GConst.EMPTY_STRING)
self.rootEffect:removeAllChildren()
if show and ui ~= nil and not self.isLoadingEffectLight then
self.isLoadingEffectLight = true
EffectManager:loadUIEffectAsync(EFFECT_LIGHT, ui, self.rootEffect, GConst.UI_EFFECT_ORDER.LEVEL5, function(obj)
self.isLoadingEffectLight = false
obj:setAnchoredPosition(0, 0)
obj:play()
end)
end
end end
-- 展示选中框 function RewardCell:showRewardNum(numStr)
function RewardCell:showSelect(show) if not numStr then
self.select:setActive(show == true)
end
function RewardCell:setShowProbTag(show, prob)
if self.probNode == nil or self.txProb == nil then
return return
end end
self.probNode:setActive(show) self.itemCell:setNum(numStr)
self.txProb:setText((prob or 0) .. "%")
end end
return RewardCell function RewardCell:setNumTxDouble()
if self.count then
local count = self.count * 2
if count > 100 then
self:showRewardNum(GFunc.num2Str(count))
else
self:showRewardNum(GFunc.intToString(count))
end
end
end
function RewardCell:setClickShowTips(showItemTip)
self.itemCell:addClickListener(function()
ModuleManager.TipsManager:showRewardTips(self.id, self.type, self.baseObject, nil, { num = self.num },
showItemTip)
end)
self.equipCell:addClickListener(function()
ModuleManager.TipsManager:showRewardTips(self.id, self.type, self.baseObject)
end)
end
function RewardCell:addClickListener(func)
self.itemCell:addClickListener(func)
self.equipCell:addClickListener(func)
end
function RewardCell:setParentUI(parent)
self.parentUI = parent
end
function RewardCell:removeClickListener()
self.itemCell:removeClickListener()
self.equipCell:removeClickListener()
end
function RewardCell:setVisible(visible)
self.baseObject:setActive(visible)
end
function RewardCell:setActive(active)
self.baseObject:setActive(active)
end
function RewardCell:setAnchoredPositionX(x)
self.baseObject:setAnchoredPositionX(x)
end
function RewardCell:getAnchoredPositionX()
return self.baseObject:getAnchoredPositionX()
end
function RewardCell:getAnchoredPositionY()
return self.baseObject:getAnchoredPositionY()
end
function RewardCell:setTouchEnable(enable)
self.baseObject:setTouchEnable(enable)
self.itemCell:setTouchEnable(enable)
self.equipCell:setTouchEnable(enable)
end
function RewardCell:setLocalScale(x, y, z)
self.baseObject:setLocalScale(x, y, z)
end
return RewardCell

View File

@ -125,14 +125,14 @@ function CommonBoxUI:onRefresh()
end) end)
self.scrollRect:addRefreshCallback(function(index, cell) self.scrollRect:addRefreshCallback(function(index, cell)
cell:refreshByConfig(self.rewards[index]) cell:refreshByConfig(self.rewards[index])
cell:showSelect(index == self.curIndex) cell:setShowSelect(index == self.curIndex)
cell:setShowProbTag(self.itemType == GConst.ItemConst.ITEM_TYPE.BOX_RANDOM, self:getRewardProb(index)) cell:setShowProbTag(self.itemType == GConst.ItemConst.ITEM_TYPE.BOX_RANDOM, self:getRewardProb(index))
if index ~= self.curIndex and self.itemType == GConst.ItemConst.ITEM_TYPE.BOX_SELECT then if index ~= self.curIndex and self.itemType == GConst.ItemConst.ITEM_TYPE.BOX_SELECT then
cell:addClickListener(function() cell:addClickListener(function()
self:onClickReward(index) self:onClickReward(index)
end) end)
else else
cell:clearClickListener() cell:setClickShowTips()
end end
end) end)
end end

View File

@ -110,8 +110,8 @@ function MopUpUI:refreshTarget()
self.rewardCell = CellManager:addCellComp(uiMap["mop_up_ui.bg.item_node.reward_cell"], GConst.TYPEOF_LUA_CLASS.REWARD_CELL) self.rewardCell = CellManager:addCellComp(uiMap["mop_up_ui.bg.item_node.reward_cell"], GConst.TYPEOF_LUA_CLASS.REWARD_CELL)
end end
self.rewardCell:refreshItemById(self.target.id) self.rewardCell:refreshById(self.target.id)
self.rewardCell:hideCountTx() self.rewardCell:hideRewardNum()
local curProgress = DataManager.BagData.ItemData:getItemNumById(self.target.id) or 0 local curProgress = DataManager.BagData.ItemData:getItemNumById(self.target.id) or 0
local itemNameTx = GFunc.getRewardName(GConst.REWARD_TYPE.ITEM, self.target.id) local itemNameTx = GFunc.getRewardName(GConst.REWARD_TYPE.ITEM, self.target.id)

View File

@ -43,7 +43,7 @@ function DungeonCell:refresh(moduleKey)
if rewards and rewards[i] then if rewards and rewards[i] then
cell:setActive(true) cell:setActive(true)
cell:refreshByConfig(rewards[i]) cell:refreshByConfig(rewards[i])
cell:hideCountTx() cell:hideRewardNum()
else else
cell:setActive(false) cell:setActive(false)
end end

View File

@ -123,7 +123,7 @@ function DungeonGoldCell:refresh(index)
end) end)
self.scrollRectComp:addRefreshCallback(function(cellIndex, cell) self.scrollRectComp:addRefreshCallback(function(cellIndex, cell)
cell:refreshByConfig(self.rewardList[cellIndex], false, false) cell:refreshByConfig(self.rewardList[cellIndex], false, false)
cell:showFirstPass(cellIndex <= self.firstCount) cell:setShowFirstTag(cellIndex <= self.firstCount)
end) end)
end end

View File

@ -124,7 +124,7 @@ function DungeonMaterialCell:refresh(index)
end) end)
self.scrollRectComp:addRefreshCallback(function(cellIndex, cell) self.scrollRectComp:addRefreshCallback(function(cellIndex, cell)
cell:refreshByConfig(self.rewardList[cellIndex], false, false) cell:refreshByConfig(self.rewardList[cellIndex], false, false)
cell:showFirstPass(cellIndex <= self.firstCount) cell:setShowFirstTag(cellIndex <= self.firstCount)
end) end)
end end

View File

@ -67,7 +67,7 @@ function DungeonArmorFarmUI:refreshMiddle()
cell:getBaseObject():setActive(reward ~= nil) cell:getBaseObject():setActive(reward ~= nil)
if reward ~= nil then if reward ~= nil then
cell:refreshByConfig(reward) cell:refreshByConfig(reward)
cell:hideCountTx() cell:hideRewardNum()
end end
end end

View File

@ -74,7 +74,7 @@ function DungeonArmorFightUI:refreshMiddle()
cell:getBaseObject():setActive(reward ~= nil) cell:getBaseObject():setActive(reward ~= nil)
if reward ~= nil then if reward ~= nil then
cell:refreshByConfig(reward) cell:refreshByConfig(reward)
cell:hideCountTx() cell:hideRewardNum()
end end
end end

View File

@ -53,7 +53,7 @@ function ChapterLayerCell:refresh(id)
for i = 1, 3 do for i = 1, 3 do
if config.item_show[i] then if config.item_show[i] then
self.rewardCells[i]:refreshByConfig(config.item_show[i]) self.rewardCells[i]:refreshByConfig(config.item_show[i])
self.rewardCells[i]:hideCountTx() self.rewardCells[i]:hideRewardNum()
self.rewardCells[i]:getBaseObject():setActive(true) self.rewardCells[i]:getBaseObject():setActive(true)
else else
self.rewardCells[i]:getBaseObject():setActive(false) self.rewardCells[i]:getBaseObject():setActive(false)
@ -81,7 +81,7 @@ function ChapterLayerCell:refresh(id)
for i = 1, 3 do for i = 1, 3 do
if config.item_show[i] then if config.item_show[i] then
self.rewardCells[i]:refreshByConfig(config.item_show[i]) self.rewardCells[i]:refreshByConfig(config.item_show[i])
self.rewardCells[i]:hideCountTx() self.rewardCells[i]:hideRewardNum()
self.rewardCells[i]:getBaseObject():setActive(true) self.rewardCells[i]:getBaseObject():setActive(true)
else else
self.rewardCells[i]:getBaseObject():setActive(false) self.rewardCells[i]:getBaseObject():setActive(false)
@ -104,14 +104,14 @@ function ChapterLayerCell:refresh(id)
for i = 1, 3 do for i = 1, 3 do
if config.item_show[i] then if config.item_show[i] then
self.rewardCells[i]:refreshByConfig(config.item_show[i]) self.rewardCells[i]:refreshByConfig(config.item_show[i])
self.rewardCells[i]:hideCountTx() self.rewardCells[i]:hideRewardNum()
self.rewardCells[i]:getBaseObject():setActive(true) self.rewardCells[i]:getBaseObject():setActive(true)
else else
self.rewardCells[i]:getBaseObject():setActive(false) self.rewardCells[i]:getBaseObject():setActive(false)
end end
end end
self.rewardCells[4]:refreshByConfig(config.first_reward) self.rewardCells[4]:refreshByConfig(config.first_reward)
self.rewardCells[4]:showFirstPass(true) self.rewardCells[4]:setShowFirstTag(true)
fightBtn:addClickListener(function() fightBtn:addClickListener(function()
ModuleManager.DungeonWeaponManager:reqFight(id) ModuleManager.DungeonWeaponManager:reqFight(id)
end) end)

View File

@ -34,6 +34,7 @@ function EquipInfoUI:onLoadRootComplete()
end) end)
self.equipCell = uiMap["equip_info_ui.bg.equip_cell"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.EQUIP_CELL) self.equipCell = uiMap["equip_info_ui.bg.equip_cell"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.EQUIP_CELL)
self.bg1 = uiMap["equip_info_ui.bg.bg1"]
self.nameTx = uiMap["equip_info_ui.bg.name_tx"] self.nameTx = uiMap["equip_info_ui.bg.name_tx"]
self.partTx = uiMap["equip_info_ui.bg.part_desc_tx.part_tx"] self.partTx = uiMap["equip_info_ui.bg.part_desc_tx.part_tx"]
self.powerTx = uiMap["equip_info_ui.bg.power_desc_tx.power_tx"] self.powerTx = uiMap["equip_info_ui.bg.power_desc_tx.power_tx"]
@ -117,10 +118,11 @@ function EquipInfoUI:refreshPreview()
cell.attrNameTx:setText(GFunc.getAttrDesc(extraAttr.type, extraAttr.minnum)) cell.attrNameTx:setText(GFunc.getAttrDesc(extraAttr.type, extraAttr.minnum))
cell.attrValueTx:setText(GConst.EMPTY_STRING) cell.attrValueTx:setText(GConst.EMPTY_STRING)
cell.attrValueAddTx:setActive(true) cell.attrValueAddTx:setActive(true)
cell.attrValueAddTx:setText("<color=#FFFFFF>".. GFunc.getFinalAttrValue(extraAttr.type, extraAttr.minnum, 2) .. "-".. GFunc.getFinalAttrValue(extraAttr.type, extraAttr.maxnum, 2) .."</color>") cell.attrValueAddTx:setText("<color=#2D3449>".. GFunc.getFinalAttrValue(extraAttr.type, extraAttr.minnum, 2) .. "-".. GFunc.getFinalAttrValue(extraAttr.type, extraAttr.maxnum, 2) .."</color>")
end end
self.replaceBtn:setActive(false) self.replaceBtn:setActive(false)
self.upBtn:setActive(false) self.upBtn:setActive(false)
self.bg1:setSizeDeltaY(346)
end end
function EquipInfoUI:refreshBaseAttr() function EquipInfoUI:refreshBaseAttr()
@ -143,6 +145,7 @@ function EquipInfoUI:refreshBaseAttr()
self.attrValueAddTx:setText(GConst.EMPTY_STRING) self.attrValueAddTx:setText(GConst.EMPTY_STRING)
self.replaceBtn:setActive(false) self.replaceBtn:setActive(false)
self.upBtn:setActive(false) self.upBtn:setActive(false)
self.bg1:setSizeDeltaY(326)
end end
function EquipInfoUI:refreshAllAttr() function EquipInfoUI:refreshAllAttr()
@ -195,6 +198,7 @@ function EquipInfoUI:refreshAllAttr()
end end
self.replaceBtn:setActive(true) self.replaceBtn:setActive(true)
self.upBtn:setActive(true) self.upBtn:setActive(true)
self.bg1:setSizeDeltaY(326)
end end
return EquipInfoUI return EquipInfoUI

View File

@ -65,7 +65,7 @@ function FundChapterCell:refresh(id, isLast)
cell:showFrameAnimation() cell:showFrameAnimation()
else else
cell:hideFrameAnimation() cell:hideFrameAnimation()
cell:clearClickListener() cell:setClickShowTips()
end end
else else
cell:setActive(false) cell:setActive(false)
@ -88,7 +88,7 @@ function FundChapterCell:refresh(id, isLast)
cell:showFrameAnimation() cell:showFrameAnimation()
else else
cell:hideFrameAnimation() cell:hideFrameAnimation()
cell:clearClickListener() cell:setClickShowTips()
end end
else else
cell:setActive(false) cell:setActive(false)

View File

@ -111,9 +111,9 @@ function HeroInfoComp:refreshUpInfo()
self.costCell:setActive(true) self.costCell:setActive(true)
self.costCell:refreshByConfig(cost) self.costCell:refreshByConfig(cost)
if hadNum >= cost.num then if hadNum >= cost.num then
self.costCell:setNumTx(hadNum .. "/" .. cost.num) self.costCell:showRewardNum(hadNum .. "/" .. cost.num)
else else
self.costCell:setNumTx("<color=#D82F2D>" .. hadNum .. "</color>" .. "/" .. cost.num) self.costCell:showRewardNum("<color=#D82F2D>" .. hadNum .. "</color>" .. "/" .. cost.num)
end end
if canLvUp then if canLvUp then

View File

@ -39,7 +39,7 @@ function HeroUnlockUI:initHeroes()
local heroEntity = DataManager.HeroData:getHeroById(self.heroIdList[i]) local heroEntity = DataManager.HeroData:getHeroById(self.heroIdList[i])
self.uiMap["hero_unlock_ui.bg_" .. i]:setVisible(true) self.uiMap["hero_unlock_ui.bg_" .. i]:setVisible(true)
local rewardCell = self.uiMap["hero_unlock_ui.bg_" .. i .. ".reward_cell"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL) local rewardCell = self.uiMap["hero_unlock_ui.bg_" .. i .. ".reward_cell"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL)
rewardCell:refreshItemById(heroEntity:getFragmentId(), 0) rewardCell:refreshById(heroEntity:getFragmentId(), 0)
self.uiMap["hero_unlock_ui.bg_" .. i .. ".name_tx"]:setText(heroEntity:getName()) self.uiMap["hero_unlock_ui.bg_" .. i .. ".name_tx"]:setText(heroEntity:getName())
self.uiMap["hero_unlock_ui.bg_" .. i .. ".desc_tx"]:setText(heroEntity:getDesc()) self.uiMap["hero_unlock_ui.bg_" .. i .. ".desc_tx"]:setText(heroEntity:getDesc())
end end

View File

@ -85,9 +85,9 @@ function StarInfoComp:refreshStarBtn()
self.costCell:setActive(true) self.costCell:setActive(true)
self.costCell:refreshByConfig(cost) self.costCell:refreshByConfig(cost)
if hadNum >= cost.num then if hadNum >= cost.num then
self.costCell:setNumTx(hadNum .. "/" .. cost.num) self.costCell:showRewardNum(hadNum .. "/" .. cost.num)
else else
self.costCell:setNumTx("<color=#D82F2D>" .. hadNum .. "</color>" .. "/" .. cost.num) self.costCell:setNushowRewardNummTx("<color=#D82F2D>" .. hadNum .. "</color>" .. "/" .. cost.num)
end end
end end
end end

View File

@ -26,7 +26,7 @@ function FreeDailyRewardsComp:refresh()
self.rewadCell:refreshByConfig(reward, isClaimed, isClaimed) self.rewadCell:refreshByConfig(reward, isClaimed, isClaimed)
if isClaimed then if isClaimed then
self.rewadCell:hideFrameAnimation() self.rewadCell:hideFrameAnimation()
self.rewadCell:clearClickListener() self.rewadCell:setClickShowTips()
else else
self.rewadCell:showFrameAnimation() self.rewadCell:showFrameAnimation()
self.rewadCell:addClickListener(function() self.rewadCell:addClickListener(function()

View File

@ -77,9 +77,9 @@ function MonthlyCardComp:refresh()
self.payBtnGreyTx:setText(I18N:getGlobalText(I18N.GlobalConst.BTN_DONE)) self.payBtnGreyTx:setText(I18N:getGlobalText(I18N.GlobalConst.BTN_DONE))
self.payBtn:setActive(false) self.payBtn:setActive(false)
self.rewadCell1:hideFrameAnimation() self.rewadCell1:hideFrameAnimation()
self.rewadCell1:clearClickListener() self.rewadCell1:setClickShowTips()
self.rewadCell12:hideFrameAnimation() self.rewadCell12:hideFrameAnimation()
self.rewadCell12:clearClickListener() self.rewadCell12:setClickShowTips()
self.descTx6:setText(GConst.EMPTY_STRING) self.descTx6:setText(GConst.EMPTY_STRING)
self.payBtn:removeRedPoint() self.payBtn:removeRedPoint()
else else
@ -94,11 +94,11 @@ function MonthlyCardComp:refresh()
end end
if rewards and rewards[1] then if rewards and rewards[1] then
local num = count*rewards[1].num local num = count*rewards[1].num
self.rewadCell1:setNumTx(GFunc.num2Str(num)) self.rewadCell1:showRewardNum(GFunc.num2Str(num))
end end
if rewards and rewards[2] then if rewards and rewards[2] then
local num = count*rewards[2].num local num = count*rewards[2].num
self.rewadCell12:setNumTx(GFunc.num2Str(num)) self.rewadCell12:showRewardNum(GFunc.num2Str(num))
end end
self.rewadCell1:showFrameAnimation() self.rewadCell1:showFrameAnimation()
self.rewadCell1:addClickListener(function() self.rewadCell1:addClickListener(function()
@ -126,12 +126,12 @@ function MonthlyCardComp:refresh()
if rewards and rewards[1] then if rewards and rewards[1] then
local num = count*rewards[1].num local num = count*rewards[1].num
self.rewadCell1:refreshByConfig(rewards[1], false, false) self.rewadCell1:refreshByConfig(rewards[1], false, false)
self.rewadCell1:setNumTx(GFunc.num2Str(num)) self.rewadCell1:showRewardNum(GFunc.num2Str(num))
end end
if rewards and rewards[2] then if rewards and rewards[2] then
local num = count*rewards[2].num local num = count*rewards[2].num
self.rewadCell12:refreshByConfig(rewards[2], false, false) self.rewadCell12:refreshByConfig(rewards[2], false, false)
self.rewadCell12:setNumTx(GFunc.num2Str(num)) self.rewadCell12:showRewardNum(GFunc.num2Str(num))
end end
self.rewadCell1:showFrameAnimation() self.rewadCell1:showFrameAnimation()
self.rewadCell1:addClickListener(function() self.rewadCell1:addClickListener(function()
@ -150,12 +150,12 @@ function MonthlyCardComp:refresh()
self.rewadCell1:refreshByConfig(rewards[1], false, false) self.rewadCell1:refreshByConfig(rewards[1], false, false)
end end
self.rewadCell1:hideFrameAnimation() self.rewadCell1:hideFrameAnimation()
self.rewadCell1:clearClickListener() self.rewadCell1:setClickShowTips()
if rewards and rewards[2] then if rewards and rewards[2] then
self.rewadCell12:refreshByConfig(rewards[2], false, false) self.rewadCell12:refreshByConfig(rewards[2], false, false)
end end
self.rewadCell12:hideFrameAnimation() self.rewadCell12:hideFrameAnimation()
self.rewadCell12:clearClickListener() self.rewadCell12:setClickShowTips()
self.payBtn:removeRedPoint() self.payBtn:removeRedPoint()
end end
end end

View File

@ -70,13 +70,13 @@ function SignMonthCell:refresh(day)
--不可领取 --不可领取
self.btn_ad:setActive(false) self.btn_ad:setActive(false)
self.bg:setSprite(GConst.ATLAS_PATH.UI_ACT_MONTH_SIGNIN, "act_month_signin_bg_3") self.bg:setSprite(GConst.ATLAS_PATH.UI_ACT_MONTH_SIGNIN, "act_month_signin_bg_3")
-- self.rewardCell:setClickShowTips(true) self.rewardCell:setClickShowTips(true)
elseif signState == GConst.SignConst.SIGN_STATE.SIGNEDIN then elseif signState == GConst.SignConst.SIGN_STATE.SIGNEDIN then
--已签到 --已签到
showCheck = true showCheck = true
self.btn_ad:setActive(false) self.btn_ad:setActive(false)
self.bg:setSprite(GConst.ATLAS_PATH.UI_ACT_MONTH_SIGNIN, "act_month_signin_bg_5") self.bg:setSprite(GConst.ATLAS_PATH.UI_ACT_MONTH_SIGNIN, "act_month_signin_bg_5")
-- self.rewardCell:setClickShowTips(true) self.rewardCell:setClickShowTips(true)
end end
if showFrame then if showFrame then
self.rewardCell:showFrameAnimation() self.rewardCell:showFrameAnimation()

View File

@ -107,8 +107,8 @@ function SignWeekCell:refresh(day)
else else
self.proRewardCells[1]:hideFrameAnimation() self.proRewardCells[1]:hideFrameAnimation()
self.proRewardCells[2]:hideFrameAnimation() self.proRewardCells[2]:hideFrameAnimation()
-- self.proRewardCells[1]:setClickShowTips() self.proRewardCells[1]:setClickShowTips()
-- self.proRewardCells[2]:setClickShowTips() self.proRewardCells[2]:setClickShowTips()
end end
self.funcBtn:addClickListener(function() self.funcBtn:addClickListener(function()

View File

@ -76,7 +76,7 @@ function BoxItemTips:initScrollRect()
scrollRectComp:addRefreshCallback(function(index, cell) scrollRectComp:addRefreshCallback(function(index, cell)
cell:refreshByConfig(self.itemList[index].reward) cell:refreshByConfig(self.itemList[index].reward)
if not self.isFixed then if not self.isFixed then
cell:hideCountTx() cell:hideRewardNum()
end end
end) end)
scrollRectComp:clearCells() scrollRectComp:clearCells()

View File

@ -50,7 +50,7 @@ function BoxTips:onLoadRootComplete()
local rewardComp = uiMap["box_tips.bg.item_" .. i .. ".reward_cell"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL) local rewardComp = uiMap["box_tips.bg.item_" .. i .. ".reward_cell"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL)
rewardComp:refreshByConfig(rewardList[i]) rewardComp:refreshByConfig(rewardList[i])
rewardComp:setTouchEnable(false) rewardComp:setTouchEnable(false)
rewardComp:setNumTx(GConst.EMPTY_STRING) rewardComp:showRewardNum(GConst.EMPTY_STRING)
else else
rewardNode:setVisible(false) rewardNode:setVisible(false)
end end

View File

@ -51,7 +51,7 @@ function ChooseRewardTips:initScrollRect()
end) end)
self.scrollRectComp:addRefreshCallback(function(index, cell) self.scrollRectComp:addRefreshCallback(function(index, cell)
cell:refreshByConfig(self.chooseRewards[index]) cell:refreshByConfig(self.chooseRewards[index])
cell:showSelect(index == self.selectIndex) cell:setShowSelect(index == self.selectIndex)
cell:addClickListener(function() cell:addClickListener(function()
self:onSelectReward(index) self:onSelectReward(index)
end) end)

View File

@ -87,7 +87,7 @@ function HeroFragmentTips:initScrollRect()
return GConst.TYPEOF_LUA_CLASS.REWARD_CELL return GConst.TYPEOF_LUA_CLASS.REWARD_CELL
end) end)
scrollRectComp:addRefreshCallback(function(index, cell) scrollRectComp:addRefreshCallback(function(index, cell)
cell:refreshItemById(self.heroList[index], 0) cell:refreshById(self.heroList[index], 0)
end) end)
scrollRectComp:clearCells() scrollRectComp:clearCells()
scrollRectComp:refillCells(#self.heroList) scrollRectComp:refillCells(#self.heroList)

View File

@ -26,7 +26,7 @@ function WeightBoxTips:onLoadRootComplete()
self.dropIds = cfg.hero_drop self.dropIds = cfg.hero_drop
elseif cfg.box_drop then elseif cfg.box_drop then
for _, item in ipairs(cfg.box_drop) do for _, item in ipairs(cfg.box_drop) do
table.insert(self.dropIds, item.id) table.insert(self.dropIds, item)
end end
end end
local uiMap = self.root:genAllChildren() local uiMap = self.root:genAllChildren()
@ -62,7 +62,7 @@ function WeightBoxTips:initScrollRect()
return GConst.TYPEOF_LUA_CLASS.REWARD_CELL return GConst.TYPEOF_LUA_CLASS.REWARD_CELL
end) end)
scrollRectComp:addRefreshCallback(function(index, cell) scrollRectComp:addRefreshCallback(function(index, cell)
cell:refreshItemById(self.dropIds[index], 0) cell:refreshByConfig(self.dropIds[index])
end) end)
scrollRectComp:clearCells() scrollRectComp:clearCells()
scrollRectComp:refillCells(#self.dropIds) scrollRectComp:refillCells(#self.dropIds)

View File

@ -355,6 +355,11 @@ function DailyChallengeData:getReviveCount()
return self.todayRevive return self.todayRevive
end end
function DailyChallengeData:getReReviveCount()
local cfgAdCount = GFunc.getConstIntValue("daily_challenge_ads_revive_limit")
return cfgAdCount - self.todayRevive
end
function DailyChallengeData:canAdRevive() function DailyChallengeData:canAdRevive()
local cfgAdCount = GFunc.getConstIntValue("daily_challenge_ads_revive_limit") local cfgAdCount = GFunc.getConstIntValue("daily_challenge_ads_revive_limit")
return self.todayRevive < cfgAdCount return self.todayRevive < cfgAdCount