- arena support improvements.

This commit is contained in:
Tercio
2015-08-25 13:57:54 -03:00
parent 583fb84645
commit 47dda54c2e
7 changed files with 31 additions and 23 deletions
+7 -3
View File
@@ -2239,18 +2239,22 @@ local chart_panel_align_timelabels = function (self, elapsed_time)
end
local chart_panel_set_scale = function (self, amt, func, text)
if (type (amt) ~= "number") then
return
end
local piece = amt / 1000 / 8
if (not text or text == "") then
text = amt > 1000000 and "M" or amt > 1000 and "K"
end
for i = 1, 8 do
if (func) then
self ["dpsamt" .. math.abs (i-9)]:SetText ( func (piece*i) .. (text or ""))
else
if (piece*i > 1) then
self ["dpsamt" .. math.abs (i-9)]:SetText ( floor (piece*i) .. (text or ""))
self ["dpsamt" .. math.abs (i-9)]:SetText ( format ("%.1f", piece*i) .. (text or ""))
else
self ["dpsamt" .. math.abs (i-9)]:SetText ( format ("%.3f", piece*i) .. (text or ""))
end
@@ -2377,7 +2381,7 @@ local create_box = function (self, next_box)
button:SetScript ("OnClick", function()
chart_panel_enable_line (self, thisbox)
end)
button:SetPoint ("center", box, "center")
button:SetPoint ("center", box.widget or box, "center")
thisbox.button = button
@@ -2553,7 +2557,7 @@ local chart_panel_add_data = function (self, graphicData, color, name, elapsed_t
local f = self
self = self.Graphic
local _data = {}
local max_value = graphicData.max_value
local amount = #graphicData
+3 -4
View File
File diff suppressed because one or more lines are too long
+1
View File
@@ -860,6 +860,7 @@
new_actor.role = actor.role
new_actor.arena_enemy = actor.arena_enemy
new_actor.arena_ally = actor.arena_ally
new_actor.arena_team = actor.arena_team
if (actor.id) then
new_actor.id = actor.id
+8 -6
View File
@@ -301,18 +301,20 @@
elseif (actor.owner) then
return _unpack (_detalhes.class_colors [actor.owner.classe])
elseif (actor.arena_enemy) then
return _unpack (_detalhes.class_colors.ARENA_ENEMY)
elseif (actor.arena_ally) then
return _unpack (_detalhes.class_colors.ARENA_ALLY)
elseif (actor.arena_team) then
if (actor.arena_team == 0) then
return _unpack (_detalhes.class_colors.ARENA_GREEN)
else
return _unpack (_detalhes.class_colors.ARENA_YELLOW)
end
else
if (not is_player_class [actor.classe] and actor.flag_original and _bit_band (actor.flag_original, 0x00000020) ~= 0) then --> neutral
return _unpack (_detalhes.class_colors.NEUTRAL)
else
return _unpack (_detalhes.class_colors [actor.classe])
end
end
end
+4 -2
View File
@@ -192,12 +192,14 @@
if (_detalhes.is_in_arena) then
local my_team_color = GetBattlefieldArenaFaction()
if (novo_objeto.grupo) then --> is ally
novo_objeto.arena_ally = true
novo_objeto.arena_team = my_team_color
else --> is enemy
novo_objeto.arena_enemy = true
novo_objeto.arena_team = 1 - my_team_color
end
local arena_props = _detalhes.arena_table [nome]
+1 -1
View File
@@ -981,7 +981,7 @@
------------------------------------------------------------------------------------------------
--> an enemy healing enemy or an player actor healing a enemy
if (_bit_band (alvo_flags, REACTION_FRIENDLY) == 0 and not _detalhes.is_in_arena) then
if (_bit_band (alvo_flags, REACTION_FRIENDLY) == 0 and not _detalhes.is_in_arena and not _detalhes.is_in_battleground) then
if (not este_jogador.heal_enemy [spellid]) then
este_jogador.heal_enemy [spellid] = cura_efetiva
else
+7 -7
View File
@@ -845,14 +845,14 @@ local default_profile = {
0.12, -- [2]
0.23, -- [3]
},
["ARENA_ALLY"] = {
0.2, -- [1]
1, -- [2]
0.2, -- [3]
["ARENA_GREEN"] = {
0.1, -- [1]
0.85, -- [2]
0.1, -- [3]
},
["ARENA_ENEMY"] = {
1, -- [1]
1, -- [2]
["ARENA_YELLOW"] = {
0.90, -- [1]
0.90, -- [2]
0, -- [3]
},
["NEUTRAL"] = {