Back to Home

ESO Lua File v100018

ingame/trialaccount/trialaccount_ingameshared.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
local SETTING_FORMAT = "TrialAccountType%iSeenVersion"
    local accountTypeId, title, description, currentVersion = GetTrialInfo()
    local seenVersion = 0
    if accountTypeId > 0 then
        local settingName = string.format(SETTING_FORMAT, accountTypeId)
        seenVersion = GetCVar(settingName)
        --If the setting has not been created in GameSettings.xml, we must add it if we want to be able to see the pop-up
        --Otherwise we just pretend like we've seen it
        if seenVersion == "" then
            seenVersion = currentVersion
        else
            seenVersion = tonumber(seenVersion)
        end
    end
    return accountTypeId, title, description, currentVersion, seenVersion
end
function ZO_TrialAccount_SetSeenVersion(accountTypeId, seenVersion)
    local settingName = string.format(SETTING_FORMAT, accountTypeId)
    SetCVar(settingName, seenVersion)
end