- Fixed custom display 'Dynamic Overall Data'.

- Fixed friendly fire for some dungeon bosses.
- New API: Details:GetSpecByGUID (unitGUID)
This commit is contained in:
Tercio
2018-08-28 13:03:08 -03:00
parent c76e830a0b
commit 4b7beb1469
5 changed files with 35 additions and 83 deletions
+3 -4
View File
File diff suppressed because one or more lines are too long
+11 -6
View File
@@ -532,6 +532,7 @@
end
if (type (value) == "number") then
row.texto_direita:SetText (SelectedToKFunction (_, value) .. bars_brackets[1] .. percent .. bars_brackets[2])
else
row.texto_direita:SetText (value .. bars_brackets[1] .. percent .. bars_brackets[2])
end
@@ -634,11 +635,11 @@
esta_barra.last_value = esta_porcentagem
end
end
end
end
function atributo_custom:RefreshBarra (esta_barra, instancia, from_resize)
local class, enemy, arena_enemy, arena_ally = self.classe, self.enemy, self.arena_enemy, self.arena_ally
@@ -2359,7 +2360,7 @@
desc = "Show overall damage done on the fly.",
source = false,
target = false,
script_version = 2,
script_version = 3,
script = [[
--init:
local combat, instance_container, instance = ...
@@ -2466,12 +2467,16 @@
--build the string
local ToK = Details:GetCurrentToKFunction()
local s = ToK (_, total / OverallCombatTime)
s = ToK (_, total) .. " (" .. s .. ", "
local s = ToK (_, value / OverallCombatTime)
if (instance.row_info.textR_show_data[3]) then
s = ToK (_, value) .. " (" .. s .. ", "
else
s = ToK (_, value) .. " (" .. s
end
return s
]],
}
local have = false
+11 -62
View File
@@ -151,10 +151,13 @@
[193315] = 197834, --rogue Saber Slash
[202822] = 202823, --rogue greed
[233496] = 233490, --Unstable Affliction
[233497] = 233490, --Unstable Affliction
[233498] = 233490, --Unstable Affliction
[233499] = 233490, --Unstable Affliction
[233496] = 233490, --warlock Unstable Affliction
[233497] = 233490, --warlock Unstable Affliction
[233498] = 233490, --warlock Unstable Affliction
[233499] = 233490, --warlock Unstable Affliction
[280720] = 282449, --rogue Secret Technique
[280719] = 282449, --rogue Secret Technique
}
_detalhes.OverridedSpellIds = override_spellId
@@ -316,63 +319,6 @@
------------------------------------------------------------------------------------------------
--> early checks and fixes
--> context: incendiary ammunition isn't telling who is the source, so if the hunter is in a raid or party group it'll assign the damage to a random hunter
--> this has been reported several times to Blizzard, we expect a fix on their side soon
--> this "fix" gives the damage of incendiary to a random hunter in the raid/party, which is better than nothing
if (spellid == 265092) then
if (not who_name) then
local zoneName, zoneType, _, _, _, _, _, zoneMapID = GetInstanceInfo()
local hunters = {}
if (zoneType == "raid" and IsInRaid()) then
for i = 1, GetNumGroupMembers() do
local _, class = UnitClass ("raid" .. i)
if (class == "HUNTER") then
local unitName = UnitName ("raid" .. i)
if (unitName) then
local guid, name = UnitGUID ("raid" .. i), _detalhes:GetCLName ("raid" .. i)
if (guid and name) then
tinsert (hunters, {guid, name})
end
end
end
end
elseif (zoneType == "party" and IsInGroup()) then
for i = 1, GetNumGroupMembers()-1 do
local _, class = UnitClass ("party" .. i)
if (class == "HUNTER") then
local unitName = UnitName ("party" .. i)
if (unitName) then
local guid, name = UnitGUID ("party" .. i), _detalhes:GetCLName ("party" .. i)
if (guid and name) then
tinsert (hunters, {guid, name})
end
end
end
end
local _, class = UnitClass ("player")
if (class == "HUNTER") then
local unitName = UnitName ("player")
if (unitName) then
local guid, name = UnitGUID ("player"), _detalhes:GetCLName ("player")
if (guid and name) then
tinsert (hunters, {guid, name})
end
end
end
end
local size = #hunters
if (size > 0) then
local randomHunter = math.random (size)
local hunterSelected = hunters [randomHunter]
who_serial, who_name, who_flags = hunterSelected [1], hunterSelected [2], 0x514
end
end
end
if (who_serial == "") then
if (who_flags and _bit_band (who_flags, OBJECT_TYPE_PETS) ~= 0) then --> � um pet
--> pets must have a serial
@@ -710,7 +656,10 @@
and
(
--> if the target isn't a pvp duel target
not jogador_alvo.enemy and not este_jogador.enemy
not jogador_alvo.enemy and not este_jogador.enemy and
--> specific rules for encounters
_current_encounter_id ~= 2113 and --Waycrest Manor HeartsbaneTriad boss (it has mind control)
_current_encounter_id ~= 2132 -- Shrine of the Storms Lord Stormsong (it has mind control)
)
) then
+10 -2
View File
@@ -93,9 +93,13 @@ do
end
end
function _detalhes:GetSpecIcon (spec)
function _detalhes:GetSpecIcon (spec, useAlpha)
if (spec) then
return [[Interface\AddOns\Details\images\spec_icons_normal]], unpack (_detalhes.class_specs_coords [spec])
if (useAlpha) then
return [[Interface\AddOns\Details\images\spec_icons_normal_alpha]], unpack (_detalhes.class_specs_coords [spec])
else
return [[Interface\AddOns\Details\images\spec_icons_normal]], unpack (_detalhes.class_specs_coords [spec])
end
end
end
@@ -212,6 +216,10 @@ do
end
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
function _detalhes:GetSpecByGUID (unitSerial)
return _detalhes.cached_specs [unitSerial]
end
-- try get the spec from actor name
function _detalhes:GetSpec (name)
-9
View File
@@ -1852,15 +1852,6 @@ function _G._detalhes:Start()
--> override the overall data flag on this release only (remove on the release)
Details.overall_flag = 0x10
local _, playerClass = UnitClass ("player")
if (playerClass == "HUNTER") then
if (time() < (1535035367 + 1296000)) then --show until setember 6th
if (math.random(1, 3) == 3) then
Details:Msg ("Hunter, Incendiary Ammunition is bugged and won't show in the damage meter outside dungeons and raids. Blizzard is aware of the issue, hold on for a fix.")
end
end
end
--[=[
--> suppress warnings for the first few seconds
CLOSE_SCRIPTERRORWINDOW = function()