Skip to content

Commit

Permalink
Fixed combability issues with the tbc beta version
Browse files Browse the repository at this point in the history
  • Loading branch information
Tercioo committed Apr 13, 2021
1 parent bc97d27 commit 4a28c63
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 15 deletions.
4 changes: 2 additions & 2 deletions boot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
_ = nil
_detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0")

_detalhes.build_counter = 8402
_detalhes.alpha_build_counter = 8402 --if this is higher than the regular counter, use it instead
_detalhes.build_counter = 8406
_detalhes.alpha_build_counter = 8406 --if this is higher than the regular counter, use it instead
_detalhes.dont_open_news = true
_detalhes.game_version = "v9.0.5"
_detalhes.userversion = "v9.0.5." .. _detalhes.build_counter
Expand Down
11 changes: 6 additions & 5 deletions core/parser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@
local is_using_spellId_override = false

--> is this a timewalking exp?
local is_classic_exp = DetailsFramework.IsClassicWow()
local is_timewalk_exp = DetailsFramework.IsTimewalkWoW()

--> recording data options flags
Expand Down Expand Up @@ -371,7 +372,7 @@
-----------------------------------------------------------------------------------------------------------------------------------------

function parser:swing (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, amount, overkill, school, resisted, blocked, absorbed, critical, glacing, crushing, isoffhand)
return parser:spell_dmg (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, 1, "Corpo-a-Corpo", 00000001, amount, overkill, school, resisted, blocked, absorbed, critical, glacing, crushing, isoffhand) --> localize-me
return parser:spell_dmg (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, 1, _G["MELEE"], 00000001, amount, overkill, school, resisted, blocked, absorbed, critical, glacing, crushing, isoffhand) --> localize-me
--spellid, spellname, spelltype
end

Expand Down Expand Up @@ -495,7 +496,7 @@
return
end

if (is_timewalk_exp) then
if (is_classic_exp) then
spellid = spellname

else --retail
Expand Down Expand Up @@ -1741,8 +1742,8 @@
--17 parameters on tbc beta on april 1st, shieldname isn't boolean but the parameters need to be arranged
--owner_serial, owner_name, owner_flags, owner_flags2, shieldid, shieldname, shieldtype, amount = spellid, spellname, spellschool, owner_serial, owner_name, owner_flags, owner_flags2, shieldid

spellid = spellname
shieldid = shieldname
--spellid = spellname --not necessary anymore on tbc beta
--shieldid = shieldname

parser:heal (token, time, owner_serial, owner_name, owner_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, shieldid, shieldname, shieldtype, amount, 0, 0, nil, true)
return
Expand Down Expand Up @@ -1817,7 +1818,7 @@
return
end

if (is_timewalk_exp) then
if (is_classic_exp) then
spellid = spellname
end

Expand Down
7 changes: 6 additions & 1 deletion frames/window_playerbreakdown_list.lua
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,12 @@
if (specIcon) then
self.specIcon:SetTexture(specIcon)
self.specIcon:SetTexCoord(L, R, T, B)
specId, specName, specDescription, specIconId, specRole, specClass = _G.GetSpecializationInfoByID(self.playerObject.spec)

if (DetailsFramework.IsTimewalkWoW()) then
specRole = "NONE"
else
specId, specName, specDescription, specIconId, specRole, specClass = _G.GetSpecializationInfoByID(self.playerObject.spec)
end
else
self.specIcon:SetTexture(nil)
end
Expand Down
12 changes: 6 additions & 6 deletions functions/spellcache.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ do
local _unpack = unpack

--> is this a timewalking exp?
local is_timewalk_exp = DetailsFramework.IsTimewalkWoW()
local is_classic_exp = DetailsFramework.IsClassicWow()

--> default container
_detalhes.spellcache = {}
local unknowSpell = {Loc ["STRING_UNKNOWSPELL"], _, "Interface\\Icons\\Ability_Druid_Eclipse"} --> localize-me

local AllSpellNames
if (is_timewalk_exp) then
if (is_classic_exp) then
AllSpellNames = {}
local GetSpellInfo = GetSpellInfo
for i = 1, 60000 do
Expand All @@ -33,7 +33,7 @@ do
end
end

local GetSpellInfoTimewalk = function(spell)
local GetSpellInfoClassic = function(spell)
local spellName, _, spellIcon

if (spell == 0) then
Expand Down Expand Up @@ -71,8 +71,8 @@ do
--> should save only icon and name, other values are not used
if (valor) then --> check if spell is valid before
local cache
if (is_timewalk_exp) then
cache = {GetSpellInfoTimewalk(valor)}
if (is_classic_exp) then
cache = {GetSpellInfoClassic(valor)}
else
cache = {_GetSpellInfo (valor)}
end
Expand Down Expand Up @@ -121,7 +121,7 @@ do

elseif (DetailsFramework.IsTBCWow()) then
default_user_spells = {
[1] = {name = Loc ["STRING_MELEE"], icon = [[Interface\ICONS\INV_Sword_04]]},
[1] = {name = _G["MELEE"], icon = [[Interface\ICONS\INV_Sword_04]]},
[2] = {name = Loc ["STRING_AUTOSHOT"], icon = [[Interface\ICONS\INV_Weapon_Bow_07]]},
[3] = {name = Loc ["STRING_ENVIRONMENTAL_FALLING"], icon = [[Interface\ICONS\Spell_Magic_FeatherFall]]},
[4] = {name = Loc ["STRING_ENVIRONMENTAL_DROWNING"], icon = [[Interface\ICONS\Ability_Suffocate]]},
Expand Down
2 changes: 1 addition & 1 deletion startup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ function Details:StartMeUp() --I'll never stop!
end

if (DetailsFramework.IsTimewalkWoW()) then
Details:Msg("TBC Beta Version: 0009")
Details:Msg("TBC Beta Version: 0011")
end

if (DetailsFramework.IsTBCWow()) then
Expand Down

0 comments on commit 4a28c63

Please sign in to comment.