- Fixed tooltip for Auras and Voidzones, now shows sorted by damage and time.

- More fixes for Korgath encounter on Highmaul.
- Added slash commands: /details reset and /details config.
- Spell bars on Player Details Window now is painted with the spell spellschool color.
- Multistrike doesn't count any more for spell's Minimal Damage.
- Resource display got an tooltip which shows what resource is and resource gained per minute.
- Clicking on report button when the report window is already open, make it close.
This commit is contained in:
tercio
2014-12-14 22:48:12 -02:00
parent 47bc71010c
commit bd7b2c3ecf
24 changed files with 830 additions and 238 deletions
+4 -1
View File
@@ -457,7 +457,10 @@
--> add to storage
if (not InCombatLockdown() and not UnitAffectingCombat ("player") and not _detalhes.logoff_saving_data) then
pcall (_detalhes.StoreEncounter)
local successful, errortext = pcall (_detalhes.StoreEncounter)
if (not successful) then
_detalhes:Msg ("error occurred on StoreEncounter():", errortext)
end
else
_detalhes.schedule_store_boss_encounter = true
end
+247 -76
View File
@@ -227,99 +227,270 @@ function _detalhes:StoreEncounter (combat)
return
end
--> check if is a mythic encounter
local diff = combat:GetDifficulty()
if (difficulty ~= 16) then
--if (diff ~= 16 and false) then --> debug
return
end
local boss_info = combat:GetBossInfo()
local encounter_id = boss_info and boss_info.id
if (not encounter_id) then
return
end
--> check the guild name
local match = 0
local guildName = select (1, GetGuildInfo ("player"))
local raid_size = GetNumGroupMembers() or 0
if (guildName) then
for i = 1, raid_size do
local gName = select (1, GetGuildInfo ("raid" .. i)) or ""
if (gName == guildName) then
match = match + 1
local diff = combat:GetDifficulty()
--> check for heroic mode
if (diff == 5 or diff == 6 or diff == 15) then
local role = UnitGroupRolesAssigned ("player")
if (role ~= "DAMAGER" and role ~= "HEALER") then
return
end
--> check if the storage is already loaded
if (not IsAddOnLoaded ("Details_DataStorage")) then
local loaded, reason = LoadAddOn ("Details_DataStorage")
if (not loaded) then
return
end
end
if (match < raid_size * 0.75) then
--> get the storage table
local db = DetailsDataStorage
if (not db and _detalhes.CreateStorageDB) then
db = _detalhes:CreateStorageDB()
if (not db) then
return
end
elseif (not db) then
return
end
else
return
end
--> check if the storage is already loaded
if (not IsAddOnLoaded ("Details_DataStorage")) then
local loaded, reason = LoadAddOn ("Details_DataStorage")
if (not loaded) then
local self_database = db.SELF_STORAGE
if (not self_database) then
--> outdate database?
return
end
end
--> get the storage table
local db = DetailsDataStorage
if (not db and _detalhes.CreateStorageDB) then
db = _detalhes:CreateStorageDB()
if (not db) then
return
end
end
local raid_database = db.RAID_STORAGE
if (not raid_database) then
db.RAID_STORAGE = {}
raid_database = db.RAID_STORAGE
end
--> encounter_database: numeric table with combats
local encounter_database = raid_database [encounter_id]
if (not encounter_database) then
raid_database [encounter_id] = {}
encounter_database = raid_database [encounter_id]
end
--> get raid members data
local this_combat_data = {
damage = {},
heal = {},
date = date ("%H:%M %d/%m/%y"),
time = time(),
elapsed = combat:GetCombatTime(),
guild = guildName,
}
for i = 1, raid_size do
local player_name, player_realm = UnitName ("raid" .. i)
if (player_realm and player_realm ~= "") then
player_name = player_name .. "-" .. player_realm
end
local damage_actor = combat (1, player_name)
if (damage_actor) then
this_combat_data.damage [player_name] = floor (damage_actor.total)
local heroic_branch = self_database ["HEROIC"]
if (not heroic_branch) then
heroic_branch = {}
self_database ["HEROIC"] = heroic_branch
end
local heal_actor = combat (2, player_name)
if (heal_actor) then
this_combat_data.heal [player_name] = floor (heal_actor.total)
--> heroic database: numeric table with combats
local encounter_database = heroic_branch [encounter_id]
if (not encounter_database) then
heroic_branch [encounter_id] = {}
encounter_database = heroic_branch [encounter_id]
end
--> get player data
local t = {
total = 0,
spells = {},
}
if (role == "DAMAGER") then
local player = combat (1, _detalhes.player_name)
if (player) then
t.total = player.total
for spellid, spell in pairs (player.spells._ActorTable) do
t.spells [spellid] = spell.total
end
end
elseif (role == "HEALER") then
local player = combat (2, _detalhes.player_name)
if (player) then
t.total = player.total
for spellid, spell in pairs (player.spells._ActorTable) do
t.spells [spellid] = spell.total
end
end
end
end
tinsert (encounter_database, this_combat_data)
if (t.total > 0) then
local this_combat_data = {
total = t.total,
spells = t.spells,
date = date ("%H:%M %d/%m/%y"),
time = time(),
elapsed = combat:GetCombatTime(),
}
tinsert (encounter_database, this_combat_data)
end
--> check for normal mode
elseif (diff == 3 or diff == 4 or diff == 14) then
local role = UnitGroupRolesAssigned ("player")
if (role ~= "DAMAGER" and role ~= "HEALER") then
return
end
--> check if the storage is already loaded
if (not IsAddOnLoaded ("Details_DataStorage")) then
local loaded, reason = LoadAddOn ("Details_DataStorage")
if (not loaded) then
return
end
end
--> get the storage table
local db = DetailsDataStorage
if (not db and _detalhes.CreateStorageDB) then
db = _detalhes:CreateStorageDB()
if (not db) then
return
end
elseif (not db) then
return
end
local self_database = db.SELF_STORAGE
if (not self_database) then
--> outdate database?
return
end
local normal_branch = self_database ["NORMAL"]
if (not normal_branch) then
normal_branch = {}
self_database ["NORMAL"] = normal_branch
end
--> heroic database: numeric table with combats
local encounter_database = normal_branch [encounter_id]
if (not encounter_database) then
normal_branch [encounter_id] = {}
encounter_database = normal_branch [encounter_id]
end
--> get player data
local t = {
total = 0,
spells = {},
role = role,
}
if (role == "DAMAGER") then
local player = combat (1, _detalhes.player_name)
if (player) then
t.total = player.total
for spellid, spell in pairs (player.spells._ActorTable) do
t.spells [spellid] = spell.total
end
end
elseif (role == "HEALER") then
local player = combat (2, _detalhes.player_name)
if (player) then
t.total = player.total
for spellid, spell in pairs (player.spells._ActorTable) do
t.spells [spellid] = spell.total
end
end
end
if (t.total > 0) then
local this_combat_data = {
total = t.total,
spells = t.spells,
date = date ("%H:%M %d/%m/%y"),
time = time(),
elapsed = combat:GetCombatTime(),
}
tinsert (encounter_database, this_combat_data)
end
--> check if is a mythic encounter and store the mythic encounter
elseif (difficulty == 16) then
--> check the guild name
local match = 0
local guildName = select (1, GetGuildInfo ("player"))
local raid_size = GetNumGroupMembers() or 0
if (guildName) then
for i = 1, raid_size do
local gName = select (1, GetGuildInfo ("raid" .. i)) or ""
if (gName == guildName) then
match = match + 1
end
end
if (match < raid_size * 0.75) then
return
end
else
return
end
--> check if the storage is already loaded
if (not IsAddOnLoaded ("Details_DataStorage")) then
local loaded, reason = LoadAddOn ("Details_DataStorage")
if (not loaded) then
return
end
end
--> get the storage table
local db = DetailsDataStorage
if (not db and _detalhes.CreateStorageDB) then
db = _detalhes:CreateStorageDB()
if (not db) then
return
end
elseif (not db) then
return
end
local raid_database = db.RAID_STORAGE
if (not raid_database) then
db.RAID_STORAGE = {}
raid_database = db.RAID_STORAGE
end
--> encounter_database: numeric table with combats
local encounter_database = raid_database [encounter_id]
if (not encounter_database) then
raid_database [encounter_id] = {}
encounter_database = raid_database [encounter_id]
end
--> get raid members data
local this_combat_data = {
damage = {},
heal = {},
date = date ("%H:%M %d/%m/%y"),
time = time(),
elapsed = combat:GetCombatTime(),
guild = guildName,
}
for i = 1, raid_size do
local player_name, player_realm = UnitName ("raid" .. i)
if (player_realm and player_realm ~= "") then
player_name = player_name .. "-" .. player_realm
end
local damage_actor = combat (1, player_name)
if (damage_actor) then
this_combat_data.damage [player_name] = floor (damage_actor.total)
end
local heal_actor = combat (2, player_name)
if (heal_actor) then
this_combat_data.heal [player_name] = floor (heal_actor.total)
end
end
tinsert (encounter_database, this_combat_data)
end
end
+11
View File
@@ -321,6 +321,14 @@
end
end
function _detalhes:DoContainerIndexCleanup()
for index, combat in _ipairs (_detalhes.tabela_historico.tabelas or {}) do
for index, container in _ipairs (combat) do
_detalhes.clear:c_container_combatentes_index (container)
end
end
end
--> limpa indexes, metatables e shadows
function _detalhes:PrepareTablesForSave()
@@ -507,6 +515,9 @@
--> clear owners
_detalhes:DoOwnerCleanup()
--> cleaer container indexes
_detalhes:DoContainerIndexCleanup()
end
function _detalhes:reset_window (instancia)
+39 -15
View File
@@ -757,7 +757,8 @@
--> group checks
if (este_jogador.grupo) then
_current_combat.totals_grupo[2] = _current_combat.totals_grupo[2] + cura_efetiva
--_current_combat.totals_grupo[2] = _current_combat.totals_grupo[2] + cura_efetiva
_current_gtotal [2] = _current_gtotal [2] + cura_efetiva
end
if (jogador_alvo.grupo) then
@@ -1463,14 +1464,34 @@
}
local resource_power_type = {
[4] = 3, --cat druids and rogues uses energy
[SPELL_POWER_SOUL_SHARDS] = 0, --warlock uses mana
[SPELL_POWER_ECLIPSE] = 0, --moonkin uses mana
[SPELL_POWER_HOLY_POWER] = 0, --paladins uses mana
[SPELL_POWER_SHADOW_ORBS] = 0, --shadow preist uses mana
[SPELL_POWER_DEMONIC_FURY] = 0, --warlock uses mana
[SPELL_POWER_BURNING_EMBERS] = 0, --warlock uses mana
[4] = SPELL_POWER_ENERGY, --combo points
[SPELL_POWER_SOUL_SHARDS] = SPELL_POWER_MANA,
[SPELL_POWER_ECLIPSE] = SPELL_POWER_MANA,
[SPELL_POWER_HOLY_POWER] = SPELL_POWER_MANA,
[SPELL_POWER_SHADOW_ORBS] = SPELL_POWER_MANA,
[SPELL_POWER_DEMONIC_FURY] = SPELL_POWER_MANA,
[SPELL_POWER_BURNING_EMBERS] = SPELL_POWER_MANA,
}
_detalhes.resource_strings = {
[4] = "Combo Point",
[SPELL_POWER_SOUL_SHARDS] = "Soul Shard",
[SPELL_POWER_ECLIPSE] = "Eclipse",
[SPELL_POWER_HOLY_POWER] = "Holy Power",
[SPELL_POWER_SHADOW_ORBS] = "Shadow Orb",
[SPELL_POWER_DEMONIC_FURY] = "Demonic Fury",
[SPELL_POWER_BURNING_EMBERS] = "Burning Embers",
}
_detalhes.resource_icons = {
[4] = {file = [[Interface\CHARACTERFRAME\ComboPoint]], coords = {1/32, 18/32, 1/16, 14/16}},
[SPELL_POWER_SOUL_SHARDS] = {file = [[Interface\PLAYERFRAME\UI-WARLOCKSHARD]], coords = {2/64, 2/64, 17/128, 16/128}},
[SPELL_POWER_ECLIPSE] = {file = [[Interface\PLAYERFRAME\DruidEclipse]], coords = {117/256, 138/256, 72/128, 113/128}},
[SPELL_POWER_HOLY_POWER] = {file = [[Interface\PLAYERFRAME\PALADINPOWERTEXTURES]], coords = {75/256, 94/256, 87/128, 100/128}},
[SPELL_POWER_SHADOW_ORBS] = {file = [[Interface\PLAYERFRAME\Priest-ShadowUI]], coords = {119/256, 150/256, 61/128, 94/128}},
[SPELL_POWER_DEMONIC_FURY] = {file = [[Interface\PLAYERFRAME\Warlock-DemonologyUI]], coords = {76/256, 109/256, 90/256, 104/256}},
[SPELL_POWER_BURNING_EMBERS] = {file = [[Interface\PLAYERFRAME\Warlock-DestructionUI]], coords = {3/256, 33/256, 23/64, 52/64}}
}
function parser:energize (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spelltype, amount, powertype, p6, p7)
@@ -1487,7 +1508,7 @@
--> check if is energy or resource
--> get resource type
local is_resource, resource_amount = resource_power_type [powertype], amount
local is_resource, resource_amount, resource_id = resource_power_type [powertype], amount, powertype
--> check if is valid
if (not energy_types [powertype] and not is_resource) then
@@ -1575,6 +1596,7 @@
else
--> is a resource
este_jogador.resource = este_jogador.resource + resource_amount
este_jogador.resource_type = resource_id
end
end
@@ -2337,6 +2359,8 @@
token_list ["RANGE_MISSED"] = nil
token_list ["SWING_MISSED"] = nil
token_list ["SPELL_MISSED"] = nil
token_list ["SPELL_PERIODIC_MISSED"] = nil
token_list ["DAMAGE_SHIELD_MISSED"] = nil
token_list ["ENVIRONMENTAL_DAMAGE"] = nil
elseif (capture_type == "heal") then
@@ -2376,16 +2400,11 @@
end
end
--SPELL_PERIODIC_MISSED --> need research
--DAMAGE_SHIELD_MISSED --> need research
--SPELL_EXTRA_ATTACKS --> need research
--SPELL_DRAIN --> need research
--SPELL_LEECH --> need research
--SPELL_PERIODIC_DRAIN --> need research
--SPELL_PERIODIC_LEECH --> need research
--SPELL_DISPEL_FAILED --> need research
--SPELL_ABSORBED
function _detalhes:CaptureEnable (capture_type)
@@ -2402,6 +2421,8 @@
token_list ["RANGE_MISSED"] = parser.rangemissed
token_list ["SWING_MISSED"] = parser.swingmissed
token_list ["SPELL_MISSED"] = parser.missed
token_list ["SPELL_PERIODIC_MISSED"] = parser.missed
token_list ["DAMAGE_SHIELD_MISSED"] = parser.missed
token_list ["ENVIRONMENTAL_DAMAGE"] = parser.environment
elseif (capture_type == "heal") then
@@ -2701,7 +2722,10 @@
if (_detalhes.schedule_store_boss_encounter) then
if (not _detalhes.logoff_saving_data) then
pcall (_detalhes.StoreEncounter)
local successful, errortext = pcall (_detalhes.StoreEncounter)
if (not successful) then
_detalhes:Msg ("error occurred on StoreEncounter():", errortext)
end
end
_detalhes.schedule_store_boss_encounter = nil
end