Initial WoW Classic Support

First pass of changes to make Details! compatible with WoW Classic.
This commit is contained in:
Tercioo
2019-05-23 15:13:42 -03:00
parent 24dde5130c
commit 643d25bb91
30 changed files with 517 additions and 364 deletions
@@ -2216,6 +2216,10 @@ function EncounterDetails:OnEvent (_, event, ...)
if (_G._detalhes and _G._detalhes:InstallOkey()) then
if (DetailsFramework.IsClassicWow()) then
return
end
--> create widgets
CreatePluginFrames (data)
@@ -2094,7 +2094,6 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
local spellname, _, spellicon = _GetSpellInfo (spell)
tinsert (t, {label = spellname, value = {timer_table [2], spellname, spellIcon or spellicon, timer_table.id, timer_table [7]}, icon = spellIcon or spellicon, onclick = on_select_dbm_bar})
else
--local title, description, depth, abilityIcon, displayInfo, siblingID, nextSectionID, filteredByDifficulty, link, startsOpen, flag1, flag2, flag3, flag4 = EJ_GetSectionInfo (spell)
local title, description, depth, abilityIcon, displayInfo, siblingID, nextSectionID, filteredByDifficulty, link, startsOpen, flag1, flag2, flag3, flag4 = C_EncounterJournal.GetSectionInfo (spell)
tinsert (t, {label = title, value = {timer_table [2], title, spellIcon or abilityIcon, timer_table.id, timer_table [7]}, icon = spellIcon or abilityIcon, onclick = on_select_dbm_bar})
end
@@ -2122,7 +2121,6 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
local spellname = timer_table [2]:gsub (" %(.%)", "")
tinsert (t, {label = spellname, value = {timer_table [2], spellname, timer_table [5], timer_table.id}, icon = timer_table [5], onclick = on_select_bw_bar})
elseif (int_spell < 0) then
--local title, description, depth, abilityIcon, displayInfo, siblingID, nextSectionID, filteredByDifficulty, link, startsOpen, flag1, flag2, flag3, flag4 = EJ_GetSectionInfo (abs (int_spell))
local title, description, depth, abilityIcon, displayInfo, siblingID, nextSectionID, filteredByDifficulty, link, startsOpen, flag1, flag2, flag3, flag4 = C_EncounterJournal.GetSectionInfo (abs (int_spell))
tinsert (t, {label = title, value = {timer_table [2], title, timer_table [5] or abilityIcon, timer_table.id}, icon = timer_table [5] or abilityIcon, onclick = on_select_bw_bar})
else
@@ -4,11 +4,12 @@ local UnitBuff = UnitBuff
local GetSpellInfo = GetSpellInfo
local UnitClass = UnitClass
local UnitName = UnitName
local UnitGroupRolesAssigned = UnitGroupRolesAssigned
local CLASS_ICON_TCOORDS = CLASS_ICON_TCOORDS
local DF = DetailsFramework
local UnitGroupRolesAssigned = DF.UnitGroupRolesAssigned
--> build the list of buffs to track
local flask_list = DetailsFramework.FlaskIDs
@@ -869,6 +870,10 @@ end
if (_G._detalhes) then
if (DetailsFramework.IsClassicWow()) then
return
end
--> create widgets
CreatePluginFrames()
@@ -1895,6 +1895,10 @@ function StreamOverlay:OnEvent (_, event, ...)
player_name = UnitName ("player")
if (_G._detalhes) then
if (DetailsFramework.IsClassicWow()) then
return
end
--> create widgets
CreatePluginFrames()
@@ -8,7 +8,7 @@ local _UnitName = UnitName --> wow api
local _UnitDetailedThreatSituation = UnitDetailedThreatSituation
local _IsInRaid = IsInRaid --> wow api
local _IsInGroup = IsInGroup --> wow api
local _UnitGroupRolesAssigned = UnitGroupRolesAssigned --> wow api
local _UnitGroupRolesAssigned = DetailsFramework.UnitGroupRolesAssigned --> wow api
local GetUnitName = GetUnitName
local _ipairs = ipairs --> lua api
@@ -639,6 +639,10 @@ function ThreatMeter:OnEvent (_, event, ...)
if (AddonName == "Details_TinyThreat") then
if (_G._detalhes) then
if (DetailsFramework.IsClassicWow()) then
return
end
--> create widgets
CreatePluginFrames (data)
@@ -13,7 +13,7 @@ local _UFC = UnitAffectingCombat --> wow api local
local _IsInRaid = IsInRaid --> wow api local
local _IsInGroup = IsInGroup --> wow api local
local _UnitName = UnitName --> wow api local
local _UnitGroupRolesAssigned = UnitGroupRolesAssigned --> wow api local
local _UnitGroupRolesAssigned = DetailsFramework.UnitGroupRolesAssigned
local _UnitHealth = UnitHealth --> wow api local
local _UnitHealthMax = UnitHealthMax --> wow api local
local _UnitIsPlayer = UnitIsPlayer --> wow api local
@@ -826,6 +826,10 @@ function Vanguard:OnEvent (_, event, arg1, token, time, who_serial, who_name, wh
if (AddonName == "Details_Vanguard") then
if (_G._detalhes) then
if (DetailsFramework.IsClassicWow()) then
return
end
local MINIMAL_DETAILS_VERSION_REQUIRED = 1
local default_saved_table = {