- Improved Crowd Control Done.

This commit is contained in:
Tercio
2015-04-03 14:01:36 -03:00
parent fd74008fac
commit 88a107df2f
8 changed files with 80 additions and 61 deletions
+5 -31
View File
File diff suppressed because one or more lines are too long
+5 -5
View File
@@ -614,19 +614,19 @@
actor_class_color_r, actor_class_color_g, actor_class_color_b = self:GetBarColor()
end
end
if (instancia.row_info.texture_class_colors) then
esta_barra.textura:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
end
if (instancia.row_info.texture_background_class_color) then
esta_barra.background:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
end
if (self.classe == "UNKNOW") then
esta_barra.icone_classe:SetTexture ("Interface\\LFGFRAME\\LFGROLE_BW")
esta_barra.icone_classe:SetTexCoord (.25, .5, 0, 1)
esta_barra.icone_classe:SetVertexColor (1, 1, 1)
elseif (self.classe == "UNGROUPPLAYER") then
if (self.enemy) then
if (_detalhes.faction_against == "Horde") then
@@ -1724,7 +1724,7 @@
desc = "Show the crowd control amount for each player.",
source = false,
target = false,
script_version = 6,
script_version = 7,
script = [[
local combat, instance_container, instance = ...
local total, top, amount = 0, 0, 0
@@ -1732,7 +1732,7 @@
local misc_actors = combat:GetActorList (DETAILS_ATTRIBUTE_MISC)
for index, character in ipairs (misc_actors) do
if (character.cc_done) then
if (character.cc_done and character:IsPlayer()) then
local cc_done = floor (character.cc_done)
instance_container:AddValue (character, cc_done)
total = total + cc_done
+8 -6
View File
@@ -2349,6 +2349,8 @@ function _detalhes:MontaSoloOption (instancia)
end
-- ~menu
local wallpaper_bg_color = {.8, .8, .8, 0.2}
function _detalhes:MontaAtributosOption (instancia, func)
func = func or instancia.TrocaTabela
@@ -2383,14 +2385,14 @@ function _detalhes:MontaAtributosOption (instancia, func)
CoolTip:AddIcon ("Interface\\AddOns\\Details\\images\\atributos_icones", 1, 1, 20, 20, p*(i-1), p*(i), 0, 1)
if (i == 1) then
CoolTip:SetWallpaper (2, [[Interface\TALENTFRAME\WarlockDestruction-TopLeft]], {1, 0.22, 0, 0.55}, {1, 1, 1, .1})
CoolTip:SetWallpaper (2, [[Interface\TALENTFRAME\WarlockDestruction-TopLeft]], {1, 0.22, 0, 0.55}, wallpaper_bg_color)
elseif (i == 2) then
--CoolTip:SetWallpaper (2, [[Interface\TALENTFRAME\PriestHoly-TopLeft]], {0, .8, 0, 1}, {1, 1, 1, .1})
CoolTip:SetWallpaper (2, [[Interface\TALENTFRAME\bg-priest-holy]], {1, .6, 0, .2}, {1, 1, 1, .2})
CoolTip:SetWallpaper (2, [[Interface\TALENTFRAME\bg-priest-holy]], {1, .6, 0, .2}, wallpaper_bg_color)
elseif (i == 3) then
CoolTip:SetWallpaper (2, [[Interface\TALENTFRAME\ShamanEnhancement-TopLeft]], {0, 1, .2, .6}, {1, 1, 1, .1})
CoolTip:SetWallpaper (2, [[Interface\TALENTFRAME\ShamanEnhancement-TopLeft]], {0, 1, .2, .6}, wallpaper_bg_color)
elseif (i == 4) then
CoolTip:SetWallpaper (2, [[Interface\TALENTFRAME\WarlockCurses-TopLeft]], {.2, 1, 0, 1}, {1, 1, 1, .1})
CoolTip:SetWallpaper (2, [[Interface\TALENTFRAME\WarlockCurses-TopLeft]], {.2, 1, 0, 1}, wallpaper_bg_color)
end
local options = sub_atributos [i].lista
@@ -2436,7 +2438,7 @@ function _detalhes:MontaAtributosOption (instancia, func)
end
--> set the wallpaper on custom
GameCooltip:SetWallpaper (2, [[Interface\TALENTFRAME\WarriorArm-TopLeft]], {1, 0, 0, 1}, {1, 1, 1, 0.1})
GameCooltip:SetWallpaper (2, [[Interface\TALENTFRAME\WarriorArm-TopLeft]], {1, 0, 0, 1}, wallpaper_bg_color)
if (#_detalhes.custom == 0) then
CoolTip:SetLastSelected (2, 6, 2)
@@ -2465,7 +2467,7 @@ function _detalhes:MontaAtributosOption (instancia, func)
end
CoolTip:SetLastSelected (1, last_selected)
CoolTip:SetWallpaper (1, [[Interface\SPELLBOOK\DeathKnightBlood-TopLeft]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true)
CoolTip:SetWallpaper (1, [[Interface\SPELLBOOK\DeathKnightBlood-TopLeft]], {.6, 0.1, 0, 0.64453125}, wallpaper_bg_color, true)
--CoolTip:SetWallpaper (1, [[Interface\ACHIEVEMENTFRAME\UI-Achievement-Parchment-Horizontal-Desaturated]], nil, {1, 1, 1, 0.3})
return menu_principal, sub_menus
+47 -4
View File
@@ -1285,6 +1285,7 @@
end
end
-- ~crowd control ~ccdone
function parser:add_cc_done (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname)
------------------------------------------------------------------------------------------------
@@ -1294,10 +1295,14 @@
------------------------------------------------------------------------------------------------
--> get actors
local este_jogador = misc_cache [who_name]
if (not este_jogador) then
este_jogador = _current_misc_container:PegarCombatente (who_serial, who_name, who_flags, true)
misc_cache [who_name] = este_jogador
--> main actor
local este_jogador, meu_dono = misc_cache [who_name]
if (not este_jogador) then --> pode ser um desconhecido ou um pet
este_jogador, meu_dono, who_name = _current_misc_container:PegarCombatente (who_serial, who_name, who_flags, true)
if (not meu_dono) then --> se não for um pet, adicionar no cache
misc_cache [who_name] = este_jogador
end
end
------------------------------------------------------------------------------------------------
@@ -1327,6 +1332,44 @@
spell.targets [alvo_name] = (spell.targets [alvo_name] or 0) + 1
spell.counter = spell.counter + 1
--> add the crowd control for the pet owner
if (meu_dono) then
if (not meu_dono.cc_done) then
meu_dono.cc_done = _detalhes:GetOrderNumber()
meu_dono.cc_done_spells = container_habilidades:NovoContainer (container_misc)
meu_dono.cc_done_targets = {}
end
--> add amount
meu_dono.cc_done = meu_dono.cc_done + 1
meu_dono.cc_done_targets [alvo_name] = (meu_dono.cc_done_targets [alvo_name] or 0) + 1
--> actor spells table
local spell = meu_dono.cc_done_spells._ActorTable [spellid]
if (not spell) then
spell = meu_dono.cc_done_spells:PegaHabilidade (spellid, true)
end
spell.targets [alvo_name] = (spell.targets [alvo_name] or 0) + 1
spell.counter = spell.counter + 1
end
--> verifica a classe
if (who_flags and _bit_band (who_flags, OBJECT_TYPE_PLAYER) ~= 0) then
if (este_jogador.classe == "UNKNOW" or este_jogador.classe == "UNGROUPPLAYER") then
local damager_object = damage_cache [who_serial]
if (damager_object and (damager_object.classe ~= "UNKNOW" and damager_object.classe ~= "UNGROUPPLAYER")) then
este_jogador.classe = damager_object.classe
else
local healing_object = healing_cache [who_name]
if (healing_object and (healing_object.classe ~= "UNKNOW" and healing_object.classe ~= "UNGROUPPLAYER")) then
este_jogador.classe = healing_object.classe
end
end
end
end
end
function parser:buff_refresh (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spellschool, tipo, amount)
+1 -1
View File
@@ -2290,7 +2290,7 @@
--
GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, backgroundColor, _detalhes.tooltip_border_color)
GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color)
GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0.64453125, 0}, {.8, .8, .8, 0.2}, true)
GameCooltip:SetOwner (self, "topright", "bottomleft")
+11 -11
View File
@@ -251,15 +251,18 @@
function _detalhes:CreateWeakAura (spellid, use_spellid, spellname, name, icon_texture, target, stacksize, sound, chat)
--> check if wa is installed
if (not WeakAuras or not WeakAurasSaved) then
return
end
--> check if there is a group for our auras
if (not WeakAurasSaved.displays ["Details! Aura Group"]) then
local group = _detalhes.table.copy ({}, group_prototype)
WeakAuras.Add (group)
end
--> create the icon table
local icon = _detalhes.table.copy ({}, icon_prototype)
icon.id = name
@@ -342,6 +345,7 @@
tinsert (icon.trigger.spellIds, spellid)
end
--> if is a regular auras withour using spells ids
if (not use_spellid) then
icon.trigger.use_spellId = false
icon.trigger.fullscan = false
@@ -349,8 +353,7 @@
icon.trigger.spellIds = {}
end
--print (use_spellid, icon.trigger.use_spellId, icon.trigger.fullscan)
--> check stack size
if (stacksize and stacksize >= 1) then
stacksize = floor (stacksize)
local add = _detalhes.table.copy ({}, stack_prototype)
@@ -358,20 +361,22 @@
_detalhes.table.deploy (icon, add)
end
--> using sound
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
--> chat message
if (chat and chat ~= "") then
local add = _detalhes.table.copy ({}, sound_prototype)
add.actions.start.message = chat
_detalhes.table.deploy (icon, add)
end
--> check if already exists a aura with this name
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 .. ")"
@@ -380,17 +385,12 @@
end
end
--> add the aura on our group
tinsert (WeakAurasSaved.displays ["Details! Aura Group"].controlledChildren, icon.id)
--> add the aura
WeakAuras.Add (icon)
local options_frame = WeakAuras.OptionsFrame and WeakAuras.OptionsFrame()
if (options_frame and options_frame:IsShown()) then
--WeakAuras.ToggleOptions()
--WeakAuras.ToggleOptions()
else
--WeakAuras.OpenOptions()
end
end
function _detalhes:OpenAuraPanel (spellid, spellname, spellicon)
+3 -3
View File
@@ -59,7 +59,8 @@ function _detalhes:ScheduleUpdate (instancia)
end
local menu_wallpaper_tex = {.6, 0.1, 0, 0.64453125}
local menu_wallpaper_color = {1, 1, 1, 0.1}
--local menu_wallpaper_color = {1, 1, 1, 0.1}
local menu_wallpaper_color = {.8, .8, .8, 0.2}
--> skins TCoords
@@ -4852,7 +4853,6 @@ local build_mode_list = function (self, elapsed)
CoolTip:SetType ("menu")
CoolTip:SetLastSelected ("main", parameters_table [3])
CoolTip:SetFixedParameter (instancia)
CoolTip:SetColor ("main", "transparent")
CoolTip:SetOption ("TextSize", _detalhes.font_sizes.menus)
CoolTip:SetOption ("TextFont", _detalhes.font_faces.menus)
@@ -5031,9 +5031,9 @@ local build_mode_list = function (self, elapsed)
_detalhes:SetMenuOwner (self, instancia)
CoolTip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], menu_wallpaper_tex, menu_wallpaper_color, true)
CoolTip:SetBackdrop (1, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color)
CoolTip:SetBackdrop (2, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color)
CoolTip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], menu_wallpaper_tex, menu_wallpaper_color, true)
show_anti_overlap (instancia, self, "top")
Binary file not shown.