- Fixed bugs on sending messages to chat for Raid Tools.
- Continuing the implementation of RaidCheck, plugin for check food, flasks and pre-pots.
This commit is contained in:
+9
-6
@@ -229,6 +229,7 @@ function _detalhes:StoreEncounter (combat)
|
||||
|
||||
local boss_info = combat:GetBossInfo()
|
||||
local encounter_id = boss_info and boss_info.id
|
||||
|
||||
if (not encounter_id) then
|
||||
return
|
||||
end
|
||||
@@ -236,7 +237,7 @@ function _detalhes:StoreEncounter (combat)
|
||||
local diff = combat:GetDifficulty()
|
||||
|
||||
--> check for heroic mode
|
||||
if (diff == 5 or diff == 6 or diff == 15) then
|
||||
if (diff == 5 or diff == 6 or diff == 15) then --test on raid finder or diff == 7 or diff == 17
|
||||
|
||||
local role = UnitGroupRolesAssigned ("player")
|
||||
if (role ~= "DAMAGER" and role ~= "HEALER") then
|
||||
@@ -262,7 +263,7 @@ function _detalhes:StoreEncounter (combat)
|
||||
elseif (not db) then
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
local self_database = db.SELF_STORAGE
|
||||
|
||||
if (not self_database) then
|
||||
@@ -291,7 +292,9 @@ function _detalhes:StoreEncounter (combat)
|
||||
}
|
||||
|
||||
if (role == "DAMAGER") then
|
||||
local player = combat (1, _detalhes.player_name)
|
||||
|
||||
local player = combat (1, _detalhes.playername)
|
||||
|
||||
if (player) then
|
||||
t.total = player.total
|
||||
for spellid, spell in pairs (player.spells._ActorTable) do
|
||||
@@ -300,7 +303,7 @@ function _detalhes:StoreEncounter (combat)
|
||||
end
|
||||
|
||||
elseif (role == "HEALER") then
|
||||
local player = combat (2, _detalhes.player_name)
|
||||
local player = combat (2, _detalhes.playername)
|
||||
if (player) then
|
||||
t.total = player.total
|
||||
for spellid, spell in pairs (player.spells._ActorTable) do
|
||||
@@ -377,7 +380,7 @@ function _detalhes:StoreEncounter (combat)
|
||||
}
|
||||
|
||||
if (role == "DAMAGER") then
|
||||
local player = combat (1, _detalhes.player_name)
|
||||
local player = combat (1, _detalhes.playername)
|
||||
if (player) then
|
||||
t.total = player.total
|
||||
for spellid, spell in pairs (player.spells._ActorTable) do
|
||||
@@ -386,7 +389,7 @@ function _detalhes:StoreEncounter (combat)
|
||||
end
|
||||
|
||||
elseif (role == "HEALER") then
|
||||
local player = combat (2, _detalhes.player_name)
|
||||
local player = combat (2, _detalhes.playername)
|
||||
if (player) then
|
||||
t.total = player.total
|
||||
for spellid, spell in pairs (player.spells._ActorTable) do
|
||||
|
||||
+4
-4
@@ -2207,7 +2207,7 @@
|
||||
|
||||
if (_hook_deaths) then
|
||||
--> send event to registred functions
|
||||
local death_at = _tempo - _current_combat:GetStartTime()
|
||||
local death_at = _GetTime() - _current_combat:GetStartTime()
|
||||
local max_health = _UnitHealthMax (alvo_name)
|
||||
|
||||
for _, func in _ipairs (_hook_deaths_container) do
|
||||
@@ -2242,7 +2242,7 @@
|
||||
esta_morte [#esta_morte+1] = t
|
||||
end
|
||||
|
||||
local decorrido = _tempo - _current_combat:GetStartTime()
|
||||
local decorrido = _GetTime() - _current_combat:GetStartTime()
|
||||
local minutos, segundos = _math_floor (decorrido/60), _math_floor (decorrido%60)
|
||||
|
||||
local t = {esta_morte, time, este_jogador.nome, este_jogador.classe, _UnitHealthMax (alvo_name), minutos.."m "..segundos.."s", ["dead"] = true, ["last_cooldown"] = este_jogador.last_cooldown, ["dead_at"] = decorrido}
|
||||
@@ -2627,14 +2627,14 @@
|
||||
end
|
||||
|
||||
_detalhes.latest_ENCOUNTER_END = _detalhes.latest_ENCOUNTER_END or 0
|
||||
if (_detalhes.latest_ENCOUNTER_END + 15 > _detalhes._tempo) then
|
||||
if (_detalhes.latest_ENCOUNTER_END + 15 > _GetTime()) then
|
||||
return
|
||||
end
|
||||
--_detalhes.latest_ENCOUNTER_END = _detalhes._tempo
|
||||
_detalhes.latest_ENCOUNTER_END = _GetTime()
|
||||
|
||||
--_detalhes.encounter_table ["end"] = time() - 0.4
|
||||
_detalhes.encounter_table ["end"] = _GetTime() - 0.4
|
||||
_detalhes.encounter_table ["end"] = _GetTime() -- - 0.4 --0.4 para o antigo metodo de tempo
|
||||
|
||||
local _, _, _, _, _, _, _, zoneMapID = _GetInstanceInfo()
|
||||
|
||||
|
||||
+57
-11
@@ -1,7 +1,3 @@
|
||||
--File Revision: 1
|
||||
--Last Modification: 27/07/2013
|
||||
-- Change Log:
|
||||
-- 27/07/2013: Finished alpha version.
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -271,6 +267,12 @@
|
||||
--/run local s="teste {spell}"; s=s:gsub("{spell}", "tercio");print(s)
|
||||
|
||||
function _detalhes:interrupt_announcer (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spelltype, extraSpellID, extraSpellName, extraSchool)
|
||||
|
||||
-- add novo canal Self.
|
||||
-- no canal self ele mostra todos os interrupts além do meu.
|
||||
|
||||
-- add canal self pras mortes tbm?
|
||||
|
||||
if (who_name == _detalhes.playername) then -- and _detalhes.announce_interrupts.enabled
|
||||
local channel = _detalhes.announce_interrupts.channel
|
||||
local next = _detalhes.announce_interrupts.next
|
||||
@@ -283,6 +285,23 @@
|
||||
spellname = _GetSpellInfo (extraSpellID)
|
||||
end
|
||||
|
||||
if (channel == "RAID") then
|
||||
local zone = _detalhes:GetZoneType()
|
||||
|
||||
if (zone ~= "party" and zone ~= "raid") then
|
||||
return
|
||||
end
|
||||
|
||||
if (zone == "raid") then
|
||||
channel = "RAID"
|
||||
elseif (zone == "party") then
|
||||
channel = "PARTY"
|
||||
end
|
||||
if (GetNumGroupMembers (LE_PARTY_CATEGORY_INSTANCE) > 0) then
|
||||
channel = "INSTANCE_CHAT"
|
||||
end
|
||||
end
|
||||
|
||||
if (custom ~= "") then
|
||||
custom = custom:gsub ("{spell}", spellname)
|
||||
custom = custom:gsub ("{next}", next)
|
||||
@@ -308,13 +327,27 @@
|
||||
local channel = _detalhes.announce_cooldowns.channel
|
||||
|
||||
if (channel == "WHISPER") then
|
||||
if (alvo_name == _detalhes.playername) then
|
||||
return
|
||||
end
|
||||
if (alvo_name == Loc ["STRING_RAID_WIDE"]) then
|
||||
channel = "RAID"
|
||||
end
|
||||
end
|
||||
|
||||
if (channel == "RAID") then
|
||||
local zone = _detalhes:GetZoneType()
|
||||
|
||||
if (zone ~= "party" and zone ~= "raid") then
|
||||
return
|
||||
end
|
||||
|
||||
if (zone == "raid") then
|
||||
channel = "RAID"
|
||||
elseif (zone == "party") then
|
||||
channel = "PARTY"
|
||||
end
|
||||
if (GetNumGroupMembers (LE_PARTY_CATEGORY_INSTANCE) > 0) then
|
||||
channel = "INSTANCE_CHAT"
|
||||
end
|
||||
end
|
||||
|
||||
local spellname
|
||||
if (spellid > 10) then
|
||||
@@ -322,7 +355,7 @@
|
||||
else
|
||||
spellname = _GetSpellInfo (spellid)
|
||||
end
|
||||
|
||||
|
||||
local custom = _detalhes.announce_cooldowns.custom
|
||||
|
||||
if (custom ~= "") then
|
||||
@@ -344,28 +377,42 @@
|
||||
end
|
||||
|
||||
function _detalhes:death_announcer (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, death_table, last_cooldown, death_at, max_health)
|
||||
--if (_detalhes.announce_deaths.enabled) then
|
||||
|
||||
local where = _detalhes.announce_deaths.where
|
||||
local zone = _detalhes:GetZoneType()
|
||||
local channel = ""
|
||||
|
||||
if (where == 1) then
|
||||
if (zone ~= "party" and zone ~= "raid") then
|
||||
return
|
||||
end
|
||||
|
||||
if (zone == "raid") then
|
||||
channel = "RAID"
|
||||
elseif (zone == "party") then
|
||||
channel = "PARTY"
|
||||
end
|
||||
if (GetNumGroupMembers (LE_PARTY_CATEGORY_INSTANCE) > 0) then
|
||||
channel = "INSTANCE_CHAT"
|
||||
end
|
||||
|
||||
elseif (where == 2) then
|
||||
if (zone ~= "raid") then
|
||||
return
|
||||
end
|
||||
channel = "RAID"
|
||||
if (GetNumGroupMembers (LE_PARTY_CATEGORY_INSTANCE) > 0) then
|
||||
channel = "INSTANCE_CHAT"
|
||||
end
|
||||
|
||||
elseif (where == 3) then
|
||||
if (zone ~= "party") then
|
||||
return
|
||||
end
|
||||
channel = "PARTY"
|
||||
if (GetNumGroupMembers (LE_PARTY_CATEGORY_INSTANCE) > 0) then
|
||||
channel = "INSTANCE_CHAT"
|
||||
end
|
||||
end
|
||||
|
||||
local only_first = _detalhes.announce_deaths.only_first
|
||||
@@ -402,8 +449,7 @@
|
||||
|
||||
msg = msg .. " " .. spells
|
||||
_detalhes:SendMsgToChannel (msg, channel)
|
||||
--print (msg)
|
||||
--end
|
||||
|
||||
end
|
||||
|
||||
function _detalhes:StartAnnouncers()
|
||||
|
||||
Reference in New Issue
Block a user