/
## Interface: 80000 |
## Title: Lib: SpellName2SID-1.0 |
## Notes: Table of English Spell Names and corresponding Spell IDs |
## Version: 1.0.12 |
## Version: 1.0.12b |
## LoadOnDemand: 1 |
## Author: aallkkaa |
## X-Original-Author: twobits |
local AddonName, AddonEnv = ...; |
local LIBSN2SID = LibStub:GetLibrary("LibSpellName2SID"); |
local SID = LIBSN2SID.SID; |
local LSN = LIBSN2SID.LSN; |
print("print time with tostring(...) = ".. (endTime - startTime).. "ns."); |
startTime = GetTime(); |
print(AddonName.. ": SID[\"Auto Attack\"] = ".. tostring(SID["Auto Attack"])); -- |
print(AddonName.. ": SID[\"Auto Attack\"] = ".. SID["Auto Attack"]); -- |
endTime = GetTime(); |
print(AddonName.. "... in ".. endTime - startTime.. "ns."); |
end |
racialKey = (next(LibSN2SID.DB.General.Racials, racialKey)); |
end |
-- elseif categoryKey ~= "METADATA" then -- Currentlu not in the database |
else |
tinsert(LookupOrder_table.General, categoryKey); |
-- elseif categoryKey ~= "METADATA" then -- Currentlu not on the database |
-- tinsert(LookupOrder_table.General, categoryKey); |
end |
categoryKey = (next(LibSN2SID.DB.General, categoryKey)); |
end |
## Title: LibSpellName2SID: Populator (DEV) |
## Notes: Get all spells from a character and save them to file. |
## Author: aallkkaa |
## Version: 1.0.12 |
## Version: 1.0.12b |
## SavedVariables: SpellNamesAndIDs, SpellNamesAndIDs_PASSIVES |
## DefaultState: disabled |
## X-Category: Development |
## Interface: 80000 |
## Title: Lib: SpellName2SID-1.0-Passives |
## Notes: Table of English Spell Names and corresponding Spell IDs|nPassive spells database variant |
## Version: 1.0.12 |
## Version: 1.0.12b |
## LoadOnDemand: 1 |
## Author: aallkkaa |
## X-Original-Author: twobits |
local AddonName, AddonEnv = ...; |
local LIBSN2SID = LibStub:GetLibrary("LibSpellName2SID-Passives"); |
local SID = LIBSN2SID.SID; |
local LSN = LIBSN2SID.LSN; |
local LIBSN2SIDP = LibStub:GetLibrary("LibSpellName2SIDPassives"); |
local SID = LIBSN2SIDP.SID; |
local LSN = LIBSN2SIDP.LSN; |
print(AddonName.. ": Starting test!"); |
local Frame = CreateFrame("Frame"); |
Frame:RegisterEvent("PLAYER_LOGIN"); -- Not enough data from game til this event fires. |
-- Frame:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED"); -- This talent and/or the one in the line bellow |
-- Frame:RegisterEvent("PLAYER_LOGIN"); -- Not enough data from game til this event fires. |
Frame:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED"); -- This talent and/or the one in the line bellow |
-- Frame:RegisterEvent("PLAYER_TALENT_UPDATE"); -- should fire when the player switches spec. |
-- TESTED: Both of these fire Twice on Changing |
-- spec. On Login but "ACTIVE_..." fires Once, |
--------------------- |
-- LibSpellName2SIDPassives - fork off LibSpellName2SID by aallkkaa |
-- LibSpellName2SID-Passives - fork off LibSpellName2SID by aallkkaa |
-- |
-- V.10008 - 10012: 2018 WoW-7.3.x release, by aallkkaa [1] |
-- |
-- [1] https://www.wowinterface.com/forums/member.php?u=335646 |
--------------------- |
-- API: |
-- LibSpellName2SIDPassives.SID["EnglishSpellName"] -- Spell ID of English Spell Name |
-- LibSpellName2SIDPassives.LSN["EnglishSpellName"] -- Localized Spell Name |
-- LibSpellName2SIDPassives:GetNumSpells() -- Get the number of spells in the database - TEMP. OUT |
-- LibSpellName2SIDPassives:Cleanup() -- Clean up the database (remove from RAM) - DEPRECATED |
-- LibSpellName2SID-Passives.SID["EnglishSpellName"] -- Spell ID of English Spell Name |
-- LibSpellName2SID-Passives.LSN["EnglishSpellName"] -- Localized Spell Name |
-- LibSpellName2SID-Passives:GetNumSpells() -- Get the number of spells in the database - TEMP. OUT |
-- LibSpellName2SID-Passives:Cleanup() -- Clean up the database (remove from RAM) - DEPRECATED |
--------------------- |
-- Initialisation -- |
AddonName, AddonEnv = ...; |
-- Library's version values -- |
local LibSpellName2SIDPassives_MAJOR = "LibSpellName2SIDPassives"; |
local LibSpellName2SIDPassives_MINOR = 10012; |
-- print(LibSpellName2SIDPassives_MAJOR.. "-".. LibSpellName2SIDPassives_MINOR.. ": AddonName = ".. AddonName); |
local LibSpellName2SID_MAJOR = "LibSpellName2SID-Passives"; |
local LibSpellName2SID_MINOR = 10012; |
-- print(LibSpellName2SID_MAJOR.. "-".. LibSpellName2SID_MINOR.. ": AddonName = ".. AddonName); |
-- DataSource -- |
-- gameBuild = 27178 |
-- clientLocale = enUS |
-- Register with LibStub -- |
assert(LibStub, LibSpellName2SIDPassives_MAJOR.. "-".. LibSpellName2SIDPassives_MINOR.." requires LibStub."); |
local LibSN2SIDP = LibStub:NewLibrary(LibSpellName2SIDPassives_MAJOR, LibSpellName2SIDPassives_MINOR); |
assert(LibStub, LibSpellName2SID_MAJOR.. "-".. LibSpellName2SID_MINOR.." requires LibStub."); |
local LibSN2SIDP = LibStub:NewLibrary(LibSpellName2SID_MAJOR, LibSpellName2SID_MINOR); |
if not LibSN2SIDP then -- Same version or newer already loaded; |
return; -- I.e. nothing else to do. |
end |
--------------------------------------- |
LibSN2SIDP.owner = AddonName; |
LibSN2SIDP.minor = LibSpellName2SIDPassives_MINOR; |
LibSN2SIDP.minor = LibSpellName2SID_MINOR; |
LibSN2SIDP.DB = {}; -- Clear old version's contents, if applicable |
end |
} |
); |
-- For backwards compatibility (LibSpellName2SIDPassives_MINOR < 10008) |
-- For backwards compatibility (LibSpellName2SID_MINOR < 10008) |
LibSN2SIDP.ID = LibSN2SIDP.SID; |
-- Return Localised Name of the English Spell Name |
-- not if we're a Global library, which may be in use by several addons. |
-- print("LibSN2SIDP.owner = ".. LibSN2SIDP.owner); |
-- print("LibSN2SIDP: AddonName = ".. AddonName); |
if LibSN2SIDP.owner ~= "LibSpellName2SIDPassives-1.0" then |
if LibSN2SIDP.owner ~= "LibSpellName2SID-1.0" then |
LibSN2SIDP.DB = {}; |
-- print(AddonName.. ": LibSN2SIDP.DB NOW has ".. LibSN2SIDP.GetNumSpells().. " keys."); |
return true; |