Fixes for Kel'Thuzad and Painsmith encounters
This commit is contained in:
@@ -63,4 +63,4 @@ function DFPixelUtil.SetStatusBarValue(statusBar, value)
|
||||
else
|
||||
statusBar:SetValue(value);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
+12
-10
@@ -1,7 +1,6 @@
|
||||
|
||||
|
||||
local dversion = 260
|
||||
|
||||
local dversion = 261
|
||||
local major, minor = "DetailsFramework-1.0", dversion
|
||||
local DF, oldminor = LibStub:NewLibrary (major, minor)
|
||||
|
||||
@@ -3798,15 +3797,18 @@ function DF:AddRoleIconToText(text, role, size)
|
||||
return text
|
||||
end
|
||||
|
||||
-- TODO: maybe make this auto-generaded some day?...
|
||||
DF.CLEncounterID = {
|
||||
{ID = 2144, Name = "Taloc"},
|
||||
{ID = 2141, Name = "MOTHER"},
|
||||
{ID = 2128, Name = "Fetid Devourer"},
|
||||
{ID = 2136, Name = "Zek'voz"},
|
||||
{ID = 2134, Name = "Vectis"},
|
||||
{ID = 2145, Name = "Zul"},
|
||||
{ID = 2135, Name = "Mythrax the Unraveler"},
|
||||
{ID = 2122, Name = "G'huun"},
|
||||
{ID = 2423, Name = "The Tarragrue"},
|
||||
{ID = 2433, Name = "The Eye of the Jailer"},
|
||||
{ID = 2429, Name = "The Nine"},
|
||||
{ID = 2432, Name = "Remnant of Ner'zhul"},
|
||||
{ID = 2434, Name = "Soulrender Dormazain"},
|
||||
{ID = 2430, Name = "Painsmith Raznal"},
|
||||
{ID = 2436, Name = "Guardian of the First Ones"},
|
||||
{ID = 2431, Name = "Fatescribe Roh-Kalo"},
|
||||
{ID = 2422, Name = "Kel'Thuzad"},
|
||||
{ID = 2435, Name = "Sylvanas Windrunner"},
|
||||
}
|
||||
|
||||
function DF:GetPlayerRole()
|
||||
|
||||
@@ -20,4 +20,4 @@ function DF.Language.RegisterLanguage(self, addonGlobalName, language)
|
||||
addonObject.__language = addonObject.__language or {}
|
||||
addonObject.__language[language] = {}
|
||||
return addonObject.__language[language]
|
||||
end
|
||||
end
|
||||
|
||||
+9
-7
@@ -6196,7 +6196,7 @@ function DF:PassLoadFilters (loadTable, encounterID)
|
||||
return
|
||||
end
|
||||
local hasEncounter
|
||||
for _, ID in ipairs (loadTable.encounter_ids) do
|
||||
for _, ID in pairs (loadTable.encounter_ids) do
|
||||
if (ID == encounterID) then
|
||||
hasEncounter = true
|
||||
break
|
||||
@@ -6213,7 +6213,7 @@ function DF:PassLoadFilters (loadTable, encounterID)
|
||||
local uiMapID = C_Map.GetBestMapForUnit ("player")
|
||||
|
||||
local hasMapID
|
||||
for _, ID in ipairs (loadTable.map_ids) do
|
||||
for _, ID in pairs (loadTable.map_ids) do
|
||||
if (ID == zoneMapID or ID == uiMapID) then
|
||||
hasMapID = true
|
||||
break
|
||||
@@ -6608,8 +6608,10 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions)
|
||||
local textEntryRefresh = function (self)
|
||||
local idList = f.OptionsTable [self.DBKey]
|
||||
self:SetText ("")
|
||||
for i = 1, #idList do
|
||||
self:SetText (self:GetText() .. " " .. idList [i])
|
||||
for _, id in pairs(idList) do
|
||||
if tonumber(id) then
|
||||
self:SetText (self:GetText() .. " " .. id)
|
||||
end
|
||||
end
|
||||
self:SetText (self:GetText():gsub ("^ ", ""))
|
||||
end
|
||||
@@ -6618,7 +6620,7 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions)
|
||||
wipe (f.OptionsTable [self.DBKey])
|
||||
local text = self:GetText()
|
||||
|
||||
for _, ID in ipairs ({strsplit ("", text)}) do
|
||||
for _, ID in ipairs ({strsplit (" ", text)}) do
|
||||
ID = DF:trim (ID)
|
||||
ID = tonumber (ID)
|
||||
if (ID) then
|
||||
@@ -6635,7 +6637,7 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions)
|
||||
encounterIDEditbox:SetPoint ("topleft", encounterIDLabel, "bottomleft", 0, -2)
|
||||
encounterIDEditbox.DBKey = "encounter_ids"
|
||||
encounterIDEditbox.Refresh = textEntryRefresh
|
||||
encounterIDEditbox.tooltip = "Enter multiple IDs separating with a semicolon ()\nExample: 35 45 95\n\nUldir:\n"
|
||||
encounterIDEditbox.tooltip = "Enter multiple IDs separating with a whitespace.\nExample: 35 45 95\n\nSanctum of Domination:\n"
|
||||
for _, encounterTable in ipairs (DF:GetCLEncounterIDs()) do
|
||||
encounterIDEditbox.tooltip = encounterIDEditbox.tooltip .. encounterTable.ID .. " - " .. encounterTable.Name .. "\n"
|
||||
end
|
||||
@@ -6649,7 +6651,7 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions)
|
||||
mapIDEditbox:SetPoint ("topleft", mapIDLabel, "bottomleft", 0, -2)
|
||||
mapIDEditbox.DBKey = "map_ids"
|
||||
mapIDEditbox.Refresh = textEntryRefresh
|
||||
mapIDEditbox.tooltip = "Enter multiple IDs separating with a semicolon ()\nExample: 35 45 95"
|
||||
mapIDEditbox.tooltip = "Enter multiple IDs separating with a whitespace\nExample: 35 45 95"
|
||||
mapIDEditbox:SetHook ("OnEnterPressed", textEntryOnEnterPressed)
|
||||
tinsert (f.AllTextEntries, mapIDEditbox)
|
||||
|
||||
|
||||
@@ -64,4 +64,4 @@ end
|
||||
|
||||
function DF.Schedules.SetName(object, name)
|
||||
object.name = name
|
||||
end
|
||||
end
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
|
||||
local version, build, date, tocversion = GetBuildInfo()
|
||||
|
||||
_detalhes.build_counter = 8700
|
||||
_detalhes.alpha_build_counter = 8700 --if this is higher than the regular counter, use it instead
|
||||
_detalhes.build_counter = 8710
|
||||
_detalhes.alpha_build_counter = 8710 --if this is higher than the regular counter, use it instead
|
||||
_detalhes.bcc_counter = 25
|
||||
_detalhes.dont_open_news = true
|
||||
_detalhes.game_version = version
|
||||
|
||||
@@ -337,7 +337,7 @@
|
||||
local tremove = _G.tremove
|
||||
|
||||
--delete an actor from the combat ~delete ~erase ~remove
|
||||
function combate:DeleteActor(attribute, actorName, removeDamageTaken)
|
||||
function combate:DeleteActor(attribute, actorName, removeDamageTaken, cannotRemap)
|
||||
local container = self[attribute]
|
||||
if (container) then
|
||||
|
||||
@@ -411,7 +411,10 @@
|
||||
tremove(container._ActorTable, index)
|
||||
|
||||
--remap
|
||||
container:Remap()
|
||||
if (not cannotRemap) then
|
||||
container:Remap()
|
||||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
+105
-7
@@ -2026,14 +2026,24 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
return Details:EndRefresh (instancia, total, tabela_do_combate, showing) --> retorna a tabela que precisa ganhar o refresh
|
||||
|
||||
else
|
||||
|
||||
if (keyName == "enemies") then
|
||||
|
||||
--/run Details:Dump(Details:GetCurrentCombat():GetActor(1, "Injured Steelspine 1"))
|
||||
if (keyName == "enemies") then
|
||||
--amount, total = Details:ContainerSortEnemies (conteudo, amount, "total")
|
||||
amount, total = Details:ContainerSortEnemies (conteudo, amount, "damage_taken")
|
||||
--keyName = "enemies"
|
||||
--> grava o total
|
||||
instancia.top = conteudo[1][keyName]
|
||||
|
||||
--remove actors with zero damage taken
|
||||
local newAmount = 0
|
||||
for i = 1, #conteudo do
|
||||
if (conteudo[i].damage_taken < 1) then
|
||||
newAmount = i-1
|
||||
break
|
||||
end
|
||||
end
|
||||
amount = newAmount
|
||||
|
||||
--keyName = "damage_taken"
|
||||
--result of the first actor
|
||||
instancia.top = conteudo[1] and conteudo[1][keyName]
|
||||
|
||||
elseif (modo == modo_ALL) then --> mostrando ALL
|
||||
|
||||
@@ -5410,6 +5420,94 @@ function atributo_damage:ColetarLixo (lastevent)
|
||||
return Details:ColetarLixo (class_type, lastevent)
|
||||
end
|
||||
|
||||
|
||||
--actor 1 is who will receive the sum from actor2
|
||||
function Details.SumDamageActors(actor1, actor2, actorContainer)
|
||||
--general
|
||||
actor1.total = actor1.total + actor2.total
|
||||
actor1.damage_taken = actor1.damage_taken + actor2.damage_taken
|
||||
actor1.totalabsorbed = actor1.totalabsorbed + actor2.totalabsorbed
|
||||
actor1.total_without_pet = actor1.total_without_pet + actor2.total_without_pet
|
||||
actor1.friendlyfire_total = actor1.friendlyfire_total + actor2.friendlyfire_total
|
||||
|
||||
--damage taken from
|
||||
for actorName in pairs(actor2.damage_from) do
|
||||
actor1.damage_from[actorName] = true
|
||||
|
||||
--add the damage done to actor2 into the damage done to target1
|
||||
if (actorContainer) then
|
||||
--get the actor that caused the damage on actor2
|
||||
local actorObject = actorContainer:GetActor(actorName)
|
||||
if (actorObject) then
|
||||
local damageToActor2 = (actorObject.targets[actor2.nome]) or 0
|
||||
actorObject.targets[actor1.nome] = (actorObject.targets[actor1.nome] or 0) + damageToActor2
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--targets
|
||||
for actorName, damageDone in pairs(actor2.targets) do
|
||||
actor1.targets[actorName] = (actor1.targets[actorName] or 0) + damageDone
|
||||
end
|
||||
|
||||
--pets
|
||||
for i = 1, #actor2.pets do
|
||||
DetailsFramework.table.addunique(actor1.pets, actor2.pets[i])
|
||||
end
|
||||
|
||||
--raid targets
|
||||
for raidTargetFlag, damageDone in pairs(actor2.raid_targets) do
|
||||
actor1.raid_targets[raidTargetFlag] = (actor1.raid_targets[raidTargetFlag] or 0) + damageDone
|
||||
end
|
||||
|
||||
--friendly fire
|
||||
for actorName, ffTable in pairs(actor2.friendlyfire) do
|
||||
actor1.friendlyfire[actorName] = actor1.friendlyfire[actorName] or actor1:CreateFFTable(actorName)
|
||||
actor1.friendlyfire[actorName].total = actor1.friendlyfire[actorName].total + ffTable.total
|
||||
|
||||
for spellId, damageDone in pairs(ffTable.spells) do
|
||||
actor1.friendlyfire[actorName].spells[spellId] = (actor1.friendlyfire[actorName].spells[spellId] or 0) + damageDone
|
||||
end
|
||||
end
|
||||
|
||||
--spells
|
||||
local ignoredKeys = {
|
||||
id = true,
|
||||
spellschool = true,
|
||||
}
|
||||
|
||||
local actor1Spells = actor1.spells
|
||||
for spellId, spellTable in pairs(actor2.spells._ActorTable) do
|
||||
|
||||
local actor1Spell = actor1Spells:GetOrCreateSpell(spellId, true, "DAMAGE_DONE")
|
||||
|
||||
--genetal spell attributes
|
||||
for key, value in pairs(spellTable) do
|
||||
if (type(value) == "number") then
|
||||
if (not ignoredKeys[key]) then
|
||||
if (key == "n_min" or key == "c_min") then
|
||||
if (actor1Spell[key] > value) then
|
||||
actor1Spell[key] = value
|
||||
end
|
||||
elseif (key == "n_max" or key == "c_max") then
|
||||
if (actor1Spell[key] < value) then
|
||||
actor1Spell[key] = value
|
||||
end
|
||||
else
|
||||
actor1Spell[key] = actor1Spell[key] + value
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--spell targets
|
||||
for targetName, damageDone in pairs(spellTable) do
|
||||
actor1Spell.targets[targetName] = (actor1Spell.targets[targetName] or 0) + damageDone
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
atributo_damage.__add = function (tabela1, tabela2)
|
||||
|
||||
--> tempo decorrido
|
||||
@@ -5463,7 +5561,7 @@ atributo_damage.__add = function (tabela1, tabela2)
|
||||
|
||||
--> soma os alvos
|
||||
for target_name, amount in _pairs (habilidade.targets) do
|
||||
habilidade_tabela1.targets = (habilidade_tabela1.targets [target_name] or 0) + amount
|
||||
habilidade_tabela1.targets[target_name] = (habilidade_tabela1.targets [target_name] or 0) + amount
|
||||
end
|
||||
|
||||
--> soma os extras
|
||||
|
||||
+220
-34
@@ -15,28 +15,21 @@
|
||||
local _UnitHealthMax = UnitHealthMax --wow api local
|
||||
local _UnitIsFeignDeath = UnitIsFeignDeath --wow api local
|
||||
local _UnitGUID = UnitGUID --wow api local
|
||||
local _GetUnitName = GetUnitName --wow api local
|
||||
local _GetInstanceInfo = GetInstanceInfo --wow api local
|
||||
local _IsInRaid = IsInRaid --wow api local
|
||||
local _IsInGroup = IsInGroup --wow api local
|
||||
local _GetNumGroupMembers = GetNumGroupMembers --wow api local
|
||||
local _UnitGroupRolesAssigned = DetailsFramework.UnitGroupRolesAssigned
|
||||
local _GetTime = GetTime
|
||||
local _select = select
|
||||
local _UnitBuff = UnitBuff
|
||||
local _tonumber = tonumber
|
||||
|
||||
local _CombatLogGetCurrentEventInfo = CombatLogGetCurrentEventInfo
|
||||
|
||||
local _cstr = string.format --lua local
|
||||
local _table_insert = table.insert --lua local
|
||||
local _select = select --lua local
|
||||
local _bit_band = bit.band --lua local
|
||||
local _math_floor = math.floor --lua local
|
||||
local _table_remove = table.remove --lua local
|
||||
local _ipairs = ipairs --lua local
|
||||
local _pairs = pairs --lua local
|
||||
local _table_sort = table.sort --lua local
|
||||
local _type = type --lua local
|
||||
local _math_ceil = math.ceil --lua local
|
||||
local _table_wipe = table.wipe --lua local
|
||||
@@ -49,8 +42,6 @@
|
||||
local arena_enemies = _detalhes.arena_enemies --details local
|
||||
|
||||
local cc_spell_list = DetailsFramework.CrowdControlSpells
|
||||
|
||||
local container_combatentes = _detalhes.container_combatentes --details local
|
||||
local container_habilidades = _detalhes.container_habilidades --details local
|
||||
|
||||
--> localize the cooldown table from the framework
|
||||
@@ -58,7 +49,6 @@
|
||||
|
||||
local spell_damage_func = _detalhes.habilidade_dano.Add --details local
|
||||
local spell_damageMiss_func = _detalhes.habilidade_dano.AddMiss --details local
|
||||
local spell_damageFF_func = _detalhes.habilidade_dano.AddFF --details local
|
||||
|
||||
local spell_heal_func = _detalhes.habilidade_cura.Add --details local
|
||||
local spell_energy_func = _detalhes.habilidade_e_energy.Add --details local
|
||||
@@ -113,7 +103,7 @@
|
||||
--> temp ignored
|
||||
local ignore_actors = {}
|
||||
--> druids kyrian bounds
|
||||
local druid_kyrian_bounds = {}
|
||||
local druid_kyrian_bounds = {} --remove on 10.0
|
||||
--> spell containers for special cases
|
||||
local monk_guard_talent = {} --guard talent for bm monks
|
||||
--> spell reflection
|
||||
@@ -308,10 +298,10 @@
|
||||
local SPELLID_SANGUINE_HEAL = 226510
|
||||
|
||||
local SPELLID_BARGAST_DEBUFF = 334695 --REMOVE ON 10.0
|
||||
local bargastBuffs = {}
|
||||
local bargastBuffs = {} --remove on 10.0
|
||||
|
||||
local SPELLID_NECROMANCER_CHEAT_DEATH = 327676 --REMOVE ON 10.0
|
||||
local necro_cheat_deaths = {}
|
||||
local necro_cheat_deaths = {}--REMOVE ON 10.0
|
||||
|
||||
local SPELLID_VENTYR_TAME_GARGOYLE = 342171 --REMOVE ON 10.0
|
||||
|
||||
@@ -323,7 +313,18 @@
|
||||
[315161] = true, --> Eye of Corruption --REMOVE ON 9.0
|
||||
[315197] = true, --> Thing From Beyond --REMOVE ON 9.0
|
||||
}
|
||||
|
||||
|
||||
local NPCID_SPIKEDBALL = 176581 --remove on 10.0
|
||||
--local NPCID_SPIKEDBALL = 161881 --remove on 10.0 - debug npc
|
||||
local spikeball_cache = {}
|
||||
spikeball_cache.name_cache = {}
|
||||
spikeball_cache.winners_cache = {}
|
||||
spikeball_cache.spike_counter = 0
|
||||
spikeball_cache.winner_spikeball = false
|
||||
spikeball_cache.ignore_spikeballs = false
|
||||
|
||||
local NPCID_KELTHUZAD_FROSTBOUNDDEVOTED = 176703
|
||||
|
||||
--> damage spells to ignore
|
||||
local damage_spells_to_ignore = {
|
||||
--the damage that the warlock apply to its pet through soullink is ignored
|
||||
@@ -594,19 +595,33 @@
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
--rules of specific encounters
|
||||
|
||||
|
||||
|
||||
--> if the parser are allowed to replace spellIDs
|
||||
if (is_using_spellId_override) then
|
||||
spellid = override_spellId [spellid] or spellid
|
||||
end
|
||||
|
||||
|
||||
--REMOVE ON 10.0
|
||||
if (_current_encounter_id == 2422) then --kel'thuzad
|
||||
if (raid_members_cache[who_serial]) then --attacker is a player
|
||||
if (who_flags and _bit_band(who_flags, 0xA60) ~= 0) then --neutral or hostile and contorlled by npc
|
||||
who_name = who_name .. "*"
|
||||
who_flags = 0xA48
|
||||
end
|
||||
|
||||
elseif (raid_members_cache[alvo_serial]) then --defender is a player
|
||||
if (alvo_flags and _bit_band(alvo_flags, 0xA60) ~= 0) then --neutral or hostile and contorlled by npc
|
||||
alvo_name = alvo_name .. "*"
|
||||
alvo_flags = 0xA48
|
||||
end
|
||||
end
|
||||
end
|
||||
--
|
||||
|
||||
--> npcId check for ignored npcs
|
||||
--target
|
||||
local npcId = npcid_cache[alvo_serial]
|
||||
|
||||
--target
|
||||
if (not npcId) then
|
||||
npcId = _tonumber(_select (6, _strsplit ("-", alvo_serial)) or 0)
|
||||
npcid_cache[alvo_serial] = npcId
|
||||
@@ -614,6 +629,152 @@
|
||||
if (ignored_npcids[npcId]) then
|
||||
return
|
||||
end
|
||||
|
||||
if (npcId == NPCID_KELTHUZAD_FROSTBOUNDDEVOTED) then --remove on 10.0
|
||||
alvo_flags = 0xA48
|
||||
end
|
||||
|
||||
if (npcId == NPCID_SPIKEDBALL) then --remove on 10.0
|
||||
if (spikeball_cache.ignore_spikeballs) then
|
||||
if (spikeball_cache.ignore_spikeballs > GetTime()) then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
--actor name
|
||||
local spikeName = spikeball_cache.name_cache[alvo_serial]
|
||||
if (not spikeName) then
|
||||
spikeball_cache.spike_counter = spikeball_cache.spike_counter + 1
|
||||
spikeName = alvo_name .. " " .. spikeball_cache.spike_counter
|
||||
spikeball_cache.name_cache[alvo_serial] = spikeName
|
||||
end
|
||||
|
||||
alvo_name = spikeName
|
||||
|
||||
--check if this spike ball is a winner
|
||||
if (overkill > -1) then
|
||||
--ignore new spike balls for 20 seconds
|
||||
spikeball_cache.ignore_spikeballs = GetTime()+20
|
||||
|
||||
--merge winner spike balls
|
||||
if (not spikeball_cache.winner_spikeball) then
|
||||
local spikeBallObject = damage_cache[alvo_serial]
|
||||
if (spikeBallObject) then
|
||||
--spikeBallObject.displayName = originalName
|
||||
spikeball_cache.winner_spikeball = spikeBallObject
|
||||
else
|
||||
print(6, "Details! winner spike ball doesn't exists. Nice coding bro!")
|
||||
end
|
||||
|
||||
amount = (amount-overkill)
|
||||
|
||||
local playerObject = damage_cache[who_serial]
|
||||
if (playerObject) then
|
||||
playerObject.total = playerObject.total + amount
|
||||
playerObject.targets[alvo_name] = (playerObject.targets[alvo_name] or 0) + amount
|
||||
local spellTable = playerObject.spells._ActorTable[spellid]
|
||||
if (spellTable) then
|
||||
spellTable.total = spellTable.total + amount
|
||||
spellTable.targets[alvo_name] = (spellTable.targets[alvo_name] or 0) + amount
|
||||
end
|
||||
end
|
||||
spikeball_cache.winner_spikeball.damage_taken = spikeball_cache.winner_spikeball.damage_taken + amount
|
||||
|
||||
else
|
||||
amount = (amount-overkill)
|
||||
|
||||
local playerObject = damage_cache[who_serial]
|
||||
if (playerObject) then
|
||||
playerObject.total = playerObject.total + amount
|
||||
playerObject.targets[alvo_name] = (playerObject.targets[alvo_name] or 0) + amount
|
||||
local spellTable = playerObject.spells._ActorTable[spellid]
|
||||
if (spellTable) then
|
||||
spellTable.total = spellTable.total + amount
|
||||
spellTable.targets[alvo_name] = (spellTable.targets[alvo_name] or 0) + amount
|
||||
end
|
||||
end
|
||||
spikeball_cache.winner_spikeball.damage_taken = spikeball_cache.winner_spikeball.damage_taken + amount
|
||||
|
||||
--there's a second winner ball, merge both
|
||||
local thisRoundWinnerSpikeBall = damage_cache[alvo_serial]
|
||||
local firstWinnerName = spikeball_cache.winner_spikeball.nome
|
||||
local thisRoundWinnerName = thisRoundWinnerSpikeBall.nome
|
||||
|
||||
--copy damage from
|
||||
for damageFromName in pairs(thisRoundWinnerSpikeBall.damage_from) do
|
||||
--the first winner ball get the "damage from" from this winner
|
||||
spikeball_cache.winner_spikeball.damage_from[damageFromName] = true
|
||||
|
||||
local actorObject = _current_combat[1]:GetActor(damageFromName)
|
||||
if (actorObject) then
|
||||
--get the damage done on the winner ball of this round and transfer the damage done into the first winner
|
||||
local damageDone = actorObject.targets[thisRoundWinnerName] or 0
|
||||
actorObject.targets[firstWinnerName] = (actorObject.targets[firstWinnerName] or 0) + damageDone
|
||||
actorObject.targets[thisRoundWinnerName] = nil
|
||||
|
||||
--spells
|
||||
for _, spellTable in pairs(actorObject.spells._ActorTable) do
|
||||
local damageDone = spellTable.targets[thisRoundWinnerName] or 0
|
||||
spellTable.targets[thisRoundWinnerName] = nil
|
||||
spellTable.targets[firstWinnerName] = (spellTable.targets[firstWinnerName] or 0) + damageDone
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
spikeball_cache.winner_spikeball.damage_taken = spikeball_cache.winner_spikeball.damage_taken + thisRoundWinnerSpikeBall.damage_taken
|
||||
|
||||
thisRoundWinnerSpikeBall.total = 0
|
||||
thisRoundWinnerSpikeBall.damage_taken = 0
|
||||
spikeball_cache.winners_cache[thisRoundWinnerSpikeBall] = true
|
||||
end
|
||||
|
||||
--/run GameTooltip:SetPoint("BOTTOMRIGHT", UIParent, "BOTTOMRIGHT", -13, 250) to remove the tooltip above details!
|
||||
|
||||
--delete loser spike balls
|
||||
local container = _current_combat[1]._ActorTable
|
||||
for i = #container, 1, -1 do
|
||||
local spikeBall = container[i]
|
||||
if (spikeBall) then
|
||||
--check if the actor is a spike ball
|
||||
if (tonumber(spikeBall.aID) == npcId) then
|
||||
if (spikeball_cache.winner_spikeball ~= spikeBall and not spikeball_cache.winners_cache[spikeBall]) then
|
||||
|
||||
for actorName in pairs(spikeBall.damage_from) do
|
||||
local actorObject = _current_combat[1]:GetActor(actorName)
|
||||
if (actorObject) then
|
||||
--remove from the damage from
|
||||
spikeBall.damage_from[actorName] = nil
|
||||
|
||||
--remove from targets
|
||||
local damageDone = actorObject.targets[spikeBall.nome] or 0
|
||||
actorObject.targets[spikeBall.nome] = nil
|
||||
|
||||
--remove from damage done
|
||||
actorObject.total = actorObject.total - damageDone
|
||||
|
||||
--reduce from spells
|
||||
for _, spellTable in pairs(actorObject.spells._ActorTable) do
|
||||
local damageDone = spellTable[spikeBall.nome] or 0
|
||||
spellTable.total = spellTable.total - damageDone
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--reset the damage taken amount
|
||||
spikeBall.damage_taken = 0
|
||||
spikeBall.total = 0
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--_current_combat[1]:Remap()
|
||||
Details:RefreshMainWindow(-1, true)
|
||||
return
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--source
|
||||
npcId = npcid_cache[who_serial]
|
||||
if (not npcId) then
|
||||
@@ -624,6 +785,23 @@
|
||||
return
|
||||
end
|
||||
|
||||
if (npcId == NPCID_KELTHUZAD_FROSTBOUNDDEVOTED) then --remove on 10.0
|
||||
who_flags = 0xA48
|
||||
end
|
||||
|
||||
if (npcId == NPCID_SPIKEDBALL) then --remove on 10.0
|
||||
print(1, "npc id match (IS ATTACK)")
|
||||
|
||||
--actor name
|
||||
local spikeName = spikeball_cache.name_cache[who_serial]
|
||||
if (not spikeName) then
|
||||
spikeball_cache.spike_counter = spikeball_cache.spike_counter + 1
|
||||
spikeName = who_name .. " " .. spikeball_cache.spike_counter
|
||||
spikeball_cache.name_cache[who_serial] = spikeName
|
||||
end
|
||||
who_name = spikeName
|
||||
end
|
||||
|
||||
--> avoid doing spellID checks on each iteration
|
||||
if (special_damage_spells [spellid]) then
|
||||
--> stagger
|
||||
@@ -640,8 +818,6 @@
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------
|
||||
--> check if need start an combat
|
||||
|
||||
@@ -4041,12 +4217,6 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--if (_detalhes.deadlog_limit and #esta_morte > _detalhes.deadlog_limit) then
|
||||
-- while (#esta_morte > _detalhes.deadlog_limit) do
|
||||
-- _table_remove (esta_morte, 1)
|
||||
-- end
|
||||
--end
|
||||
|
||||
if (este_jogador.last_cooldown) then
|
||||
local t = {}
|
||||
@@ -4525,7 +4695,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
|
||||
function _detalhes:Check_ZONE_CHANGED_NEW_AREA()
|
||||
|
||||
local zoneName, zoneType, _, _, _, _, _, zoneMapID = _GetInstanceInfo()
|
||||
local zoneName, zoneType, _, _, _, _, _, zoneMapID = GetInstanceInfo()
|
||||
|
||||
_detalhes.zone_type = zoneType
|
||||
_detalhes.zone_id = zoneMapID
|
||||
@@ -4671,7 +4841,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
end
|
||||
|
||||
local encounterID, encounterName, difficultyID, raidSize = _select (1, ...)
|
||||
local zoneName, _, _, _, _, _, _, zoneMapID = _GetInstanceInfo()
|
||||
local zoneName, _, _, _, _, _, _, zoneMapID = GetInstanceInfo()
|
||||
|
||||
if (_detalhes.InstancesToStoreData[zoneMapID]) then
|
||||
Details.current_exp_raid_encounters[encounterID] = true
|
||||
@@ -4771,7 +4941,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
_detalhes.latest_ENCOUNTER_END = _GetTime()
|
||||
_detalhes.encounter_table ["end"] = _GetTime() -- 0.351
|
||||
|
||||
local _, _, _, _, _, _, _, zoneMapID = _GetInstanceInfo()
|
||||
local _, _, _, _, _, _, _, zoneMapID = GetInstanceInfo()
|
||||
|
||||
if (_in_combat) then
|
||||
if (endStatus == 1) then
|
||||
@@ -4794,6 +4964,13 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
_table_wipe (_detalhes.encounter_table)
|
||||
_table_wipe (bargastBuffs) --remove on 10.0
|
||||
_table_wipe (necro_cheat_deaths) --remove on 10.0
|
||||
|
||||
_table_wipe(spikeball_cache) --remove on 10.0 spikeball from painsmith
|
||||
spikeball_cache.name_cache = {}
|
||||
spikeball_cache.winners_cache = {}
|
||||
spikeball_cache.spike_counter = 0
|
||||
spikeball_cache.winner_spikeball = false
|
||||
spikeball_cache.ignore_spikeballs = false
|
||||
|
||||
return true
|
||||
end
|
||||
@@ -4878,6 +5055,15 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
if (_detalhes.debug) then
|
||||
_detalhes:Msg ("(debug) running scheduled events after combat end.")
|
||||
end
|
||||
|
||||
--remove on 10.0 spikeball from painsmith
|
||||
_table_wipe(spikeball_cache)
|
||||
spikeball_cache.name_cache = {}
|
||||
spikeball_cache.winners_cache = {}
|
||||
spikeball_cache.spike_counter = 0
|
||||
spikeball_cache.winner_spikeball = false
|
||||
spikeball_cache.ignore_spikeballs = false
|
||||
--
|
||||
|
||||
--when the user requested data from the storage but is in combat lockdown
|
||||
if (_detalhes.schedule_storage_load) then
|
||||
@@ -5245,7 +5431,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
_detalhes:Msg("(debug) found a timer.")
|
||||
end
|
||||
|
||||
local _, zoneType = _GetInstanceInfo()
|
||||
local _, zoneType = GetInstanceInfo()
|
||||
|
||||
--check if the player is inside an arena
|
||||
if (zoneType == "arena") then
|
||||
@@ -5590,7 +5776,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
|
||||
if (_IsInRaid()) then
|
||||
for i = 1, _GetNumGroupMembers() do
|
||||
local name = _GetUnitName ("raid"..i, true)
|
||||
local name = GetUnitName ("raid"..i, true)
|
||||
|
||||
raid_members_cache [_UnitGUID ("raid"..i)] = true
|
||||
roster [name] = true
|
||||
@@ -5608,7 +5794,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
elseif (_IsInGroup()) then
|
||||
--party
|
||||
for i = 1, _GetNumGroupMembers()-1 do
|
||||
local name = _GetUnitName ("party"..i, true)
|
||||
local name = GetUnitName ("party"..i, true)
|
||||
|
||||
raid_members_cache [_UnitGUID ("party"..i)] = true
|
||||
roster [name] = true
|
||||
|
||||
Reference in New Issue
Block a user