Addon for elder scroll online that makes a snapshot of your trading houses. Other addons can request a new snapshot or register on events so they are notices when a new snapshot is created.
snapshot =
{
-- Holds the items grouped per guild
tradingHouseItemList =
{
-- First guild
1 =
{
-- First item
{
itemId = '',
guildName = '',
itemLink = '',
sellerName = '',
quality = '',
stackCount = '',
price = '',
pricePerPiece = '',
expiry = '',
-- Deprecated. guildId will be removed in version 2.0
-- You should use the guildName
guildId = '',
},
-- Next item etc
{
-- ..
}
},
-- Next guild etc
2 =
{
-- ..
}
},
-- Will list the guilds with their information
guildList =
{
-- First guild
1 =
{
id = '',
name = '',
alianceId = '',
},
-- Next guild etc
2 =
{
-- ..
}
},
-- The creation timestamp of when the snapshot was finished building
creationTimestamp = nil,
}
JMTradingHouseSnapshot.createSnapshot()
Allows you to create a new snapshot. The snapshot will not be returned because it will take a while.
local snapshot = JMTradingHouseSnapshot.getSnapshot()
Will return the latest successful snapshot or false
if no snapshot was ever made.
JMTradingHouseSnapshot.abort()
Will abort the snapshot if running.
JMTradingHouseSnapshot.registerForEvent(event, callback)
Allows you to listen to an event. See Events for list of possible events. The callback function will be called when the events triggers.
JMTradingHouseSnapshot.unregisterForEvent(event, callback)
Stop listening to an event.
All possible events are listen in JMTradingHouseSnapshot.events
.
JMTradingHouseSnapshot.events.SCAN_STARTED
Will be triggered when the scanner is starting to create a snapshot.
JMTradingHouseSnapshot.registerForEvent(JMTradingHouseSnapshot.events.SCAN_STARTED, function ()
d('Scan started')
end)
JMTradingHouseSnapshot.events.SCAN_SUCCEEDED
Will be triggered when the snapshot has finished successfully. The function will have one argument with the snapshot.
JMTradingHouseSnapshot.registerForEvent(JMTradingHouseSnapshot.events.SCAN_SUCCEEDED, function (snapshot)
d('Scan finished successfully')
d(snapshot)
end)
JMTradingHouseSnapshot.events.SCAN_FAILED
Will be triggered when the scanner got aborted.
JMTradingHouseSnapshot.registerForEvent(JMTradingHouseSnapshot.events.SCAN_FAILED, function ()
d('Scan failed')
end)
JMTradingHouseSnapshot.events.SCAN_ALREADY_RUNNING
Will be triggered when the scanner is already making a snapshot.
JMTradingHouseSnapshot.registerForEvent(JMTradingHouseSnapshot.events.SCAN_ALREADY_RUNNING, function ()
d('Scan already running')
end)
JMTradingHouseSnapshot.events.ADDON_LOADED
Will be triggered when the addon is fully setup. So you know that you can ask for a scan.
JMTradingHouseSnapshot.registerForEvent(JMTradingHouseSnapshot.events.ADDON_LOADED, function ()
d('Addon is loaded')
end)
This Add-on is not created by, affiliated with or sponsored by ZeniMax Media Inc. or its affiliates. The Elder Scrolls® and related logos are registered trademarks or trademarks of ZeniMax Media Inc. in the United States and/or other countries. All rights reserved.