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
+4 -4
View File
@@ -1920,9 +1920,9 @@
local player
local pet_attribute
local role = UnitGroupRolesAssigned ("player")
local spec = GetSpecialization()
role = spec and GetSpecializationRole (spec) or role
local role = DetailsFramework.UnitGroupRolesAssigned ("player")
local spec = DetailsFramework.GetSpecialization()
role = spec and DetailsFramework.GetSpecializationRole (spec) or role
if (role == "DAMAGER") then
player = combat (DETAILS_ATTRIBUTE_DAMAGE, _detalhes.playername)
@@ -1980,7 +1980,7 @@
local GC = GameCooltip
GC:SetOption ("YSpacingMod", 0)
local role = UnitGroupRolesAssigned ("player")
local role = DetailsFramework.UnitGroupRolesAssigned ("player")
if (spell.n_dmg) then
+2 -27
View File
@@ -18,7 +18,7 @@ local _GetChannelName = GetChannelName --> wow api locals
local _UnitExists = UnitExists --> wow api locals
local _UnitName = UnitName --> wow api locals
local _UnitIsPlayer = UnitIsPlayer --> wow api locals
local _UnitGroupRolesAssigned = UnitGroupRolesAssigned --> wow api locals
local _UnitGroupRolesAssigned = DetailsFramework.UnitGroupRolesAssigned --> wow api locals
local _detalhes = _G._detalhes
local gump = _detalhes.gump
@@ -1284,19 +1284,6 @@ end
--> setup default wallpaper
new_instance.wallpaper.texture = "Interface\\AddOns\\Details\\images\\background"
--[[ 7.1.5 isn't sending the background on the 5� return value ~cleanup
local spec = GetSpecialization()
if (spec) then
local id, name, description, icon, _background, role = GetSpecializationInfo (spec)
if (_background) then
local bg = "Interface\\TALENTFRAME\\" .. _background
if (new_instance.wallpaper) then
new_instance.wallpaper.texture = bg
new_instance.wallpaper.texcoord = {0, 1, 0, 0.703125}
end
end
end
--]]
--> finish
return new_instance
@@ -1315,19 +1302,7 @@ end
new_instance:ResetInstanceConfig()
--> setup default wallpaper
new_instance.wallpaper.texture = "Interface\\AddOns\\Details\\images\\background"
--[[ 7.1.5 isn't sending the background on the 5� return value ~cleanup
local spec = GetSpecialization()
if (spec) then
local id, name, description, icon, _background, role = GetSpecializationInfo (spec)
if (_background) then
local bg = "Interface\\TALENTFRAME\\" .. _background
if (new_instance.wallpaper) then
new_instance.wallpaper.texture = bg
new_instance.wallpaper.texcoord = {0, 1, 0, 0.703125}
end
end
end
--]]
--> internal stuff
new_instance.barras = {} --container que ir� armazenar todas as barras
new_instance.barraS = {nil, nil} --de x at� x s�o as barras que est�o sendo mostradas na tela
+2 -1
View File
@@ -19,6 +19,7 @@
local _pairs = pairs --lua local
local AddUnique = DetailsFramework.table.addunique --framework
local UnitGroupRolesAssigned = DetailsFramework.UnitGroupRolesAssigned --framework
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> constants
@@ -290,7 +291,7 @@
if (name == nome) then
local spec = GetArenaOpponentSpec (i)
if (spec) then
local id, name, description, icon, role, class = GetSpecializationInfoByID (spec) --thanks pas06
local id, name, description, icon, role, class = DetailsFramework.GetSpecializationInfoByID (spec) --thanks pas06
novo_objeto.role = role
novo_objeto.classe = class
novo_objeto.enemy = true