- added LibGroupInSpecT-1.1 to the project.

- fixed an issue with Damage Taken by Spells.
This commit is contained in:
Tercio
2016-03-30 18:04:21 -03:00
parent 1c394a261a
commit 836b4f61d1
6 changed files with 1086 additions and 33 deletions
File diff suppressed because it is too large Load Diff
+3
View File
@@ -0,0 +1,3 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\..\FrameXML\UI.xsd">
<Script file="LibGroupInSpecT-1.1.lua"/>
</Ui>
+1 -1
View File
@@ -15,6 +15,6 @@
<Script file="LibWindow-1.1\LibWindow-1.1.lua"/>
<Include file="LibCompress\lib.xml"/>
<Include file="LibItemUpgradeInfo-1.0\LibItemUpgradeInfo-1.0.xml"/>
<Include file="LibGroupInSpecT-1.1\lib.xml"/>
<Include file="DF\load.xml"/>
</Ui>
+5 -5
View File
File diff suppressed because one or more lines are too long
+27 -25
View File
@@ -1752,35 +1752,37 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
end
elseif (source:IsGroupPlayer()) then -- friendly fire
local AllSpells = source.friendlyfire [character.nome] and source.friendlyfire [character.nome].spells
for spellid, on_player in pairs (AllSpells) do
if (on_player and on_player >= 1) then
local spellname = _GetSpellInfo (spellid)
if (spellname) then
local has_index = bs_index_table [spellname]
local this_spell
if (has_index) then
this_spell = bs_table [has_index]
else
bs_index = bs_index + 1
this_spell = bs_table [bs_index]
if (this_spell) then
this_spell [1] = spellid
this_spell [2] = 0
this_spell [3] = _detalhes.spell_school_cache [select (1, GetSpellInfo (spellid))] or 1
bs_index_table [spellname] = bs_index
if (AllSpells) then -- se não existir pode ter vindo de um pet, talvez
for spellid, on_player in pairs (AllSpells) do
if (on_player and on_player >= 1) then
local spellname = _GetSpellInfo (spellid)
if (spellname) then
local has_index = bs_index_table [spellname]
local this_spell
if (has_index) then
this_spell = bs_table [has_index]
else
this_spell = {spellid, 0, _detalhes.spell_school_cache [select (1, GetSpellInfo (spellid))] or 1}
bs_table [bs_index] = this_spell
bs_index_table [spellname] = bs_index
bs_index = bs_index + 1
this_spell = bs_table [bs_index]
if (this_spell) then
this_spell [1] = spellid
this_spell [2] = 0
this_spell [3] = _detalhes.spell_school_cache [select (1, GetSpellInfo (spellid))] or 1
bs_index_table [spellname] = bs_index
else
this_spell = {spellid, 0, _detalhes.spell_school_cache [select (1, GetSpellInfo (spellid))] or 1}
bs_table [bs_index] = this_spell
bs_index_table [spellname] = bs_index
end
end
this_spell [2] = this_spell [2] + on_player
total = total + on_player
else
error ("error - no spell id for DTBS friendly fire " .. spellid)
end
this_spell [2] = this_spell [2] + on_player
total = total + on_player
else
error ("error - no spell id for DTBS friendly fire " .. spellid)
end
end
end
+29 -2
View File
@@ -9,7 +9,8 @@ local floor = floor
local GetNumGroupMembers = GetNumGroupMembers
local ItemUpgradeInfo = LibStub("LibItemUpgradeInfo-1.0")
local ItemUpgradeInfo = LibStub ("LibItemUpgradeInfo-1.0")
local LibGroupInSpecT = LibStub ("LibGroupInSpecT-1.1")
function _detalhes:UpdateGears()
@@ -1473,4 +1474,30 @@ end
function _detalhes:GetSpec (guid)
return _detalhes.cached_specs [guid]
end
end
if (LibGroupInSpecT) then
function _detalhes:LibGroupInSpecT_UpdateReceived (event, guid, unitid, info)
--> update talents
local talents = _detalhes.cached_talents [guid] or {}
local i = 1
for talentId, _ in pairs (info.talents) do
talents [i] = talentId
i = i + 1
end
_detalhes.cached_talents [guid] = talents
--> update spec
if (info.global_spec_id and info.global_spec_id ~= 0) then
if (not _detalhes.class_specs_coords [info.global_spec_id]) then
print ("Details! Spec Id Invalid:", info.global_spec_id, info.name)
else
_detalhes.cached_specs [guid] = info.global_spec_id
end
end
--print ("LibGroupInSpecT Received from", info.name, info.global_spec_id)
end
LibGroupInSpecT.RegisterCallback (_detalhes, "GroupInSpecT_Update", "LibGroupInSpecT_UpdateReceived")
end