Release Candidate 1
This commit is contained in:
+89
-65
@@ -2,11 +2,7 @@
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
local _tempo = time()
|
||||
local _
|
||||
local DetailsFramework = DetailsFramework
|
||||
local isTBC = DetailsFramework.IsTBCWow()
|
||||
local isWOTLK = DetailsFramework.IsWotLKWow()
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--local pointers
|
||||
@@ -33,10 +29,15 @@
|
||||
|
||||
local _UnitGroupRolesAssigned = DetailsFramework.UnitGroupRolesAssigned
|
||||
local _GetSpellInfo = _detalhes.getspellinfo
|
||||
local isWOTLK = DetailsFramework.IsWotLKWow()
|
||||
local _tempo = time()
|
||||
local _, Details222 = ...
|
||||
_ = nil
|
||||
|
||||
local escudo = _detalhes.escudos --details local
|
||||
local parser = _detalhes.parser --details local
|
||||
local absorb_spell_list = _detalhes.AbsorbSpells --details local
|
||||
local trinketData = {}
|
||||
|
||||
local cc_spell_list = DetailsFramework.CrowdControlSpells
|
||||
local container_habilidades = _detalhes.container_habilidades --details local
|
||||
@@ -186,12 +187,9 @@
|
||||
}
|
||||
|
||||
--spellIds override
|
||||
local override_spellId
|
||||
local override_spellId = {}
|
||||
|
||||
if (isTBC) then
|
||||
override_spellId = {}
|
||||
|
||||
elseif (isWOTLK) then
|
||||
if (isWOTLK) then
|
||||
override_spellId = {
|
||||
--Scourge Strike
|
||||
[55090] = 55271,
|
||||
@@ -314,7 +312,6 @@
|
||||
--tbc spell caches
|
||||
local TBC_PrayerOfMendingCache = {}
|
||||
local TBC_EarthShieldCache = {}
|
||||
local TBC_LifeBloomLatestHeal
|
||||
local TBC_JudgementOfLightCache = {
|
||||
_damageCache = {}
|
||||
}
|
||||
@@ -440,8 +437,8 @@
|
||||
--in combat flag
|
||||
local _in_combat = false
|
||||
local _current_encounter_id
|
||||
local _is_storing_cleu = false
|
||||
local _in_resting_zone = false
|
||||
local _global_combat_counter = 0
|
||||
|
||||
--deathlog
|
||||
local _death_event_amt = 16
|
||||
@@ -515,7 +512,7 @@
|
||||
Details.SpecialSpellActorsName = {}
|
||||
|
||||
--add sanguine affix
|
||||
if (not isTBC) then
|
||||
if (not isWOTLK) then
|
||||
if (Details.SanguineHealActorName) then
|
||||
Details.SpecialSpellActorsName[Details.SanguineHealActorName] = SPELLID_SANGUINE_HEAL
|
||||
end
|
||||
@@ -913,7 +910,7 @@
|
||||
end
|
||||
--end
|
||||
|
||||
if (isTBC or isWOTLK) then
|
||||
if (isWOTLK) then
|
||||
--is the target an enemy with judgement of light?
|
||||
if (TBC_JudgementOfLightCache[alvo_name] and false) then
|
||||
--store the player name which just landed a damage
|
||||
@@ -941,9 +938,9 @@
|
||||
if (_detalhes.encounter_table.id and _detalhes.encounter_table["start"] >= GetTime() - 3 and _detalhes.announce_firsthit.enabled) then
|
||||
local link
|
||||
if (spellid <= 10) then
|
||||
link = GetSpellInfo(spellid)
|
||||
link = _GetSpellInfo(spellid)
|
||||
else
|
||||
link = GetSpellLink(spellid)
|
||||
link = _GetSpellInfo(spellid)
|
||||
end
|
||||
|
||||
if (_detalhes.WhoAggroTimer) then
|
||||
@@ -1395,9 +1392,31 @@
|
||||
end
|
||||
end
|
||||
|
||||
if (_is_storing_cleu) then
|
||||
_current_combat_cleu_events [_current_combat_cleu_events.n] = {_tempo, _token_ids [token] or 0, who_name, alvo_name or "", spellid, amount}
|
||||
_current_combat_cleu_events.n = _current_combat_cleu_events.n + 1
|
||||
if (trinketData[spellid] and _in_combat) then
|
||||
local thisData = trinketData[spellid]
|
||||
if (thisData.lastCombatId == _global_combat_counter) then
|
||||
if (thisData.lastPlayerName == who_name) then
|
||||
if (thisData.lastActivation < (time - 40)) then
|
||||
local cooldownTime = time - thisData.lastActivation
|
||||
thisData.totalCooldownTime = thisData.totalCooldownTime + cooldownTime
|
||||
thisData.activations = thisData.activations + 1
|
||||
thisData.lastActivation = time
|
||||
|
||||
thisData.averageTime = floor(thisData.totalCooldownTime / thisData.activations)
|
||||
if (cooldownTime < thisData.minTime) then
|
||||
thisData.minTime = cooldownTime
|
||||
end
|
||||
|
||||
if (cooldownTime > thisData.maxTime) then
|
||||
thisData.maxTime = cooldownTime
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
thisData.lastCombatId = _global_combat_counter
|
||||
thisData.lastActivation = time
|
||||
thisData.lastPlayerName = who_name
|
||||
end
|
||||
end
|
||||
|
||||
return spell_damage_func (spell, alvo_serial, alvo_name, alvo_flags, amount, who_name, resisted, blocked, absorbed, critical, glacing, token, isoffhand, isreflected)
|
||||
@@ -1925,7 +1944,6 @@
|
||||
--SUMMON serach key: ~summon |
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
function parser:summon (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellName)
|
||||
|
||||
--[[statistics]]-- _detalhes.statistics.pets_summons = _detalhes.statistics.pets_summons + 1
|
||||
|
||||
if (not _detalhes.capture_real ["damage"] and not _detalhes.capture_real ["heal"]) then
|
||||
@@ -2195,15 +2213,7 @@
|
||||
cura_efetiva = cura_efetiva + amount - overhealing
|
||||
end
|
||||
|
||||
if (isTBC) then
|
||||
--life bloom explosion (second part of the heal)
|
||||
if (spellid == SPELLID_DRUID_LIFEBLOOM_HEAL) then
|
||||
TBC_LifeBloomLatestHeal = cura_efetiva
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
if (isTBC or isWOTLK) then
|
||||
if (isWOTLK) then
|
||||
--earth shield
|
||||
if (spellid == SPELLID_SHAMAN_EARTHSHIELD_HEAL) then
|
||||
--get the information of who placed the buff into this actor
|
||||
@@ -2431,11 +2441,6 @@
|
||||
end
|
||||
end
|
||||
|
||||
if (_is_storing_cleu) then
|
||||
_current_combat_cleu_events [_current_combat_cleu_events.n] = {_tempo, _token_ids [token] or 0, who_name, alvo_name or "", spellid, amount}
|
||||
_current_combat_cleu_events.n = _current_combat_cleu_events.n + 1
|
||||
end
|
||||
|
||||
if (is_shield) then
|
||||
--return spell:Add (alvo_serial, alvo_name, alvo_flags, cura_efetiva, who_name, 0, nil, overhealing, true)
|
||||
return spell_heal_func (spell, alvo_serial, alvo_name, alvo_flags, cura_efetiva, who_name, 0, nil, overhealing, true)
|
||||
@@ -2564,7 +2569,7 @@
|
||||
necro_cheat_deaths[who_serial] = true
|
||||
end
|
||||
|
||||
if (isTBC or isWOTLK) then
|
||||
if (isWOTLK) then
|
||||
if (SHAMAN_EARTHSHIELD_BUFF[spellid]) then
|
||||
TBC_EarthShieldCache[alvo_name] = {who_serial, who_name, who_flags}
|
||||
|
||||
@@ -2619,7 +2624,7 @@
|
||||
_detalhes.tabela_pets:Adicionar(alvo_serial, alvo_name, alvo_flags, who_serial, who_name, 0x00000417)
|
||||
end
|
||||
|
||||
if (isTBC or isWOTLK) then --buff applied
|
||||
if (isWOTLK) then --buff applied
|
||||
if (spellid == 27162 and false) then --Judgement Of Light
|
||||
--which player applied the judgement of light on this mob
|
||||
TBC_JudgementOfLightCache[alvo_name] = {who_serial, who_name, who_flags}
|
||||
@@ -2856,15 +2861,6 @@
|
||||
end
|
||||
end
|
||||
|
||||
--buff refresh
|
||||
if (isTBC) then
|
||||
if (SHAMAN_EARTHSHIELD_BUFF[spellid]) then
|
||||
TBC_EarthShieldCache[alvo_name] = {who_serial, who_name, who_flags}
|
||||
|
||||
elseif (spellid == SPELLID_PRIEST_POM_BUFF) then
|
||||
TBC_PrayerOfMendingCache[alvo_name] = {who_serial, who_name, who_flags}
|
||||
end
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------
|
||||
--recording buffs
|
||||
@@ -2896,7 +2892,7 @@
|
||||
bargastBuffs[alvo_serial] = (bargastBuffs[alvo_serial] or 0) + 1
|
||||
end
|
||||
|
||||
if (isTBC or isWOTLK) then --buff refresh
|
||||
if (isWOTLK) then --buff refresh
|
||||
if (spellid == 27162 and false) then --Judgement Of Light
|
||||
--which player applied the judgement of light on this mob
|
||||
TBC_JudgementOfLightCache[alvo_name] = {who_serial, who_name, who_flags}
|
||||
@@ -3001,23 +2997,6 @@
|
||||
necro_cheat_deaths[who_serial] = nil
|
||||
end
|
||||
|
||||
if (isTBC) then
|
||||
--shaman earth shield
|
||||
if (SHAMAN_EARTHSHIELD_BUFF[spellid]) then
|
||||
TBC_EarthShieldCache[alvo_name] = nil
|
||||
end
|
||||
|
||||
--druid life bloom
|
||||
if (spellid == SPELLID_DRUID_LIFEBLOOM_BUFF) then
|
||||
local healAmount = TBC_LifeBloomLatestHeal
|
||||
if (healAmount) then
|
||||
--award the heal to the buff caster name
|
||||
parser:heal("SPELL_HEAL", time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spellschool, healAmount, 0, 0, false, false)
|
||||
TBC_LifeBloomLatestHeal = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--druid kyrian empower bounds (9.0 kyrian covenant - probably remove on 10.0)
|
||||
if (spellid == SPELLID_KYRIAN_DRUID and alvo_name) then
|
||||
druid_kyrian_bounds[alvo_name] = nil
|
||||
@@ -3071,7 +3050,7 @@
|
||||
who_serial, who_name, who_flags = "", enemyName, 0xa48
|
||||
end
|
||||
|
||||
if (isTBC or isWOTLK) then --buff removed
|
||||
if (isWOTLK) then --buff removed
|
||||
if (spellid == 27162 and false) then --Judgement Of Light
|
||||
TBC_JudgementOfLightCache[alvo_name] = nil
|
||||
end
|
||||
@@ -5248,6 +5227,35 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
_detalhes:SchedulePetUpdate(1)
|
||||
end
|
||||
|
||||
local autoSwapDynamicOverallData = function(instance, inCombat)
|
||||
local mainDisplayGroup, subDisplay = instance:GetDisplay()
|
||||
local customDisplayAttributeId = 5
|
||||
|
||||
--entering in combat, swap to dynamic overall damage
|
||||
if (inCombat) then
|
||||
if (mainDisplayGroup == DETAILS_ATTRIBUTE_DAMAGE and subDisplay == DETAILS_SUBATTRIBUTE_DAMAGEDONE) then
|
||||
local segment = instance:GetSegment()
|
||||
if (segment == DETAILS_SEGMENTID_OVERALL) then
|
||||
local dynamicOverallDataCustomID = Details222.GetCustomDisplayIDByName(Loc["STRING_CUSTOM_DYNAMICOVERAL"])
|
||||
instance:SetDisplay(segment, customDisplayAttributeId, dynamicOverallDataCustomID)
|
||||
end
|
||||
end
|
||||
else
|
||||
--leaving combat
|
||||
if (mainDisplayGroup == customDisplayAttributeId) then
|
||||
local dynamicOverallDataCustomID = Details222.GetCustomDisplayIDByName(Loc["STRING_CUSTOM_DYNAMICOVERAL"])
|
||||
if (subDisplay == dynamicOverallDataCustomID) then
|
||||
local segment = instance:GetSegment()
|
||||
if (segment == DETAILS_SEGMENTID_OVERALL) then
|
||||
instance:SetDisplay(true, DETAILS_ATTRIBUTE_DAMAGE, DETAILS_SUBATTRIBUTE_DAMAGEDONE)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function _detalhes.parser_functions:PLAYER_REGEN_DISABLED(...)
|
||||
C_Timer.After(0, function()
|
||||
if (not Details.bossTargetAtPull) then
|
||||
@@ -5260,6 +5268,15 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
end
|
||||
end)
|
||||
|
||||
if (Details.auto_swap_to_dynamic_overall) then
|
||||
Details:InstanceCall(autoSwapDynamicOverallData, true)
|
||||
end
|
||||
|
||||
Details.combat_id_global = Details.combat_id_global + 1
|
||||
_global_combat_counter = Details.combat_id_global
|
||||
|
||||
trinketData = Details:GetTrinketData()
|
||||
|
||||
if (_detalhes.zone_type == "pvp" and not _detalhes.use_battleground_server_parser) then
|
||||
if (_in_combat) then
|
||||
_detalhes:SairDoCombate()
|
||||
@@ -5460,7 +5477,10 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
|
||||
function _detalhes.parser_functions:CHALLENGE_MODE_START(...)
|
||||
--send mythic dungeon start event
|
||||
print("parser event", "CHALLENGE_MODE_START", ...)
|
||||
if (_detalhes.debug) then
|
||||
print("parser event", "CHALLENGE_MODE_START", ...)
|
||||
end
|
||||
|
||||
local zoneName, instanceType, difficultyID, difficultyName, maxPlayers, dynamicDifficulty, isDynamic, instanceMapID, instanceGroupSize = GetInstanceInfo()
|
||||
if (difficultyID == 8) then
|
||||
_detalhes:SendEvent("COMBAT_MYTHICDUNGEON_START")
|
||||
@@ -5488,6 +5508,10 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
end
|
||||
end
|
||||
|
||||
if (Details.auto_swap_to_dynamic_overall) then
|
||||
Details:InstanceCall(autoSwapDynamicOverallData, false)
|
||||
end
|
||||
|
||||
--elapsed combat time
|
||||
_detalhes.LatestCombatDone = GetTime()
|
||||
_detalhes.tabela_vigente.CombatEndedAt = GetTime()
|
||||
@@ -6397,7 +6421,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
|
||||
for i = 1, players do
|
||||
local name, killingBlows, honorableKills, deaths, honorGained, faction, race, rank, class, classToken, damageDone, healingDone, bgRating, ratingChange, preMatchMMR, mmrChange, talentSpec
|
||||
if (isTBC or isWOTLK) then
|
||||
if (isWOTLK) then
|
||||
name, killingBlows, honorableKills, deaths, honorGained, faction, rank, race, class, classToken, damageDone, healingDone, bgRating, ratingChange, preMatchMMR, mmrChange, talentSpec = GetBattlefieldScore(i)
|
||||
else
|
||||
name, killingBlows, honorableKills, deaths, honorGained, faction, race, class, classToken, damageDone, healingDone, bgRating, ratingChange, preMatchMMR, mmrChange, talentSpec = GetBattlefieldScore(i)
|
||||
|
||||
Reference in New Issue
Block a user