Attribute Judgement of Light to the healed on Wrath

This commit is contained in:
Flamanis
2023-10-27 23:05:05 -05:00
parent 966e0c3a99
commit 88203613a7
+3 -53
View File
@@ -444,9 +444,6 @@
--tbc spell caches
local TBC_PrayerOfMendingCache = {}
local TBC_EarthShieldCache = {}
local TBC_JudgementOfLightCache = {
_damageCache = {}
}
--expose the override spells table to external scripts
Details.OverridedSpellIds = override_spellId
@@ -872,15 +869,6 @@
end
end
--wrath of the lich king
if (isWOTLK) then
--is the target an enemy with judgement of light?
if (TBC_JudgementOfLightCache[targetName] and false) then
--store the player name which just landed a damage
TBC_JudgementOfLightCache._damageCache[sourceName] = {time, targetName}
end
end
------------------------------------------------------------------------------------------------
--check if need start an combat
if (not _in_combat) then --~startcombat ~combatstart
@@ -2452,24 +2440,9 @@
TBC_PrayerOfMendingCache[sourceName] = nil
end
elseif (spellId == 27163 and false) then --Judgement of Light (paladin) --disabled on 25 September 2022
--check if the hit was landed in the same cleu tick
local hitCache = TBC_JudgementOfLightCache._damageCache[sourceName]
if (hitCache) then
local timeLanded = hitCache[1]
local targetHit = hitCache[2]
if (timeLanded and timeLanded == time) then
local sourceData = TBC_JudgementOfLightCache[targetHit]
if (sourceData) then
--change the source of the healing
sourceSerial, sourceName, sourceFlags = unpack(sourceData)
--erase the hit time information
TBC_JudgementOfLightCache._damageCache[sourceName] = nil
end
end
end
elseif (spellId == 27163) then --Judgement of Light (paladin), reattribute healing to the person getting healed. Stops 'sniping' the JoL to parse
--Removed old version 10/27/23 Flamanis
sourceSerial, sourceName, sourceFlags = targetSerial, targetName, targetFlags
end
end
@@ -2903,9 +2876,6 @@
elseif (spellId == SPELLID_PRIEST_POM_BUFF) then
TBC_PrayerOfMendingCache [targetName] = {sourceSerial, sourceName, sourceFlags}
elseif (spellId == 27163 and false) then --Judgement Of Light
TBC_JudgementOfLightCache[targetName] = {sourceSerial, sourceName, sourceFlags}
end
end
@@ -2947,12 +2917,6 @@
--recording debuffs applied by player
elseif (auraType == "DEBUFF") then
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[targetName] = {sourceSerial, sourceName, sourceFlags}
end
end
------------------------------------------------------------------------------------------------
--spell reflection
@@ -3059,12 +3023,6 @@
--recording debuffs applied by player
elseif (tipo == "DEBUFF") then
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[targetName] = {sourceSerial, sourceName, sourceFlags}
end
end
if (_in_combat) then
------------------------------------------------------------------------------------------------
@@ -3158,11 +3116,6 @@
------------------------------------------------------------------------------------------------
--recording debuffs applied by player
elseif (tipo == "DEBUFF") then
if (isWOTLK) then --buff removed
if (spellId == 27162 and false) then --Judgement Of Light
TBC_JudgementOfLightCache[targetName] = nil
end
end
------------------------------------------------------------------------------------------------
--spell reflection
@@ -5697,9 +5650,6 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
Details:Msg("(debug) running scheduled events after combat end.")
end
TBC_JudgementOfLightCache = {
_damageCache = {}
}
--when the user requested data from the storage but is in combat lockdown
if (Details.schedule_storage_load) then