头像、头像框道具解锁优化
This commit is contained in:
parent
7fdadd75b4
commit
e85055d67a
@ -26,6 +26,8 @@ ItemConst.ITEM_TYPE = {
|
||||
WEIGHT_FRAGMENT = 6,
|
||||
RANDOM_BOX_ITEM = 7,
|
||||
FIXED_BOX_ITEM = 8,
|
||||
AVATAR = 9,
|
||||
FRAME = 10,
|
||||
EPIC_HERO_FRAMENT = 11,
|
||||
SKIN = 12
|
||||
}
|
||||
|
||||
@ -390,7 +390,7 @@ function PlayerData:getCanUnlockAvatarIds(checkData)
|
||||
if type(checkData) == "table" then
|
||||
-- 判断items解锁
|
||||
for index, reward in ipairs(checkData) do
|
||||
if reward.type == GConst.REWARD_TYPE.ITEM then
|
||||
if reward.type == GConst.REWARD_TYPE.ITEM and ConfigManager:getConfig("item")[reward.item.id].type == GConst.ItemConst.ITEM_TYPE.AVATAR then
|
||||
for id, data in pairs(ConfigManager:getConfig("avatar")) do
|
||||
if not self:isAvatarUnlock(id) and data.item == reward.item.id then
|
||||
table.insert(ids, id)
|
||||
@ -540,7 +540,7 @@ function PlayerData:getCanUnlockFrameIds(checkData)
|
||||
if type(checkData) == "table" then
|
||||
-- 判断items解锁
|
||||
for index, reward in ipairs(checkData) do
|
||||
if reward.type == GConst.REWARD_TYPE.ITEM then
|
||||
if reward.type == GConst.REWARD_TYPE.ITEM and ConfigManager:getConfig("item")[reward.item.id].type == GConst.ItemConst.ITEM_TYPE.FRAME then
|
||||
for id, data in pairs(ConfigManager:getConfig("avatar_frame")) do
|
||||
if not self:isFrameUnlock(id) and data.item == reward.item.id then
|
||||
table.insert(ids, id)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user