Back to Home

ESO Lua File v100032

publicallingames/marketcurrency/marketcurrency_shared.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
28
29
30
31
32
ZO_MarketCurrency_Shared = ZO_Object:Subclass()
function ZO_MarketCurrency_Shared:New(...)
    local marketCurrency = ZO_Object.New(self)
    marketCurrency:Initialize(...)
    return marketCurrency
end
function ZO_MarketCurrency_Shared:Initialize(control)
    self.control = control
    control:RegisterForEvent(EVENT_CROWN_UPDATE, function(eventId, ...) self:OnCrownsUpdated(...) end)
    control:RegisterForEvent(EVENT_CROWN_GEM_UPDATE, function(eventId, ...) self:OnCrownGemsUpdated(...) end)
end
function ZO_MarketCurrency_Shared:InitializeControls()
    -- To be overridden
end
-- difference is the difference in crowns for this update. For instance, new crowns purchased will show a positive difference.
function ZO_MarketCurrency_Shared:OnCrownsUpdated(currentCurrency, difference)
    -- To be overridden
end
function ZO_MarketCurrency_Shared:OnCrownGemsUpdated(currentCurrency, difference, reason)
    -- To be overridden
end