Merge pull request #511 from Flamanis/Port-to-Era
First pass on attempting to work on Classic_Era
This commit is contained in:
@@ -322,7 +322,12 @@ detailsFramework.FrameContainerMixin = {
|
||||
|
||||
frameContainer:CheckResizeLockedState()
|
||||
frameContainer:CheckMovableLockedState()
|
||||
frameContainer:SetResizeBounds(50, 50, 1000, 1000)
|
||||
if (DF.IsClassicWow()) then
|
||||
frameContainer:SetMinResize(50, 50)
|
||||
frameContainer:SetMaxResize(1000,1000)
|
||||
else
|
||||
frameContainer:SetResizeBounds(50, 50, 1000, 1000)
|
||||
end
|
||||
end,
|
||||
|
||||
---run when the container has its size changed
|
||||
|
||||
@@ -0,0 +1,194 @@
|
||||
local versionString, revision, launchDate, gameVersion = GetBuildInfo()
|
||||
if (gameVersion >= 20000) then
|
||||
return
|
||||
end
|
||||
|
||||
--localization
|
||||
local gameLanguage = GetLocale()
|
||||
|
||||
local L = { --default localization
|
||||
["STRING_EXPLOSION"] = "explosion",
|
||||
["STRING_MIRROR_IMAGE"] = "Mirror Image",
|
||||
["STRING_CRITICAL_ONLY"] = "critical",
|
||||
["STRING_BLOOM"] = "Bloom", --lifebloom 'bloom' healing
|
||||
["STRING_GLAIVE"] = "Glaive", --DH glaive toss
|
||||
["STRING_MAINTARGET"] = "Main Target",
|
||||
["STRING_AOE"] = "AoE", --multi targets
|
||||
["STRING_SHADOW"] = "Shadow", --the spell school 'shadow'
|
||||
["STRING_PHYSICAL"] = "Physical", --the spell school 'physical'
|
||||
["STRING_PASSIVE"] = "Passive", --passive spell
|
||||
["STRING_TEMPLAR_VINDCATION"] = "Templar's Vindication", --paladin spell
|
||||
["STRING_PROC"] = "proc", --spell proc
|
||||
["STRING_TRINKET"] = "Trinket", --trinket
|
||||
}
|
||||
|
||||
if (gameLanguage == "enUS") then
|
||||
--default language
|
||||
|
||||
elseif (gameLanguage == "deDE") then
|
||||
L["STRING_EXPLOSION"] = "Explosion"
|
||||
L["STRING_MIRROR_IMAGE"] = "Bilder spiegeln"
|
||||
L["STRING_CRITICAL_ONLY"] = "kritisch"
|
||||
|
||||
elseif (gameLanguage == "esES") then
|
||||
L["STRING_EXPLOSION"] = "explosión"
|
||||
L["STRING_MIRROR_IMAGE"] = "Imagen de espejo"
|
||||
L["STRING_CRITICAL_ONLY"] = "crítico"
|
||||
|
||||
elseif (gameLanguage == "esMX") then
|
||||
L["STRING_EXPLOSION"] = "explosión"
|
||||
L["STRING_MIRROR_IMAGE"] = "Imagen de espejo"
|
||||
L["STRING_CRITICAL_ONLY"] = "crítico"
|
||||
|
||||
elseif (gameLanguage == "frFR") then
|
||||
L["STRING_EXPLOSION"] = "explosion"
|
||||
L["STRING_MIRROR_IMAGE"] = "Effet miroir"
|
||||
L["STRING_CRITICAL_ONLY"] = "critique"
|
||||
|
||||
elseif (gameLanguage == "itIT") then
|
||||
L["STRING_EXPLOSION"] = "esplosione"
|
||||
L["STRING_MIRROR_IMAGE"] = "Immagine Speculare"
|
||||
L["STRING_CRITICAL_ONLY"] = "critico"
|
||||
|
||||
elseif (gameLanguage == "koKR") then
|
||||
L["STRING_EXPLOSION"] = "폭발"
|
||||
L["STRING_MIRROR_IMAGE"] = "미러 이미지"
|
||||
L["STRING_CRITICAL_ONLY"] = "치명타"
|
||||
|
||||
elseif (gameLanguage == "ptBR") then
|
||||
L["STRING_EXPLOSION"] = "explosão"
|
||||
L["STRING_MIRROR_IMAGE"] = "Imagem Espelhada"
|
||||
L["STRING_CRITICAL_ONLY"] = "critico"
|
||||
|
||||
elseif (gameLanguage == "ruRU") then
|
||||
L["STRING_EXPLOSION"] = "взрыв"
|
||||
L["STRING_MIRROR_IMAGE"] = "Зеркальное изображение"
|
||||
L["STRING_CRITICAL_ONLY"] = "критический"
|
||||
|
||||
elseif (gameLanguage == "zhCN") then
|
||||
L["STRING_EXPLOSION"] = "爆炸"
|
||||
L["STRING_MIRROR_IMAGE"] = "镜像"
|
||||
L["STRING_CRITICAL_ONLY"] = "爆击"
|
||||
|
||||
elseif (gameLanguage == "zhTW") then
|
||||
L["STRING_EXPLOSION"] = "爆炸"
|
||||
L["STRING_MIRROR_IMAGE"] = "鏡像"
|
||||
L["STRING_CRITICAL_ONLY"] = "致命"
|
||||
end
|
||||
|
||||
LIB_OPEN_RAID_MANA_POTIONS = {}
|
||||
|
||||
LIB_OPEN_RAID_FOOD_BUFF = {} --default
|
||||
LIB_OPEN_RAID_FLASK_BUFF = {} --default
|
||||
|
||||
LIB_OPEN_RAID_BLOODLUST = {
|
||||
}
|
||||
|
||||
--which gear slots can be enchanted on the latest retail version of the game
|
||||
--when the value is a number, the slot only receives enchants for a specific attribute
|
||||
LIB_OPEN_RAID_ENCHANT_SLOTS = {
|
||||
}
|
||||
|
||||
LIB_OPEN_RAID_MYTHICKEYSTONE_ITEMID = 180653
|
||||
LIB_OPEN_RAID_AUGMENTATED_RUNE = 0
|
||||
|
||||
LIB_OPEN_RAID_COVENANT_ICONS = {}
|
||||
|
||||
LIB_OPEN_RAID_ENCHANT_IDS = {}
|
||||
|
||||
LIB_OPEN_RAID_GEM_IDS = {}
|
||||
|
||||
LIB_OPEN_RAID_WEAPON_ENCHANT_IDS = {}
|
||||
|
||||
LIB_OPEN_RAID_FOOD_BUFF = {}
|
||||
|
||||
LIB_OPEN_RAID_FLASK_BUFF = {}
|
||||
|
||||
LIB_OPEN_RAID_ALL_POTIONS = {}
|
||||
|
||||
LIB_OPEN_RAID_HEALING_POTIONS = {
|
||||
}
|
||||
|
||||
LIB_OPEN_RAID_MELEE_SPECS = {
|
||||
[251] = "DEATHKNIGHT",
|
||||
[252] = "DEATHKNIGHT",
|
||||
[577] = "DEMONHUNTER",
|
||||
[103] = "DRUID",
|
||||
--[255] = "Survival", --not in the list due to the long interrupt time
|
||||
[269] = "MONK",
|
||||
[70] = "PALADIN",
|
||||
[259] = "ROGUE",
|
||||
[260] = "ROGUE",
|
||||
[261] = "ROGUE",
|
||||
[263] = "SHAMAN",
|
||||
[71] = "WARRIOR",
|
||||
[72] = "WARRIOR",
|
||||
}
|
||||
|
||||
--tells the duration, requirements and cooldown
|
||||
--information about a cooldown is mainly get from tooltips
|
||||
--if talent is required, use the command:
|
||||
--/dump GetTalentInfo (talentTier, talentColumn, 1)
|
||||
--example: to get the second talent of the last talent line, use: /dump GetTalentInfo (7, 2, 1)
|
||||
|
||||
LIB_OPEN_RAID_COOLDOWNS_INFO = {
|
||||
|
||||
}
|
||||
|
||||
LIB_OPEN_RAID_COOLDOWNS_BY_SPEC = {};
|
||||
for spellID,spellData in pairs(LIB_OPEN_RAID_COOLDOWNS_INFO) do
|
||||
for _,specID in ipairs(spellData.specs) do
|
||||
LIB_OPEN_RAID_COOLDOWNS_BY_SPEC[specID] = LIB_OPEN_RAID_COOLDOWNS_BY_SPEC[specID] or {};
|
||||
LIB_OPEN_RAID_COOLDOWNS_BY_SPEC[specID][spellID] = spellData.type;
|
||||
end
|
||||
end
|
||||
|
||||
-- DF Evoker
|
||||
LIB_OPEN_RAID_COOLDOWNS_BY_SPEC[1467] = {};
|
||||
LIB_OPEN_RAID_COOLDOWNS_BY_SPEC[1468] = {};
|
||||
|
||||
--[=[
|
||||
Spell customizations:
|
||||
Many times there's spells with the same name which does different effects
|
||||
In here you find a list of spells which has its name changed to give more information to the player
|
||||
you may add into the list any other parameter your addon uses declaring for example 'icon = ' or 'texcoord = ' etc.
|
||||
|
||||
Implamentation Example:
|
||||
if (LIB_OPEN_RAID_SPELL_CUSTOM_NAMES) then
|
||||
for spellId, customTable in pairs(LIB_OPEN_RAID_SPELL_CUSTOM_NAMES) do
|
||||
local name = customTable.name
|
||||
if (name) then
|
||||
MyCustomSpellTable[spellId] = name
|
||||
end
|
||||
end
|
||||
end
|
||||
--]=]
|
||||
|
||||
LIB_OPEN_RAID_SPELL_CUSTOM_NAMES = {} --default fallback
|
||||
|
||||
if (GetBuildInfo():match ("%d") == "1") then
|
||||
LIB_OPEN_RAID_SPELL_CUSTOM_NAMES = {}
|
||||
|
||||
elseif (GetBuildInfo():match ("%d") == "2") then
|
||||
LIB_OPEN_RAID_SPELL_CUSTOM_NAMES = {}
|
||||
|
||||
elseif (GetBuildInfo():match ("%d") == "3") then
|
||||
LIB_OPEN_RAID_SPELL_CUSTOM_NAMES = {}
|
||||
|
||||
else
|
||||
LIB_OPEN_RAID_SPELL_CUSTOM_NAMES = {
|
||||
|
||||
}
|
||||
end
|
||||
|
||||
--interrupt list using proxy from cooldown list
|
||||
--this list should be expansion and combatlog safe
|
||||
LIB_OPEN_RAID_SPELL_INTERRUPT = {
|
||||
}
|
||||
|
||||
--override list of spells with more than one effect, example: multiple types of polymorph
|
||||
LIB_OPEN_RAID_SPELL_DEFAULT_IDS = {
|
||||
|
||||
}
|
||||
|
||||
LIB_OPEN_RAID_DATABASE_LOADED = true
|
||||
@@ -6,4 +6,5 @@
|
||||
<Script file="ThingsToMantain_Dragonflight.lua" />
|
||||
<Script file="ThingsToMantain_Shadowlands.lua" />
|
||||
<Script file="ThingsToMantain_Wrath.lua" />
|
||||
<Script file="ThingsToMantain_Era.lua" />
|
||||
</Ui>
|
||||
|
||||
+54
-1
@@ -1867,6 +1867,7 @@
|
||||
sourceName = "[*] " .. spellName
|
||||
end
|
||||
|
||||
|
||||
local npcId = tonumber(select(6, strsplit("-", petSerial)) or 0)
|
||||
|
||||
--differenciate army and apoc pets for DK
|
||||
@@ -5914,6 +5915,10 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
xpcall(saveNicktabCache, saver_error)
|
||||
end)
|
||||
|
||||
local eraNamedSpellsToID = {}
|
||||
|
||||
|
||||
|
||||
-- ~parserstart ~startparser ~cleu ~parser
|
||||
function _detalhes.OnParserEvent()
|
||||
local time, token, hidding, who_serial, who_name, who_flags, who_flags2, target_serial, target_name, target_flags, target_flags2, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12 = CombatLogGetCurrentEventInfo()
|
||||
@@ -5923,7 +5928,55 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
return func(nil, token, time, who_serial, who_name, who_flags, target_serial, target_name, target_flags, target_flags2, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12)
|
||||
end
|
||||
end
|
||||
_detalhes.parser_frame:SetScript("OnEvent", _detalhes.OnParserEvent)
|
||||
|
||||
function _detalhes.OnParserEventClassicEra()
|
||||
local time, token, hidding, who_serial, who_name, who_flags, who_flags2, target_serial, target_name, target_flags, target_flags2, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12 = CombatLogGetCurrentEventInfo()
|
||||
|
||||
local func = token_list[token]
|
||||
if (func) then
|
||||
if(eraNamedSpellsToID[token]) then
|
||||
A1 = A2
|
||||
end
|
||||
return func(nil, token, time, who_serial, who_name, who_flags, target_serial, target_name, target_flags, target_flags2, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12)
|
||||
end
|
||||
end
|
||||
|
||||
if(DetailsFramework.IsClassicWow()) then
|
||||
eraNamedSpellsToID = {
|
||||
["SPELL_PERIODIC_DAMAGE"] = true,
|
||||
["SPELL_DAMAGE"] = true,
|
||||
["SPELL_BUILDING_DAMAGE"] = true,
|
||||
["DAMAGE_SHIELD"] = true,
|
||||
["DAMAGE_SPLIT"] = true,
|
||||
["SPELL_MISSED"] = true,
|
||||
["SPELL_PERIODIC_MISSED"] = true,
|
||||
["SPELL_BUILDING_MISSED"] = true,
|
||||
["DAMAGE_SHIELD_MISSED"] = true,
|
||||
|
||||
["SPELL_HEAL"] = true,
|
||||
["SPELL_PERIODIC_HEAL"] = true,
|
||||
["SPELL_HEAL_ABSORBED"] = true,
|
||||
["SPELL_ABSORBED"] = true,
|
||||
|
||||
["SPELL_AURA_APPLIED"] = true,
|
||||
["SPELL_AURA_REMOVED"] = true,
|
||||
["SPELL_AURA_REFRESH"] = true,
|
||||
["SPELL_AURA_APPLIED_DOSE"] = true,
|
||||
["SPELL_ENERGIZE"] = true,
|
||||
["SPELL_PERIODIC_ENERGIZE"] = true,
|
||||
|
||||
["SPELL_CAST_SUCCESS"] = true,
|
||||
["SPELL_DISPEL"] = true,
|
||||
["SPELL_STOLEN"] = true,
|
||||
["SPELL_AURA_BROKEN"] = true,
|
||||
["SPELL_AURA_BROKEN_SPELL"] = true,
|
||||
["SPELL_RESURRECT"] = true,
|
||||
["SPELL_INTERRUPT"] = true,
|
||||
}
|
||||
_detalhes.parser_frame:SetScript("OnEvent", _detalhes.OnParserEventClassicEra)
|
||||
else
|
||||
_detalhes.parser_frame:SetScript("OnEvent", _detalhes.OnParserEvent)
|
||||
end
|
||||
|
||||
function _detalhes:UpdateParser()
|
||||
_tempo = _detalhes._tempo
|
||||
|
||||
@@ -1232,12 +1232,12 @@ local window_openned_at = time()
|
||||
bookmark_frame:SetPoint("bottomright", instance1.baseframe, "bottomright")
|
||||
bookmark_frame:SetBackdrop({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 64})
|
||||
bookmark_frame:SetBackdropColor(0, 0, 0, 0.8)
|
||||
|
||||
--local desc_anchor_topleft = _detalhes.gump:NewImage(bookmark_frame, [[Interface\AddOns\Details\images\options_window]], 75, 106, "artwork", {0.19921875, 0.2724609375, 0.6796875, 0.783203125}, "descAnchorBottomLeftImage", "$parentDescAnchorBottomLeftImage") --204 696 279 802
|
||||
--desc_anchor_topleft:SetPoint("topleft", bookmark_frame, "topleft", -5, 5)
|
||||
|
||||
local desc_anchor_topleft = _detalhes.gump:NewImage(bookmark_frame, [[Interface\AddOns\Details\images\options_window]], 75, 106, "artwork", {0.19921875, 0.2724609375, 0.6796875, 0.783203125}, "descAnchorBottomLeftImage", "$parentDescAnchorBottomLeftImage") --204 696 279 802
|
||||
desc_anchor_topleft:SetPoint("topleft", bookmark_frame, "topleft", -5, 5)
|
||||
|
||||
local desc_anchor_bottomleft = _detalhes.gump:NewImage(bookmark_frame, [[Interface\AddOns\Details\images\options_window]], 75, 106, "artwork", {0.2724609375, 0.19921875, 0.783203125, 0.6796875}, "descAnchorTopLeftImage", "$parentDescAnchorTopLeftImage") --204 696 279 802
|
||||
desc_anchor_bottomleft:SetPoint("bottomright", bookmark_frame, "bottomright", 5, -5)
|
||||
--local desc_anchor_bottomleft = _detalhes.gump:NewImage(bookmark_frame, [[Interface\AddOns\Details\images\options_window]], 75, 106, "artwork", {0.2724609375, 0.19921875, 0.783203125, 0.6796875}, "descAnchorTopLeftImage", "$parentDescAnchorTopLeftImage") --204 696 279 802
|
||||
--desc_anchor_bottomleft:SetPoint("bottomright", bookmark_frame, "bottomright", 5, -5)
|
||||
|
||||
local bmf_string = bookmark_frame:CreateFontString("overlay", nil, "GameFontNormal")
|
||||
bmf_string:SetPoint("center", bookmark_frame, "center")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
--do not load if this is a classic version of the game
|
||||
if (DetailsFramework.IsTBCWow() or DetailsFramework.IsWotLKWow()) then
|
||||
if (DetailsFramework.IsTBCWow() or DetailsFramework.IsWotLKWow() or DetailsFramework.IsClassicWow()) then
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
@@ -2354,7 +2354,9 @@ end
|
||||
|
||||
|
||||
function StreamOverlay:OnEvent (_, event, ...)
|
||||
|
||||
if (DetailsFramework and DetailsFramework.IsClassicWow()) then
|
||||
return
|
||||
end
|
||||
if (event == "ADDON_LOADED") then
|
||||
local AddonName = select (1, ...)
|
||||
if (AddonName == "Details_Streamer") then
|
||||
@@ -2363,9 +2365,7 @@ function StreamOverlay:OnEvent (_, event, ...)
|
||||
|
||||
if (_G.Details) then
|
||||
|
||||
if (DetailsFramework.IsClassicWow()) then
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
--> create widgets
|
||||
CreatePluginFrames()
|
||||
|
||||
Reference in New Issue
Block a user