Back to Home

ESO Lua File v100024

internalingame/rewards/internalingame_rewards_manager.lua

[◄ back to folders ]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
---------------------
-- Rewards Manager
---------------------
local InternalIngameRewardsManager = ZO_RewardsManager:Subclass()
function InternalIngameRewardsManager:New(...)
    return ZO_RewardsManager.New(self)
end
function InternalIngameRewardsManager:GetCollectibleEntryInfo(rewardId, parentChoice)
    local collectibleId = GetCollectibleRewardCollectibleId(rewardId)
    if collectibleId > 0 then
        local rewardData = ZO_RewardData:New(rewardId, parentChoice)
          local collectibleName, collectibleDescription, collectibleIcon = GetCollectibleInfo(collectibleId)
        rewardData:SetFormattedName(ZO_CachedStrFormat(SI_COLLECTIBLE_NAME_FORMATTER, collectibleName))
        rewardData:SetIcon(collectibleIcon)
        return rewardData
    end
    return nil
end
REWARDS_MANAGER = InternalIngameRewardsManager:New()