Skip to content

Commit

Permalink
rogue secret technique fix, and small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Tercioo committed Oct 26, 2022
1 parent 50dc380 commit 6039705
Show file tree
Hide file tree
Showing 13 changed files with 174 additions and 62 deletions.
75 changes: 74 additions & 1 deletion Bindings.xml
Original file line number Diff line number Diff line change
@@ -1 +1,74 @@
<Bindings></Bindings>
<Bindings>
<Binding name="DETAILS_RESET_SEGMENTS" description="Clear all segments." header="DETAILS_KEYBIND_SEGMENTCONTROL" category="Details!">
_detalhes.tabela_historico:resetar()
</Binding>

<Binding name="DETAILS_SCROLL_DOWN" description="Scroll down the window which you have the mouse over." header="DETAILS_KEYBIND_SCROLLING" category="Details!">
DetailsKeyBindScrollDown()
</Binding>

<Binding name="DETAILS_SCROLL_UP" description="Scroll up the window which you have the mouse over." category="Details!">
DetailsKeyBindScrollUp()
</Binding>

<Binding name="DETAILS_REPORT_WINDOW1" description="Report data shown on window #1." header="DETAILS_KEYBIND_REPORT" category="Details!">
_detalhes:FastReportWindow (1)
</Binding>
<Binding name="DETAILS_REPORT_WINDOW2" description="Report data shown on window #2." category="Details!">
_detalhes:FastReportWindow (2)
</Binding>

<Binding name="DETAILS_TOGGLE_ALL" description="open or close all windows" header="DETAILS_KEYBIND_WINDOW_CONTROL" category="Details!">
_detalhes:ToggleWindows()
</Binding>

<Binding name="DETAILS_TOOGGLE_WINDOW1" description="Toggle window 1." category="Details!">
_detalhes:ToggleWindow (1)
</Binding>
<Binding name="DETAILS_TOOGGLE_WINDOW2" description="Toggle window 2." category="Details!">
_detalhes:ToggleWindow (2)
</Binding>
<Binding name="DETAILS_TOOGGLE_WINDOW3" description="Toggle window 3." category="Details!">
_detalhes:ToggleWindow (3)
</Binding>
<Binding name="DETAILS_TOOGGLE_WINDOW4" description="Toggle window 4." category="Details!">
_detalhes:ToggleWindow (4)
</Binding>
<Binding name="DETAILS_TOOGGLE_WINDOW5" description="Toggle window 5." category="Details!">
_detalhes:ToggleWindow (5)
</Binding>


<Binding name="DETAILS_BOOKMARK1" description="Change the display on the first window to bookmark #1." header="DETAILS_KEYBIND_BOOKMARK" category="Details!">
DetailsChangeDisplayFromBookmark (1);
</Binding>
<Binding name="DETAILS_BOOKMARK2" description="Change the display on the first window to bookmark #2." category="Details!">
DetailsChangeDisplayFromBookmark (2);
</Binding>
<Binding name="DETAILS_BOOKMARK3" description="Change the display on the first window to bookmark #3." category="Details!">
DetailsChangeDisplayFromBookmark (3);
</Binding>
<Binding name="DETAILS_BOOKMARK4" description="Change the display on the first window to bookmark #4." category="Details!">
DetailsChangeDisplayFromBookmark (4);
</Binding>
<Binding name="DETAILS_BOOKMARK5" description="Change the display on the first window to bookmark #5." category="Details!">
DetailsChangeDisplayFromBookmark (5);
</Binding>
<Binding name="DETAILS_BOOKMARK6" description="Change the display on the first window to bookmark #6." category="Details!">
DetailsChangeDisplayFromBookmark (6);
</Binding>
<Binding name="DETAILS_BOOKMARK7" description="Change the display on the first window to bookmark #7." category="Details!">
DetailsChangeDisplayFromBookmark (7);
</Binding>
<Binding name="DETAILS_BOOKMARK8" description="Change the display on the first window to bookmark #8." category="Details!">
DetailsChangeDisplayFromBookmark (8);
</Binding>
<Binding name="DETAILS_BOOKMARK9" description="Change the display on the first window to bookmark #9." category="Details!">
DetailsChangeDisplayFromBookmark (9);
</Binding>
<Binding name="DETAILS_BOOKMARK10" description="Change the display on the first window to bookmark #10." category="Details!">
DetailsChangeDisplayFromBookmark (10);
</Binding>


