-
Notifications
You must be signed in to change notification settings - Fork 0
Data Types
Sinaloit edited this page Jul 5, 2014
·
5 revisions
We've only used the profile data type before, but there is a whole set of other data types.
The following data types are available:
- char Character-specific data. Every character has its own database.
- realm Realm-specific data. All of the players characters on the same realm share this database.
- class Class-specific data. All of the players characters of the same class share this database*.
- race Race-specific data. All of the players characters of the same race share this database*.
- locale Locale-specific data. All characters using the same locale share this database.
- global Global Data. All characters on the same account share this database.
- profile Profile-specific data. All characters using the same profile share this database. The user can control which profile should be used.
You can use all of those at the same time
local charName = GameLib.GetPlayerUnit:GetName()
function MyAddon:OnInitialize()
self.db = Apollo.GetPackage("Gemini:DB-1.0").tPackage:New(self)
self.db.char.money = GetMoney()
self.db.global.money[charName] = GetMoney()
end
*: Although default data for these datatypes are availble, Get/Set cannot be done until after the character has been created.