- Encounter Details plugin updates.
This commit is contained in:
+1
-1
@@ -331,7 +331,7 @@
|
||||
|
||||
_detalhes:InstanceCall (_detalhes.CheckPsUpdate)
|
||||
|
||||
_detalhes:SendEvent ("COMBAT_PLAYER_ENTER", nil, _detalhes.tabela_vigente)
|
||||
_detalhes:SendEvent ("COMBAT_PLAYER_ENTER", nil, _detalhes.tabela_vigente, _detalhes.encounter_table and _detalhes.encounter_table.id)
|
||||
_detalhes:CheckSwitchToCurrent()
|
||||
|
||||
end
|
||||
|
||||
@@ -99,7 +99,10 @@ do
|
||||
CONTAINER_MISCTARGET_CLASS = 10,
|
||||
CONTAINER_ENEMYDEBUFFTARGET_CLASS = 11
|
||||
}
|
||||
|
||||
|
||||
function _detalhes:name (actor)
|
||||
return self.nome or actor.nome
|
||||
end
|
||||
function _detalhes:Name (actor)
|
||||
return self.nome or actor.nome
|
||||
end
|
||||
|
||||
@@ -220,15 +220,15 @@ local common_events = {
|
||||
|
||||
elseif (not object) then
|
||||
for _, PluginObject in ipairs (_detalhes.RegistredEvents[event]) do
|
||||
if (PluginObject.__eventtable) then
|
||||
if (PluginObject.__eventtable) then --if passed a function to callback
|
||||
if (PluginObject [1].Enabled and PluginObject [1].__enabled) then
|
||||
if (type (PluginObject [2]) == "function") then
|
||||
PluginObject [2] (event, ...)
|
||||
else
|
||||
PluginObject [1] [PluginObject [2]] (event, ...)
|
||||
PluginObject [1] [PluginObject [2]] (PluginObject, event, ...)
|
||||
end
|
||||
end
|
||||
else
|
||||
else --if no function (only registred the event) sent the event to OnDetailsEvent
|
||||
if (PluginObject.Enabled and PluginObject.__enabled) then
|
||||
PluginObject:OnDetailsEvent (event, ...)
|
||||
end
|
||||
|
||||
+312
-15
@@ -188,7 +188,67 @@
|
||||
["finish"] = {},
|
||||
}
|
||||
|
||||
function _detalhes:CreateWeakAura (spellid, name, icon_texture, glow, sound)
|
||||
local debuff_prototype = {
|
||||
["cooldown"] = true,
|
||||
["trigger"] = {
|
||||
["spellId"] = "0",
|
||||
["unit"] = "",
|
||||
["spellIds"] = {},
|
||||
["debuffType"] = "HARMFUL",
|
||||
},
|
||||
}
|
||||
local buff_prototype = {
|
||||
["cooldown"] = true,
|
||||
["trigger"] = {
|
||||
["spellId"] = "0",
|
||||
["unit"] = "",
|
||||
["spellIds"] = {},
|
||||
["debuffType"] = "HELPFUL",
|
||||
},
|
||||
}
|
||||
local cast_prototype = {
|
||||
["trigger"] = {
|
||||
["type"] = "event",
|
||||
["spellId"] = "0",
|
||||
["subeventSuffix"] = "_CAST_SUCCESS",
|
||||
["unevent"] = "timed",
|
||||
["duration"] = "4",
|
||||
["event"] = "Combat Log",
|
||||
["subeventPrefix"] = "SPELL",
|
||||
["use_spellId"] = true,
|
||||
}
|
||||
}
|
||||
|
||||
local stack_prototype = {
|
||||
["trigger"] = {
|
||||
["countOperator"] = ">=",
|
||||
["count"] = "0",
|
||||
["useCount"] = true,
|
||||
},
|
||||
}
|
||||
|
||||
local sound_prototype = {
|
||||
["actions"] = {
|
||||
["start"] = {
|
||||
["do_sound"] = true,
|
||||
["sound"] = "Interface\\Quiet.ogg",
|
||||
["sound_channel"] = "Master",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
local chat_prototype = {
|
||||
["actions"] = {
|
||||
["start"] = {
|
||||
["message"] = "",
|
||||
["message_type"] = "SAY",
|
||||
["do_message"] = true,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
function _detalhes:CreateWeakAura (spellid, name, icon_texture, target, stacksize, sound, chat)
|
||||
|
||||
if (not WeakAuras or not WeakAurasSaved) then
|
||||
return
|
||||
end
|
||||
@@ -202,20 +262,105 @@
|
||||
|
||||
icon.id = name
|
||||
icon.displayIcon = icon_texture
|
||||
icon.trigger.spellId = spellid
|
||||
|
||||
if (target) then
|
||||
if (target == 1) then --Debuff on Player
|
||||
local add = _detalhes.table.copy ({}, debuff_prototype)
|
||||
add.trigger.spellId = tostring (spellid)
|
||||
add.trigger.spellIds[1] = spellid
|
||||
add.trigger.unit = "player"
|
||||
_detalhes.table.deploy (icon, add)
|
||||
|
||||
elseif (target == 2) then --Debuff on Target
|
||||
local add = _detalhes.table.copy ({}, debuff_prototype)
|
||||
add.trigger.spellId = tostring (spellid)
|
||||
add.trigger.spellIds[1] = spellid
|
||||
add.trigger.unit = "target"
|
||||
_detalhes.table.deploy (icon, add)
|
||||
|
||||
elseif (target == 3) then --Debuff on Focus
|
||||
local add = _detalhes.table.copy ({}, debuff_prototype)
|
||||
add.trigger.spellId = tostring (spellid)
|
||||
add.trigger.spellIds[1] = spellid
|
||||
add.trigger.unit = "focus"
|
||||
_detalhes.table.deploy (icon, add)
|
||||
|
||||
elseif (target == 11) then --Buff on Player
|
||||
local add = _detalhes.table.copy ({}, buff_prototype)
|
||||
add.trigger.spellId = tostring (spellid)
|
||||
add.trigger.spellIds[1] = spellid
|
||||
add.trigger.unit = "player"
|
||||
_detalhes.table.deploy (icon, add)
|
||||
|
||||
elseif (target == 12) then --Buff on Target
|
||||
local add = _detalhes.table.copy ({}, buff_prototype)
|
||||
add.trigger.spellId = tostring (spellid)
|
||||
add.trigger.spellIds[1] = spellid
|
||||
add.trigger.unit = "target"
|
||||
_detalhes.table.deploy (icon, add)
|
||||
|
||||
elseif (target == 13) then --Buff on Focus
|
||||
local add = _detalhes.table.copy ({}, buff_prototype)
|
||||
add.trigger.spellId = tostring (spellid)
|
||||
add.trigger.spellIds[1] = spellid
|
||||
add.trigger.unit = "focus"
|
||||
_detalhes.table.deploy (icon, add)
|
||||
|
||||
elseif (target == 21) then --Spell Cast Started
|
||||
local add = _detalhes.table.copy ({}, cast_prototype)
|
||||
add.trigger.spellId = tostring (spellid)
|
||||
add.trigger.subeventSuffix = "_CAST_START"
|
||||
_detalhes.table.deploy (icon, add)
|
||||
|
||||
elseif (target == 22) then --Spell Cast Successful
|
||||
local add = _detalhes.table.copy ({}, cast_prototype)
|
||||
add.trigger.spellId = tostring (spellid)
|
||||
_detalhes.table.deploy (icon, add)
|
||||
end
|
||||
else
|
||||
icon.trigger.spellId = tostring (spellid)
|
||||
tinsert (icon.trigger.spellIds, spellid)
|
||||
end
|
||||
|
||||
if (stacksize and stacksize >= 1) then
|
||||
stacksize = floor (stacksize)
|
||||
local add = _detalhes.table.copy ({}, stack_prototype)
|
||||
add.trigger.count = tostring (stacksize)
|
||||
_detalhes.table.deploy (icon, add)
|
||||
end
|
||||
|
||||
tinsert (icon.trigger.spellIds, spellid)
|
||||
if (sound and sound ~= "" and sound ~= [[Interface\Quiet.ogg]]) then
|
||||
local add = _detalhes.table.copy ({}, sound_prototype)
|
||||
add.actions.start.sound = sound
|
||||
_detalhes.table.deploy (icon, add)
|
||||
end
|
||||
|
||||
if (chat and chat ~= "") then
|
||||
local add = _detalhes.table.copy ({}, sound_prototype)
|
||||
add.actions.start.message = chat
|
||||
_detalhes.table.deploy (icon, add)
|
||||
end
|
||||
|
||||
if (WeakAurasSaved.displays [icon.id]) then
|
||||
-- already exists
|
||||
for i = 2, 100 do
|
||||
if (not WeakAurasSaved.displays [icon.id .. " (" .. i .. ")"]) then
|
||||
icon.id = icon.id .. " (" .. i .. ")"
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
tinsert (WeakAurasSaved.displays ["Details! Aura Group"].controlledChildren, icon.id)
|
||||
|
||||
WeakAuras.Add (icon)
|
||||
|
||||
tinsert (WeakAurasSaved.displays ["Details! Aura Group"].controlledChildren, name)
|
||||
|
||||
local options_frame = WeakAuras.OptionsFrame and WeakAuras.OptionsFrame()
|
||||
if (options_frame and options_frame:IsShown()) then
|
||||
WeakAuras.ToggleOptions()
|
||||
WeakAuras.ToggleOptions()
|
||||
--WeakAuras.ToggleOptions()
|
||||
--WeakAuras.ToggleOptions()
|
||||
else
|
||||
WeakAuras.OpenOptions()
|
||||
--WeakAuras.OpenOptions()
|
||||
end
|
||||
end
|
||||
|
||||
@@ -224,7 +369,7 @@
|
||||
if (not DetailsAuraPanel) then
|
||||
|
||||
local f = CreateFrame ("frame", "DetailsAuraPanel", UIParent, "ButtonFrameTemplate")
|
||||
f:SetSize (300, 250)
|
||||
f:SetSize (300, 350)
|
||||
f:SetPoint ("center", UIParent, "center")
|
||||
f:SetFrameStrata ("HIGH")
|
||||
f:SetToplevel (true)
|
||||
@@ -257,10 +402,15 @@
|
||||
|
||||
--aura name
|
||||
local name_label = fw:CreateLabel (f, "Name: ", nil, nil, "GameFontNormal")
|
||||
local name_textentry = fw:CreateTextEntry (f, _detalhes.empty_function, 150, 20)
|
||||
local name_textentry = fw:CreateTextEntry (f, _detalhes.empty_function, 150, 20, "AuraName", "$parentAuraName")
|
||||
name_textentry:SetPoint ("left", name_label, "right", 2, 0)
|
||||
f.name = name_textentry
|
||||
|
||||
--spellid
|
||||
local auraid_label = fw:CreateLabel (f, "Spell Id: ", nil, nil, "GameFontNormal")
|
||||
local auraid_textentry = fw:CreateTextEntry (f, _detalhes.empty_function, 150, 20, "AuraSpellId", "$parentAuraSpellId")
|
||||
auraid_textentry:SetPoint ("left", auraid_label, "right", 2, 0)
|
||||
|
||||
--aura icon
|
||||
local icon_label = fw:CreateLabel (f, "Icon: ", nil, nil, "GameFontNormal")
|
||||
local icon_button_func = function (texture)
|
||||
@@ -275,13 +425,86 @@
|
||||
|
||||
f.icon = icon_button_icon
|
||||
|
||||
--target
|
||||
local aura_on_icon = [[Interface\Buttons\UI-GroupLoot-DE-Down]]
|
||||
local aura_on_table = {
|
||||
{label = "Debuff on You", value = 1, icon = aura_on_icon},
|
||||
{label = "Debuff on Target", value = 2, icon = aura_on_icon},
|
||||
{label = "Debuff on Focus", value = 3, icon = aura_on_icon},
|
||||
|
||||
{label = "Buff on You", value = 11, icon = aura_on_icon},
|
||||
{label = "Buff on Target", value = 12, icon = aura_on_icon},
|
||||
{label = "Buff on Focus", value = 13, icon = aura_on_icon},
|
||||
|
||||
{label = "Spell Cast Started", value = 21, icon = aura_on_icon},
|
||||
{label = "Spell Cast successful", value = 22, icon = aura_on_icon},
|
||||
}
|
||||
local aura_on_options = function()
|
||||
return aura_on_table
|
||||
end
|
||||
local aura_on = fw:CreateDropDown (f, aura_on_options, 1, 150, 20, "AuraOnDropdown", "$parentAuraOnDropdown")
|
||||
local aura_on_label = fw:CreateLabel (f, "Target: ", nil, nil, "GameFontNormal")
|
||||
aura_on:SetPoint ("left", aura_on_label, "right", 2, 0)
|
||||
|
||||
--stack
|
||||
local stack_slider = fw:NewSlider (f, f, "$parentStackSlider", "StackSlider", 150, 20, 0, 30, 1, 0)
|
||||
local stack_label = fw:CreateLabel (f, "Stack Size: ", nil, nil, "GameFontNormal")
|
||||
stack_slider:SetPoint ("left", stack_label, "right", 2, 0)
|
||||
|
||||
--sound effect
|
||||
local play_sound = function (self, fixedParam, file)
|
||||
print (file)
|
||||
PlaySoundFile (file, "Master")
|
||||
end
|
||||
local sound_options = function()
|
||||
local t = {{label = "No Sound", value = "", icon = [[Interface\Buttons\UI-GuildButton-MOTD-Disabled]]}}
|
||||
for name, soundFile in pairs (LibStub:GetLibrary("LibSharedMedia-3.0"):HashTable ("sound")) do
|
||||
tinsert (t, {label = name, value = soundFile, icon = [[Interface\Buttons\UI-GuildButton-MOTD-Up]], onclick = play_sound})
|
||||
end
|
||||
return t
|
||||
end
|
||||
local sound_effect = fw:CreateDropDown (f, sound_options, 1, 150, 20, "SoundEffectDropdown", "$parentSoundEffectDropdown")
|
||||
local sound_effect_label = fw:CreateLabel (f, "Play Sound: ", nil, nil, "GameFontNormal")
|
||||
sound_effect:SetPoint ("left", sound_effect_label, "right", 2, 0)
|
||||
|
||||
--say something
|
||||
local say_something_label = fw:CreateLabel (f, "Chat Message: ", nil, nil, "GameFontNormal")
|
||||
local say_something = fw:CreateTextEntry (f, _detalhes.empty_function, 150, 20, "SaySomething", "$parentSaySomething")
|
||||
say_something:SetPoint ("left", say_something_label, "right", 2, 0)
|
||||
|
||||
--aura addon
|
||||
local addon_options = function()
|
||||
local t = {}
|
||||
if (WeakAuras) then
|
||||
tinsert (t, {label = "Weak Auras 2", value = "WA", icon = [[Interface\AddOns\WeakAuras\icon]]})
|
||||
end
|
||||
return t
|
||||
end
|
||||
local aura_addon = fw:CreateDropDown (f, addon_options, 1, 150, 20, "AuraAddonDropdown", "$parentAuraAddonDropdown")
|
||||
local aura_addon_label = fw:CreateLabel (f, "Addon: ", nil, nil, "GameFontNormal")
|
||||
aura_addon:SetPoint ("left", aura_addon_label, "right", 2, 0)
|
||||
|
||||
--create
|
||||
local create_func = function()
|
||||
|
||||
_detalhes:CreateWeakAura (f.spellid, f.name.text, DetailsAuraPanel.icon.texture, nil, nil)
|
||||
local name = f.AuraName.text
|
||||
local spellid = f.AuraSpellId.text
|
||||
local icon = f.IconButton.icon.texture
|
||||
local target = f.AuraOnDropdown.value
|
||||
local stacksize = f.StackSlider.value
|
||||
local sound = f.SoundEffectDropdown.value
|
||||
local chat = f.SaySomething.text
|
||||
local addon = f.AuraAddonDropdown.value
|
||||
|
||||
if (addon == "WA") then
|
||||
_detalhes:CreateWeakAura (spellid, name, icon, target, stacksize, sound, chat)
|
||||
else
|
||||
_detalhes:Msg ("No Aura Addon selected. Addons currently supported: WeakAuras 2.")
|
||||
end
|
||||
|
||||
f:Hide()
|
||||
end
|
||||
|
||||
local create_button = fw:CreateButton (f, create_func, 106, 16, "Create Aura")
|
||||
create_button:InstallCustomTexture()
|
||||
|
||||
@@ -292,19 +515,26 @@
|
||||
cancel_button:SetIcon ([[Interface\Buttons\UI-GroupLoot-Pass-Down]], nil, nil, nil, {0.125, 0.875, 0.125, 0.875}, nil, 4, 2)
|
||||
|
||||
local x_start = 20
|
||||
local y_start = 20
|
||||
local y_start = 21
|
||||
|
||||
name_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*1) + (50)) * -1)
|
||||
icon_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*2) + (50)) * -1)
|
||||
auraid_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*2) + (50)) * -1)
|
||||
icon_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*3) + (50)) * -1)
|
||||
aura_on_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*4) + (50)) * -1)
|
||||
stack_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*5) + (50)) * -1)
|
||||
sound_effect_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*6) + (50)) * -1)
|
||||
say_something_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*7) + (50)) * -1)
|
||||
aura_addon_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*10) + (50)) * -1)
|
||||
|
||||
create_button:SetPoint ("topleft", f, "topleft", x_start, ((y_start*4) + (50)) * -1)
|
||||
cancel_button:SetPoint ("left", create_button, "right", 20, 0)
|
||||
create_button:SetPoint ("topleft", f, "topleft", x_start, ((y_start*12) + (50)) * -1)
|
||||
cancel_button:SetPoint ("topright", f, "topright", x_start*-1, ((y_start*12) + (50)) * -1)
|
||||
|
||||
end
|
||||
|
||||
DetailsAuraPanel.spellid = spellid
|
||||
|
||||
DetailsAuraPanel.name.text = spellname
|
||||
DetailsAuraPanel.AuraSpellId.text = tostring (spellid)
|
||||
DetailsAuraPanel.icon.texture = spellicon
|
||||
|
||||
DetailsAuraPanel:Show()
|
||||
@@ -426,4 +656,71 @@
|
||||
BigWigs.RegisterMessage (_detalhes, "BigWigs_Message")
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> details auras
|
||||
|
||||
local aura_prototype = {
|
||||
name = "",
|
||||
type = "DEBUFF",
|
||||
target = "player",
|
||||
boss = "0",
|
||||
icon = "",
|
||||
stack = 0,
|
||||
sound = "",
|
||||
sound_channel = "",
|
||||
chat = "",
|
||||
chat_where = "SAY",
|
||||
chat_extra = "",
|
||||
}
|
||||
|
||||
function _detalhes:CreateDetailsAura (name, auratype, target, boss, icon, stack, sound, chat)
|
||||
|
||||
local aura_container = _detalhes.details_auras
|
||||
|
||||
--already exists
|
||||
if (aura_container [name]) then
|
||||
_detalhes:Msg ("Aura name already exists.")
|
||||
return
|
||||
end
|
||||
|
||||
--create the new aura
|
||||
local new_aura = _detalhes.table.copy ({}, aura_prototype)
|
||||
new_aura.type = auratype or new_aura.type
|
||||
new_aura.target = auratype or new_aura.target
|
||||
new_aura.boss = boss or new_aura.boss
|
||||
new_aura.icon = icon or new_aura.icon
|
||||
new_aura.stack = math.max (stack or 0, new_aura.stack)
|
||||
new_aura.sound = sound or new_aura.sound
|
||||
new_aura.chat = chat or new_aura.chat
|
||||
|
||||
_detalhes.details_auras [name] = new_aura
|
||||
|
||||
return new_aura
|
||||
end
|
||||
|
||||
function _detalhes:CreateAuraListener()
|
||||
|
||||
local listener = _detalhes:CreateEventListener()
|
||||
|
||||
function listener:on_enter_combat (event, combat, encounterId)
|
||||
|
||||
end
|
||||
|
||||
function listener:on_leave_combat (event, combat)
|
||||
|
||||
end
|
||||
|
||||
listener:RegisterEvent ("COMBAT_PLAYER_ENTER", "on_enter_combat")
|
||||
listener:RegisterEvent ("COMBAT_PLAYER_LEAVE", "on_leave_combat")
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1048,7 +1048,9 @@ local default_global_data = {
|
||||
["Battleground40"] = {enabled = false, update_speed = 1, use_row_animations = false, damage = true, heal = true, aura = true, energy = false, miscdata = true},
|
||||
["Arena"] = {enabled = false, update_speed = 1, use_row_animations = false, damage = true, heal = true, aura = true, energy = false, miscdata = true},
|
||||
["Dungeon"] = {enabled = false, update_speed = 1, use_row_animations = false, damage = true, heal = true, aura = true, energy = false, miscdata = true},
|
||||
}
|
||||
},
|
||||
--> auras
|
||||
details_auras = {},
|
||||
}
|
||||
|
||||
_detalhes.default_global_data = default_global_data
|
||||
|
||||
@@ -1565,7 +1565,8 @@ do
|
||||
--["DRUID"] = {},
|
||||
[740] = {480, 8, 0}, --Tranquility
|
||||
[22842] = {0, 0, 1}, --Frenzied Regeneration
|
||||
[124988] = {90, 30, 0}, --Nature's Vigil
|
||||
--[124988] = {90, 30, 0}, --Nature's Vigil
|
||||
[124974] = {90, 30, 0}, --Nature's Vigil
|
||||
|
||||
--["HUNTER"] = {},
|
||||
[172106] = {180, 6}, -- "Aspect of the Fox"
|
||||
|
||||
+16
-14
@@ -3363,7 +3363,7 @@ local row_on_leave = function (self)
|
||||
end
|
||||
end
|
||||
|
||||
local row_on_mousedown = function (self)
|
||||
local row_on_mousedown = function (self, button)
|
||||
if (self.fading_in) then
|
||||
return
|
||||
end
|
||||
@@ -3373,18 +3373,21 @@ local row_on_mousedown = function (self)
|
||||
self.x = _math_floor (x)
|
||||
self.y = _math_floor (y)
|
||||
|
||||
if ((not info.isLocked) or (info.isLocked == 0)) then
|
||||
if (button == "RightButton" and not info.isMoving) then
|
||||
_detalhes:FechaJanelaInfo()
|
||||
|
||||
elseif (not info.isMoving and button == "LeftButton" and not self.isDetalhe) then
|
||||
info:StartMoving()
|
||||
info.isMoving = true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local row_on_mouseup = function (self)
|
||||
local row_on_mouseup = function (self, button)
|
||||
if (self.fading_in) then
|
||||
return
|
||||
end
|
||||
|
||||
if (info.isMoving) then
|
||||
if (info.isMoving and button == "LeftButton" and not self.isDetalhe) then
|
||||
info:StopMovingOrSizing()
|
||||
info.isMoving = false
|
||||
end
|
||||
@@ -3403,12 +3406,12 @@ local row_on_mouseup = function (self)
|
||||
barra_antiga.textura:SetStatusBarColor (1, 1, 1, 1) --> volta a textura normal
|
||||
barra_antiga.on_focus = false --> não esta mais no foco
|
||||
|
||||
--> CLICOU NA MESMA BARRA
|
||||
--> clicou na mesma barra
|
||||
if (barra_antiga == self) then -->
|
||||
info.mostrando_mouse_over = true
|
||||
return
|
||||
|
||||
--> CLICOU EM OUTRA BARRA
|
||||
--> clicou em outra barra
|
||||
else --> clicou em outra barra e trocou o foco
|
||||
barra_antiga:SetAlpha (.9) --> volta a alfa antiga
|
||||
|
||||
@@ -3425,8 +3428,7 @@ local row_on_mouseup = function (self)
|
||||
end
|
||||
end
|
||||
|
||||
--> NÃO TINHA BARRAS PRECIONADAS
|
||||
-- info.mostrando = self
|
||||
--> nao tinha barras pressionadas
|
||||
info.mostrando_mouse_over = false
|
||||
self:SetAlpha (1)
|
||||
self.textura:SetStatusBarColor (129/255, 125/255, 69/255, 1)
|
||||
@@ -3730,11 +3732,11 @@ function gump:CriaNovaBarraInfo3 (instancia, index)
|
||||
local janela = info.container_detalhes
|
||||
|
||||
local esta_barra = CreateFrame ("Button", "Details_infobox3_bar_"..index, janela)
|
||||
esta_barra:SetWidth (220) --> tamanho da barra de acordo com o tamanho da janela
|
||||
esta_barra:SetHeight (16) --> altura determinada pela instância
|
||||
esta_barra:SetWidth (220)
|
||||
esta_barra:SetHeight (16)
|
||||
|
||||
local y = (index-1)*17 --> 17 é a altura da barra
|
||||
y = y*-1 --> baixo
|
||||
local y = (index-1) * 17
|
||||
y = y*-1
|
||||
|
||||
esta_barra:SetPoint ("LEFT", janela, "LEFT", x_start, 0)
|
||||
esta_barra:SetPoint ("RIGHT", janela, "RIGHT", 59, 0)
|
||||
@@ -3754,7 +3756,7 @@ function gump:CriaNovaBarraInfo3 (instancia, index)
|
||||
esta_barra.icone:SetAlpha (1)
|
||||
|
||||
esta_barra.isDetalhe = true
|
||||
|
||||
|
||||
SetBarraScripts (esta_barra, instancia, index)
|
||||
|
||||
info.barras3 [index] = esta_barra --> barra adicionada
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 256 KiB |
@@ -768,11 +768,9 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
local frame = EncounterDetailsFrame --alias
|
||||
|
||||
if (segment) then
|
||||
--get combat segment, 1 more recently ...25 oldest
|
||||
_combat_object = EncounterDetails:GetCombat (segment)
|
||||
EncounterDetails._segment = segment
|
||||
else
|
||||
|
||||
local historico = _detalhes.tabela_historico.tabelas
|
||||
for index, combate in ipairs (historico) do
|
||||
if (combate.is_boss and combate.is_boss.index) then
|
||||
@@ -782,7 +780,6 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
if (not _combat_object) then
|
||||
@@ -825,21 +822,19 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
boss_id = _combat_object.is_boss.index
|
||||
map_id = _combat_object.is_boss.mapid
|
||||
boss_info = _detalhes:GetBossDetails (_combat_object.is_boss.mapid, _combat_object.is_boss.index)
|
||||
|
||||
--[[
|
||||
if (not boss_info) then
|
||||
if (EncounterDetails.LastSegmentShown) then
|
||||
_combat_object = EncounterDetails.LastSegmentShown
|
||||
else
|
||||
return EncounterDetails:Msg (Loc ["STRING_BOSS_NOT_REGISTRED"])
|
||||
end
|
||||
end
|
||||
--]]
|
||||
|
||||
if (EncounterDetailsFrame.ShowType == "graph") then
|
||||
EncounterDetails:BuildDpsGraphic()
|
||||
|
||||
elseif (EncounterDetailsFrame.ShowType == "spellsauras") then
|
||||
--refresh spells and auras
|
||||
local actor = EncounterDetails.build_actor_menu() [1]
|
||||
actor = actor and actor.value
|
||||
if (actor) then
|
||||
_G [EncounterDetailsFrame:GetName() .. "EnemyActorSpellsDropdown"].MyObject:Select (actor)
|
||||
EncounterDetails.update_enemy_spells (actor)
|
||||
end
|
||||
EncounterDetails.update_enemy_spells()
|
||||
end
|
||||
|
||||
EncounterDetails.LastSegmentShown = _combat_object
|
||||
|
||||
@@ -975,9 +975,10 @@ do
|
||||
|
||||
BossFrame.bg_main = BossFrame:CreateTexture (nil, "BORDER")
|
||||
BossFrame.bg_main:SetPoint ("TOPLEFT", BossFrame, "TOPLEFT", 0, 0)
|
||||
BossFrame.bg_main:SetWidth (1024)
|
||||
BossFrame.bg_main:SetWidth (700)
|
||||
BossFrame.bg_main:SetHeight (512)
|
||||
BossFrame.bg_main:SetTexture ("Interface\\AddOns\\Details_EncounterDetails\\images\\boss_bg")
|
||||
BossFrame.bg_main:SetTexCoord (0, 700/1024, 0, 1)
|
||||
BossFrame.bg_main:SetDrawLayer ("BORDER", 3)
|
||||
BossFrame.bg_main:Show()
|
||||
|
||||
@@ -1033,7 +1034,12 @@ do
|
||||
for _, widget in pairs (BossFrame.EmoteWidgets) do
|
||||
widget:Hide()
|
||||
end
|
||||
|
||||
|
||||
--hide spells frames
|
||||
for _, widget in pairs (BossFrame.EnemySpellsWidgets) do
|
||||
widget:Hide()
|
||||
end
|
||||
|
||||
BossFrame.ShowType = "main"
|
||||
mode_label.text = "Summary"
|
||||
BossFrame.segmentosDropdown:Enable()
|
||||
@@ -1064,6 +1070,11 @@ do
|
||||
widget:Hide()
|
||||
end
|
||||
|
||||
--show spells frames
|
||||
for _, widget in pairs (BossFrame.EnemySpellsWidgets) do
|
||||
widget:Show()
|
||||
end
|
||||
|
||||
selected:SetPoint ("center", BossFrame.buttonSwitchSpellsAuras.widget, "center", 0, 1)
|
||||
u:SetAllPoints (BossFrame.buttonSwitchSpellsAuras.widget)
|
||||
|
||||
@@ -1071,9 +1082,14 @@ do
|
||||
mode_label.text = "Spells and Auras"
|
||||
|
||||
-- show spells box
|
||||
local actor = EncounterDetails.build_actor_menu() [1]
|
||||
actor = actor and actor.value
|
||||
if (actor) then
|
||||
_G [BossFrame:GetName() .. "EnemyActorSpellsDropdown"].MyObject:Select (actor)
|
||||
EncounterDetails.update_enemy_spells (actor)
|
||||
end
|
||||
|
||||
|
||||
BossFrame.segmentosDropdown:Disable()
|
||||
BossFrame.segmentosDropdown:Enable()
|
||||
|
||||
elseif (to == "emotes") then
|
||||
|
||||
@@ -1099,6 +1115,11 @@ do
|
||||
for _, widget in pairs (BossFrame.EmoteWidgets) do
|
||||
widget:Show()
|
||||
end
|
||||
|
||||
--hide spells frames
|
||||
for _, widget in pairs (BossFrame.EnemySpellsWidgets) do
|
||||
widget:Hide()
|
||||
end
|
||||
|
||||
selected:SetPoint ("center", BossFrame.buttonSwitchBossEmotes.widget, "center", 0, 1)
|
||||
u:SetAllPoints (BossFrame.buttonSwitchBossEmotes.widget)
|
||||
@@ -1145,8 +1166,12 @@ do
|
||||
widget:Hide()
|
||||
end
|
||||
|
||||
--hide spells frames
|
||||
for _, widget in pairs (BossFrame.EnemySpellsWidgets) do
|
||||
widget:Hide()
|
||||
end
|
||||
|
||||
BossFrame.segmentosDropdown:Enable()
|
||||
--BossFrame.segmentosDropdown:Disable()
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1208,8 +1233,6 @@ do
|
||||
support_frame:SetBackdropColor (1, 1, 1, 0.3)
|
||||
|
||||
mode_label = DetailsFrameWork:CreateLabel (support_frame, "Summary", 13, color, "GameFontNormal")
|
||||
--mode_label:SetPoint ("bottomright", BossFrame, "bottomright", -10, 16)
|
||||
--mode_label:SetPoint ("left", BossFrame.buttonSwitchBossEmotes.widget, "right", 20, 0)
|
||||
mode_label:SetPoint ("center", support_frame, "center")
|
||||
|
||||
local left = support_frame:CreateTexture (nil, "overlay")
|
||||
@@ -1268,7 +1291,10 @@ do
|
||||
_detalhes.popup:ShowMe (false);
|
||||
aa:SetBlendMode ("BLEND")
|
||||
end)
|
||||
--
|
||||
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> ~emotes
|
||||
|
||||
local emote_lines = {}
|
||||
local emote_search_table = {}
|
||||
|
||||
@@ -1334,14 +1360,18 @@ do
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
BossFrame.EmoteWidgets = {}
|
||||
|
||||
local bar_div_emotes = DetailsFrameWork:CreateImage (BossFrame, "Interface\\AddOns\\Details_EncounterDetails\\images\\boss_bg", 4, 240, "artwork", {724/1024, 728/1024, 0, 245/512})
|
||||
bar_div_emotes:SetPoint ("TOPLEFT", BossFrame, "TOPLEFT", 244, -74)
|
||||
bar_div_emotes:Hide()
|
||||
tinsert (BossFrame.EmoteWidgets, bar_div_emotes)
|
||||
|
||||
scrollframe = CreateFrame ("ScrollFrame", "EncounterDetails_EmoteScroll", BossFrame, "FauxScrollFrameTemplate")
|
||||
scrollframe:SetScript ("OnVerticalScroll", function (self, offset) FauxScrollFrame_OnVerticalScroll (self, offset, 14, refresh_emotes) end)
|
||||
scrollframe:SetPoint ("topleft", BossFrame, "topleft", 200, -75)
|
||||
scrollframe:SetPoint ("topleft", BossFrame, "topleft", 249, -75)
|
||||
scrollframe:SetPoint ("bottomright", BossFrame, "bottomright", -33, 42)
|
||||
--scrollframe:SetBackdrop({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 16})
|
||||
--scrollframe:SetBackdropColor (1, 0, 0, 1)
|
||||
scrollframe.Update = refresh_emotes
|
||||
scrollframe:Hide()
|
||||
--
|
||||
@@ -1382,9 +1412,7 @@ do
|
||||
end
|
||||
-- remove the left space
|
||||
text = text:gsub ("^%s$", "")
|
||||
|
||||
-- |TINTERFACE\\ICONS\\ability_socererking_arcanewrath.blp:20|t You have been branded by |cFFF00000|Hspell:156238|h[Arcane Wrath]|h|r!
|
||||
|
||||
|
||||
EncounterDetails:SendReportLines ({"Details! Encounter Emote at " .. time, "\"" .. text .. "\""})
|
||||
end
|
||||
|
||||
@@ -1507,18 +1535,214 @@ do
|
||||
BossFrame.titulo:SetPoint ("top", BossFrame, "top", 0, -18)
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
BossFrame.EnemySpellsWidgets = {}
|
||||
|
||||
--> spells and auras
|
||||
|
||||
-- actor dropdown
|
||||
|
||||
local segment = EncounterDetails._segment
|
||||
local combat = EncounterDetails:GetCombat (segment)
|
||||
local EnemyActorSpells_label = DetailsFrameWork:CreateLabel (BossFrame, "Enemy Actor:", 11, nil, "GameFontHighlightSmall")
|
||||
EnemyActorSpells_label:SetPoint ("topleft", BossFrame, "topleft", 25, -85)
|
||||
|
||||
local spell_blocks = {}
|
||||
|
||||
local on_focus_gain = function (self)
|
||||
self:HighlightText()
|
||||
end
|
||||
|
||||
local on_focus_lost = function (self)
|
||||
self:HighlightText (0, 0)
|
||||
end
|
||||
|
||||
--spell cast by enemy actor
|
||||
local on_enter_spell = function (self)
|
||||
|
||||
GameTooltip:SetOwner (self, "ANCHOR_TOPLEFT")
|
||||
GameTooltip:SetSpellByID (self.MyObject._spellid)
|
||||
GameTooltip:Show()
|
||||
|
||||
end
|
||||
|
||||
local on_leave_spell = function (self, capsule)
|
||||
GameTooltip:Hide()
|
||||
end
|
||||
|
||||
--debuff applied on players
|
||||
local create_aura_func = function (spellid, _, self)
|
||||
local name, _, icon = EncounterDetails.getspellinfo (spellid)
|
||||
EncounterDetails:OpenAuraPanel (spellid, name, self and self.MyObject._icon.texture)
|
||||
end
|
||||
|
||||
for i = 1, 10 do
|
||||
local anchor_frame = CreateFrame ("frame", "BossFrameSpellAnchor" .. i, BossFrame)
|
||||
|
||||
local icon_button_func = function (texture)
|
||||
anchor_frame.icon.texture = texture
|
||||
end
|
||||
|
||||
local spellicon_button = DetailsFrameWork:NewButton (anchor_frame, nil, "$parentIconButton", "IconButton", 20, 20, function() DetailsFrameWork:IconPick (icon_button_func, true) end)
|
||||
local spellicon = DetailsFrameWork:NewImage (spellicon_button, [[Interface\ICONS\TEMP]], 19, 19, "background", nil, "icon", "$parentIcon")
|
||||
spellicon_button:InstallCustomTexture()
|
||||
|
||||
local spellid = DetailsFrameWork:CreateTextEntry (anchor_frame, EncounterDetails.empty_function, 80, 20)
|
||||
spellid:SetHook ("OnEditFocusGained", on_focus_gain)
|
||||
spellid:SetHook ("OnEditFocusLost", on_focus_lost)
|
||||
spellid:SetHook ("OnEnter", on_enter_spell)
|
||||
spellid:SetHook ("OnLeave", on_leave_spell)
|
||||
|
||||
local spellname = DetailsFrameWork:CreateTextEntry (anchor_frame, EncounterDetails.empty_function, 160, 20)
|
||||
spellname:SetHook ("OnEditFocusGained", on_focus_gain)
|
||||
spellname:SetHook ("OnEditFocusLost", on_focus_lost)
|
||||
spellname:SetHook ("OnEnter", on_enter_spell)
|
||||
spellname:SetHook ("OnLeave", on_leave_spell)
|
||||
|
||||
spellicon_button:SetPoint ("topleft", BossFrame, "topleft", 255, -65 + (i * 21 * -1))
|
||||
spellicon:SetAllPoints()
|
||||
spellid:SetPoint ("left", spellicon_button, "right", 4, 0)
|
||||
spellname:SetPoint ("left", spellid, "right", 4, 0)
|
||||
|
||||
local create_aura = DetailsFrameWork:NewButton (anchor_frame, nil, "$parentCreateAuraButton", "AuraButton", 105, 18, create_aura_func, nil, nil, nil, "Create Aura")
|
||||
create_aura:SetPoint ("left", spellname, "right", 4, 0)
|
||||
create_aura:InstallCustomTexture()
|
||||
|
||||
anchor_frame.icon = spellicon
|
||||
anchor_frame.spellid = spellid
|
||||
anchor_frame.spellname = spellname
|
||||
anchor_frame.aurabutton = create_aura
|
||||
anchor_frame.aurabutton._icon = spellicon
|
||||
|
||||
tinsert (spell_blocks, anchor_frame)
|
||||
tinsert (BossFrame.EnemySpellsWidgets, anchor_frame)
|
||||
|
||||
anchor_frame:Hide()
|
||||
end
|
||||
|
||||
local last_npc_name
|
||||
|
||||
local update_enemy_spells = function (npc_name)
|
||||
npc_name = npc_name or last_npc_name
|
||||
last_npc_name = npc_name
|
||||
|
||||
local combat = EncounterDetails:GetCombat (EncounterDetails._segment)
|
||||
|
||||
if (combat and npc_name) then
|
||||
|
||||
local spell_list = {}
|
||||
|
||||
--damage
|
||||
local npc = combat (1, npc_name)
|
||||
if (npc) then
|
||||
for spellid, spell in pairs (npc.spells._ActorTable) do
|
||||
if (spellid > 10) then
|
||||
local name, _, icon = EncounterDetails.getspellinfo (spellid)
|
||||
tinsert (spell_list, {spellid, name, icon})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--heal
|
||||
local npc = combat (2, npc_name)
|
||||
if (npc) then
|
||||
for spellid, spell in pairs (npc.spells._ActorTable) do
|
||||
if (spellid > 10) then
|
||||
local name, _, icon = EncounterDetails.getspellinfo (spellid)
|
||||
tinsert (spell_list, {spellid, name, icon, true})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
EncounterDetails_SpellAurasScroll.spell_pool = spell_list
|
||||
EncounterDetails_SpellAurasScroll:Update()
|
||||
end
|
||||
end
|
||||
|
||||
local refresh_spellauras = function (self)
|
||||
|
||||
local pool = EncounterDetails_SpellAurasScroll.spell_pool
|
||||
local offset = FauxScrollFrame_GetOffset (self)
|
||||
|
||||
for bar_index = 1, 10 do
|
||||
local data = pool [bar_index + offset]
|
||||
local bar = spell_blocks [bar_index]
|
||||
|
||||
if (data) then
|
||||
bar:Show()
|
||||
|
||||
bar.icon.texture = data [3]
|
||||
bar.spellid.text = data [1]
|
||||
bar.spellname.text = data [2]
|
||||
|
||||
bar.spellid._spellid = data [1]
|
||||
bar.spellname._spellid = data [1]
|
||||
|
||||
local is_heal = data [4]
|
||||
if (is_heal) then
|
||||
bar.spellid:SetBackdropBorderColor (0, 1, 0)
|
||||
bar.spellname:SetBackdropBorderColor (0, 1, 0)
|
||||
else
|
||||
bar.spellid:SetBackdropBorderColor (1, 1, 1)
|
||||
bar.spellname:SetBackdropBorderColor (1, 1, 1)
|
||||
end
|
||||
|
||||
bar.aurabutton:SetClickFunction (create_aura_func, data [1])
|
||||
|
||||
else
|
||||
bar:Hide()
|
||||
end
|
||||
end
|
||||
|
||||
FauxScrollFrame_Update (self, #pool, 10, 20)
|
||||
|
||||
end
|
||||
|
||||
local spell_scrollframe = CreateFrame ("ScrollFrame", "EncounterDetails_SpellAurasScroll", BossFrame, "FauxScrollFrameTemplate")
|
||||
spell_scrollframe:SetScript ("OnVerticalScroll", function (self, offset) FauxScrollFrame_OnVerticalScroll (self, offset, 14, refresh_spellauras) end)
|
||||
spell_scrollframe:SetPoint ("topleft", BossFrame, "topleft", 200, -75)
|
||||
spell_scrollframe:SetPoint ("bottomright", BossFrame, "bottomright", -33, 42)
|
||||
spell_scrollframe.Update = refresh_spellauras
|
||||
spell_scrollframe:Hide()
|
||||
|
||||
tinsert (BossFrame.EnemySpellsWidgets, spell_scrollframe)
|
||||
|
||||
EncounterDetails.update_enemy_spells = update_enemy_spells
|
||||
|
||||
local on_select_actor_spell = function (self, fixedparam, option)
|
||||
last_npc_name = option
|
||||
update_enemy_spells (option)
|
||||
end
|
||||
|
||||
local build_actor_menu = function()
|
||||
local t = {}
|
||||
local combat = EncounterDetails:GetCombat (EncounterDetails._segment)
|
||||
|
||||
if (combat) then
|
||||
local AllDamageCharacters = combat:GetActorList (DETAILS_ATTRIBUTE_DAMAGE)
|
||||
for index, character in ipairs (AllDamageCharacters) do
|
||||
if (character:IsEnemy()) then
|
||||
tinsert (t, {label = character:name(), value = character:name(), icon = "Interface\\AddOns\\Details_EncounterDetails\\images\\icon", onclick = on_select_actor_spell, iconcolor = "silver"})
|
||||
end
|
||||
end
|
||||
return t
|
||||
else
|
||||
return t
|
||||
end
|
||||
end
|
||||
EncounterDetails.build_actor_menu = build_actor_menu
|
||||
|
||||
local EnemyActorSpells = DetailsFrameWork:NewDropDown (BossFrame, _, "$parentEnemyActorSpellsDropdown", "EnemyActorSpells", 160, 20, build_actor_menu, 1)
|
||||
EnemyActorSpells:SetPoint ("topleft", EnemyActorSpells_label, "bottomleft", -1, -2)
|
||||
|
||||
EnemyActorSpells:Hide()
|
||||
EnemyActorSpells_label:Hide()
|
||||
|
||||
local bar_div = DetailsFrameWork:CreateImage (BossFrame, "Interface\\AddOns\\Details_EncounterDetails\\images\\boss_bg", 4, 240, "artwork", {724/1024, 728/1024, 0, 245/512})
|
||||
bar_div:SetPoint ("TOPLEFT", BossFrame, "TOPLEFT", 244, -74)
|
||||
bar_div:Hide()
|
||||
|
||||
tinsert (BossFrame.EnemySpellsWidgets, EnemyActorSpells_label)
|
||||
tinsert (BossFrame.EnemySpellsWidgets, EnemyActorSpells)
|
||||
tinsert (BossFrame.EnemySpellsWidgets, bar_div)
|
||||
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
local frame = BossFrame
|
||||
|
||||
Binary file not shown.
@@ -453,6 +453,9 @@ function _G._detalhes:Start()
|
||||
--> start announcers
|
||||
_detalhes:StartAnnouncers()
|
||||
|
||||
--> start aura
|
||||
_detalhes:CreateAuraListener()
|
||||
|
||||
--> open welcome
|
||||
if (self.is_first_run) then
|
||||
_detalhes:OpenWelcomeWindow()
|
||||
|
||||
Reference in New Issue
Block a user