</Bindings>
2 changes: 1 addition & 1 deletion Libs/DF/fw.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@


local dversion = 383
local dversion = 384
local major, minor = "DetailsFramework-1.0", dversion
local DF, oldminor = LibStub:NewLibrary(major, minor)

Expand Down
13 changes: 12 additions & 1 deletion Libs/DF/panel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6698,8 +6698,15 @@ end
--]=]

detailsFramework.StatusBarFunctions = {
SetTexture = function(self, texture)
SetTexture = function(self, texture, isTemporary)
self.barTexture:SetTexture(texture)
if (not isTemporary) then
self.barTexture.currentTexture = texture
end
end,

ResetTexture = function(self)
self.barTexture:SetTexture(self.barTexture.currentTexture)
end,

GetTexture = function(self)
Expand Down Expand Up @@ -7285,6 +7292,7 @@ function detailsFramework:CreateHealthBar (parent, name, settingsOverride)
detailsFramework:Mixin(healthBar, detailsFramework.StatusBarFunctions)

healthBar:CreateTextureMask()
healthBar:SetTexture([[Interface\WorldStateFrame\WORLDSTATEFINALSCORE-HIGHLIGHT]])

--settings and hooks
local settings = detailsFramework.table.copy({}, healthBarMetaFunctions.Settings)
Expand Down Expand Up @@ -7549,6 +7557,7 @@ function detailsFramework:CreatePowerBar(parent, name, settingsOverride)
detailsFramework:Mixin(powerBar, detailsFramework.StatusBarFunctions)

powerBar:CreateTextureMask()
powerBar:SetTexture([[Interface\WorldStateFrame\WORLDSTATEFINALSCORE-HIGHLIGHT]])

--settings and hooks
local settings = detailsFramework.table.copy({}, detailsFramework.PowerFrameFunctions.Settings)
Expand Down Expand Up @@ -8571,6 +8580,8 @@ function detailsFramework:CreateCastBar(parent, name, settingsOverride)
castBar:AddMaskTexture(castBar.background)
castBar:AddMaskTexture(castBar.extraBackground)

castBar:SetTexture([[Interface\WorldStateFrame\WORLDSTATEFINALSCORE-HIGHLIGHT]])

--settings and hooks
local settings = detailsFramework.table.copy({}, detailsFramework.CastFrameFunctions.Settings)
if (settingsOverride) then
Expand Down
4 changes: 2 additions & 2 deletions boot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -995,7 +995,7 @@ do
end
end

function dumpt(value)
function dumpt(value) --[[GLOBAL]]
return Details:Dump(value)
end

Expand Down Expand Up @@ -1061,7 +1061,7 @@ do
Details.failed_to_load = C_Timer.NewTimer(1, function() Details.Schedules.NewTimer(20, _detalhes.WelcomeMsgLogon) end)

--key binds
--[=[
--[=
--header
_G ["BINDING_HEADER_Details"] = "Details!"
_G ["BINDING_HEADER_DETAILS_KEYBIND_SEGMENTCONTROL"] = Loc ["STRING_KEYBIND_SEGMENTCONTROL"]
Expand Down
34 changes: 32 additions & 2 deletions classes/container_actors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -539,15 +539,45 @@
end

function container_combatentes:PegarCombatente (serial, nome, flag, criar)

--[[statistics]]-- _detalhes.statistics.container_calls = _detalhes.statistics.container_calls + 1

--if (flag and nome:find("Kastfall") and bit.band(flag, 0x2000) ~= 0) then
--print("PET:", nome, _detalhes.tabela_pets.pets [serial], container_pets [serial])
--else
--print(nome, flag)
--end


local npcId = Details:GetNpcIdFromGuid(serial or "")

--fix for rogue secret technich, can also be fixed by getting the time of the rogue's hit as the other hits go right after
if (npcId == 144961) then
pet_tooltip_frame:SetOwner(WorldFrame, "ANCHOR_NONE")
pet_tooltip_frame:SetHyperlink(("unit:" .. serial) or "")

local pname = _G["DetailsPetOwnerFinderTextLeft1"]
if (pname) then
local text = pname:GetText()
if (text and type(text) == "string") then
local isInRaid = _detalhes.tabela_vigente.raid_roster[text]
if (isInRaid) then
serial = UnitGUID(text)
nome = text
flag = 0x514
else
for playerName in text:gmatch("([^%s]+)") do
local isInRaid = _detalhes.tabela_vigente.raid_roster[playerName]
if (isInRaid) then
serial = UnitGUID(playerName)
nome = text
flag = 0x514
break
end
end
end
end
end
end

--verifica se � um pet, se for confere se tem o nome do dono, se n�o tiver, precisa por
local dono_do_pet
serial = serial or "ns"
Expand Down
7 changes: 7 additions & 0 deletions core/gears.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3105,6 +3105,13 @@ function Details:HandleRogueCombatSpecIconByGameVersion()
rogueCombatCoords[2] = 64 / 512
rogueCombatCoords[3] = 384 / 512
rogueCombatCoords[4] = 448 / 512

--new versions of the game has a different icon for assassination
local rogueAssassinationCoords = Details.class_specs_coords[259]
rogueAssassinationCoords[1] = 64 / 512
rogueAssassinationCoords[2] = 128 / 512
rogueAssassinationCoords[3] = 384 / 512
rogueAssassinationCoords[4] = 448 / 512
end
end

Expand Down
72 changes: 41 additions & 31 deletions core/parser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
local isTBC = DetailsFramework.IsTBCWow()
local isWOTLK = DetailsFramework.IsWotLKWow()

Details.UnregisteredTokens = {}
Details.IgnoredDamageEvents = {}
Details.RogueRaceCache = {}

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--local pointers

Expand All @@ -26,7 +30,6 @@
local bitBand = bit.band
local floor = math.floor
local ipairs = ipairs
local pairs = pairs
local type = type
local ceil = math.ceil
local wipe = table.wipe
Expand Down Expand Up @@ -430,7 +433,6 @@
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 @@ -576,13 +578,17 @@
local hitLine = self.HitBy or "|cFFFFBB00First Hit|r: *?*"
local targetLine = ""

for i = 1, 5 do
local boss = UnitExists("boss" .. i)
if (boss) then
local target = UnitName ("boss" .. i .. "target")
if (target and type(target) == "string") then
targetLine = " |cFFFFBB00Boss First Target|r: " .. target
break
if (Details.bossTargetAtPull) then
targetLine = " |cFFFFBB00Boss First Target|r: " .. Details.bossTargetAtPull
else
for i = 1, 5 do
local boss = UnitExists("boss" .. i)
if (boss) then
local target = UnitName ("boss" .. i .. "target")
if (target and type(target) == "string") then
targetLine = " |cFFFFBB00Boss First Target|r: " .. target
break
end
end
end
end
Expand Down Expand Up @@ -655,12 +661,14 @@
if (who_serial == "") then
if (who_flags and bitBand(who_flags, OBJECT_TYPE_PETS) ~= 0) then --� um pet
--pets must have a serial
Details.IgnoredDamageEvents[#Details.IgnoredDamageEvents+1] = {"INVALID SERIAL", token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype, amount, overkill, school, resisted, blocked, absorbed, critical, glacing, crushing, isoffhand, isreflected}
return
end
end

if (not alvo_name) then
--no target name, just quit
Details.IgnoredDamageEvents[#Details.IgnoredDamageEvents+1] = {"INVALID TARGET", token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype, amount, overkill, school, resisted, blocked, absorbed, critical, glacing, crushing, isoffhand, isreflected}
return

elseif (not who_name) then
Expand All @@ -672,19 +680,15 @@

--check if the spell isn't in the backlist
if (damage_spells_to_ignore[spellid]) then
Details.IgnoredDamageEvents[#Details.IgnoredDamageEvents+1] = {"SPELL IGNORED", token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype, amount, overkill, school, resisted, blocked, absorbed, critical, glacing, crushing, isoffhand, isreflected}
return
end

if (is_classic_exp) then
spellid = spellname

else --retail
--REMOVE ON 10.0
if (spellid == SPELLID_KYRIAN_DRUID_DAMAGE) then
local ownerTable = druid_kyrian_bounds[who_name]
if (ownerTable) then
who_serial, who_name, who_flags = unpack(ownerTable)
end
--REMOVE ON 10.0
if (spellid == SPELLID_KYRIAN_DRUID_DAMAGE) then
local ownerTable = druid_kyrian_bounds[who_name]
if (ownerTable) then
who_serial, who_name, who_flags = unpack(ownerTable)
end
end

Expand Down Expand Up @@ -772,11 +776,6 @@
end
end

--Jailer
if (_current_encounter_id == 2537) then

end

--npcId check for ignored npcs
local npcId = npcid_cache[alvo_serial]

Expand Down Expand Up @@ -952,7 +951,7 @@
_detalhes.WhoAggroTimer:Cancel()
end

_detalhes.WhoAggroTimer = C_Timer.NewTimer(0.5, who_aggro)
_detalhes.WhoAggroTimer = C_Timer.NewTimer(0.1, who_aggro)
_detalhes.WhoAggroTimer.HitBy = "|cFFFFFF00First Hit|r: " .. (link or "") .. " from " .. (who_name or "Unknown")
end

Expand Down Expand Up @@ -2169,10 +2168,6 @@
return
end

if (is_classic_exp) then
spellid = spellname
end

--spirit link toten
if (spellid == SPELLID_SHAMAN_SLT) then
return parser:SLT_healing (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spelltype, amount, overhealing, absorbed, critical, is_shield)
Expand Down Expand Up @@ -5234,6 +5229,15 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
end

function _detalhes.parser_functions:PLAYER_REGEN_DISABLED(...)
C_Timer.After(0, function()
if (UnitExists("boss1")) then
local bossTarget = UnitName("boss1target")
Details.bossTargetAtPull = bossTarget
else
Details.bossTargetAtPull = nil
end
end)

if (_detalhes.zone_type == "pvp" and not _detalhes.use_battleground_server_parser) then
if (_in_combat) then
_detalhes:SairDoCombate()
Expand Down Expand Up @@ -5923,14 +5927,14 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
end)

-- ~parserstart ~startparser ~cleu

function _detalhes.OnParserEvent()
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()

local func = token_list[token]
if (func) then
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)
else
Details.UnregisteredTokens[token] = {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}
return
end
end
Expand Down Expand Up @@ -6075,6 +6079,12 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
if (auto_regen_power_specs[_detalhes.cached_specs[UnitGUID("raid" .. i)]]) then
auto_regen_cache[name] = auto_regen_power_specs[_detalhes.cached_specs[UnitGUID("raid" .. i)]]
end

local _, class = UnitClass("raid"..i)
if (class == "ROGUE") then
local _, race = UnitRace("raid"..i)
Details.RogueRaceCache[name] = race
end
end

elseif (IsInGroup()) then
Expand Down
2 changes: 1 addition & 1 deletion core/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ do

-- logic OR for number values
local function lor (x,y)
result = 0
local result = 0
for p=1,8 do result = result + (((bit(x,p) or bit(y,p)) == true) and 2^(p-1) or 0) end
return result
end
Expand Down
2 changes: 2 additions & 0 deletions frames/window_aura_tracker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ function Details.AuraTracker.CreatePanel()
DetailsFramework:ReskinSlider(debuffScroll)
debuffScroll:SetPoint("topleft", buffScroll, "bottomleft", 0, -2)
auraTrackerFrame.DebuffScroll = debuffScroll

Details.AuraTracker.framesCreated = true
end

local cachedPoints = {}
Expand Down
Loading

0 comments on commit 6039705

Please sign in to comment.