|
|
|
@@ -36,7 +36,7 @@
|
|
|
|
|
local parser = Details.parser --details local
|
|
|
|
|
|
|
|
|
|
local cc_spell_list = detailsFramework.CrowdControlSpells
|
|
|
|
|
local container_habilidades = Details.container_habilidades --details local
|
|
|
|
|
local spellContainerClass = Details.container_habilidades --details local
|
|
|
|
|
|
|
|
|
|
--localize the cooldown table from the framework
|
|
|
|
|
local defensive_cooldowns = {}
|
|
|
|
@@ -446,6 +446,15 @@
|
|
|
|
|
[372824] = true, --Burning Chains
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
local special_buffs_spells = {
|
|
|
|
|
[395152] = true,
|
|
|
|
|
[413984] = true,
|
|
|
|
|
[410089] = true,
|
|
|
|
|
[409560] = true,
|
|
|
|
|
[360827] = true,
|
|
|
|
|
[410263] = true,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
--damage spells to ignore
|
|
|
|
|
local damage_spells_to_ignore = {
|
|
|
|
|
--the damage that the warlock apply to its pet through soullink is ignored
|
|
|
|
@@ -1231,7 +1240,7 @@
|
|
|
|
|
--amount add
|
|
|
|
|
|
|
|
|
|
--~roskash - augmentation evoker damage buff
|
|
|
|
|
if (augmentation_cache.ebon_might[sourceSerial]) then
|
|
|
|
|
if (augmentation_cache.ebon_might[sourceSerial] and sourceName ~= Details.playername) then
|
|
|
|
|
---actor buffed with ebonmight -> list of evokers whose buffed
|
|
|
|
|
---@type table<serial, evokerinfo[]>
|
|
|
|
|
local currentlyBuffedWithEbonMight = augmentation_cache.ebon_might[sourceSerial]
|
|
|
|
@@ -1244,23 +1253,34 @@
|
|
|
|
|
|
|
|
|
|
---@type actor
|
|
|
|
|
local evokerActor = damage_cache[evokerSourceSerial]
|
|
|
|
|
|
|
|
|
|
if (not evokerActor) then
|
|
|
|
|
evokerActor = _current_damage_container:GetOrCreateActor(evokerSourceSerial, evokerSourceName, evokerSourceFlags, true)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if (evokerActor) then
|
|
|
|
|
evokerActor.total_extra = evokerActor.total_extra or 0
|
|
|
|
|
if (Details.zone_type == "raid") then
|
|
|
|
|
evokerActor.total_extra = evokerActor.total_extra + (amount * 0.1389541)
|
|
|
|
|
else
|
|
|
|
|
evokerActor.total_extra = evokerActor.total_extra + (amount * 0.1683245)
|
|
|
|
|
local extraSpellId = 395152
|
|
|
|
|
evokerActor.augmentedSpellsContainer = evokerActor.augmentedSpellsContainer or spellContainerClass:CreateSpellContainer(Details.container_type.CONTAINER_DAMAGE_CLASS)
|
|
|
|
|
local augmentedSpell = evokerActor.augmentedSpellsContainer._ActorTable[extraSpellId]
|
|
|
|
|
if (not augmentedSpell) then
|
|
|
|
|
augmentedSpell = evokerActor.augmentedSpellsContainer:GetOrCreateSpell(extraSpellId, true, token)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
evokerActor.total_extra = evokerActor.total_extra or 0
|
|
|
|
|
local predictedAmount = 0
|
|
|
|
|
if (Details.zone_type == "raid") then
|
|
|
|
|
predictedAmount = amount * 0.1389541
|
|
|
|
|
else
|
|
|
|
|
predictedAmount = amount * 0.1683245
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
evokerActor.total_extra = evokerActor.total_extra + predictedAmount
|
|
|
|
|
augmentedSpell.total = augmentedSpell.total + predictedAmount
|
|
|
|
|
augmentedSpell.targets[sourceName] = (augmentedSpell.targets[sourceName] or 0) + predictedAmount
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if (augmentation_cache.ss[sourceSerial]) then --actor buffed with ss
|
|
|
|
|
if (augmentation_cache.ss[sourceSerial] and sourceName ~= Details.playername) then --actor buffed with ss
|
|
|
|
|
--print(sourceName, "has ss buff")
|
|
|
|
|
---@type table<serial, evokerinfo[]>
|
|
|
|
|
local currentlyBuffedWithSS = augmentation_cache.ss[sourceSerial]
|
|
|
|
@@ -1272,22 +1292,29 @@
|
|
|
|
|
|
|
|
|
|
---@type actor
|
|
|
|
|
local evokerActor = damage_cache[evokerSourceSerial]
|
|
|
|
|
|
|
|
|
|
--print(evokerActor, evokerSourceSerial, evokerSourceName, evokerSourceFlags, versaBuff, sourceName)
|
|
|
|
|
|
|
|
|
|
if (not evokerActor) then
|
|
|
|
|
evokerActor = _current_damage_container:GetOrCreateActor(evokerSourceSerial, evokerSourceName, evokerSourceFlags, true)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if (evokerActor) then
|
|
|
|
|
local extraSpellId = 413984
|
|
|
|
|
evokerActor.augmentedSpellsContainer = evokerActor.augmentedSpellsContainer or spellContainerClass:CreateSpellContainer(Details.container_type.CONTAINER_DAMAGE_CLASS)
|
|
|
|
|
local augmentedSpell = evokerActor.augmentedSpellsContainer._ActorTable[extraSpellId]
|
|
|
|
|
if (not augmentedSpell) then
|
|
|
|
|
augmentedSpell = evokerActor.augmentedSpellsContainer:GetOrCreateSpell(extraSpellId, true, token)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
versaBuff = versaBuff / 100
|
|
|
|
|
evokerActor.total_extra = evokerActor.total_extra + (amount * versaBuff)
|
|
|
|
|
--print("added to the evoker:", (amount * versaBuff), "damage")
|
|
|
|
|
local predictedAmount = amount * versaBuff
|
|
|
|
|
evokerActor.total_extra = evokerActor.total_extra + predictedAmount
|
|
|
|
|
|
|
|
|
|
augmentedSpell.total = augmentedSpell.total + predictedAmount
|
|
|
|
|
augmentedSpell.targets[sourceName] = (augmentedSpell.targets[sourceName] or 0) + predictedAmount
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if (spellId == 360828 and augmentation_cache.shield[sourceSerial]) then --shield
|
|
|
|
|
if (spellId == 360828 and augmentation_cache.shield[sourceSerial] and sourceName ~= Details.playername) then --shield
|
|
|
|
|
---actor buffed with the shield -> list of evokers whose buffed
|
|
|
|
|
---@type table<serial, evokerinfo[]>
|
|
|
|
|
local currentlyBuffedWithShield = augmentation_cache.shield[sourceSerial]
|
|
|
|
@@ -1300,19 +1327,28 @@
|
|
|
|
|
|
|
|
|
|
---@type actor
|
|
|
|
|
local evokerActor = damage_cache[evokerSourceSerial]
|
|
|
|
|
|
|
|
|
|
if (not evokerActor) then
|
|
|
|
|
evokerActor = _current_damage_container:GetOrCreateActor(evokerSourceSerial, evokerSourceName, evokerSourceFlags, true)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if (evokerActor) then
|
|
|
|
|
local extraSpellId = 360828
|
|
|
|
|
evokerActor.augmentedSpellsContainer = evokerActor.augmentedSpellsContainer or spellContainerClass:CreateSpellContainer(Details.container_type.CONTAINER_DAMAGE_CLASS)
|
|
|
|
|
local augmentedSpell = evokerActor.augmentedSpellsContainer._ActorTable[extraSpellId]
|
|
|
|
|
if (not augmentedSpell) then
|
|
|
|
|
augmentedSpell = evokerActor.augmentedSpellsContainer:GetOrCreateSpell(extraSpellId, true, token)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
local damageSplitted = amount / #currentlyBuffedWithShield
|
|
|
|
|
evokerActor.total_extra = evokerActor.total_extra + damageSplitted
|
|
|
|
|
|
|
|
|
|
augmentedSpell.total = augmentedSpell.total + damageSplitted
|
|
|
|
|
augmentedSpell.targets[sourceName] = (augmentedSpell.targets[sourceName] or 0) + damageSplitted
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if (spellId == 404908 and augmentation_cache.prescience[sourceSerial]) then --fate mirror
|
|
|
|
|
if (spellId == 404908 and augmentation_cache.prescience[sourceSerial] and sourceName ~= Details.playername) then --fate mirror
|
|
|
|
|
---actor buffed with prescience -> list of evokers whose buffed
|
|
|
|
|
---@type table<serial, evokerinfo[]>
|
|
|
|
|
local currentlyBuffedWithPrescience = augmentation_cache.prescience[sourceSerial]
|
|
|
|
@@ -1325,13 +1361,22 @@
|
|
|
|
|
|
|
|
|
|
---@type actor
|
|
|
|
|
local evokerActor = damage_cache[evokerSourceSerial]
|
|
|
|
|
|
|
|
|
|
if (not evokerActor) then
|
|
|
|
|
evokerActor = _current_damage_container:GetOrCreateActor(evokerSourceSerial, evokerSourceName, evokerSourceFlags, true)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if (evokerActor) then
|
|
|
|
|
evokerActor.total_extra = (evokerActor.total_extra or 0) + amount
|
|
|
|
|
local extraSpellId = 404908
|
|
|
|
|
evokerActor.augmentedSpellsContainer = evokerActor.augmentedSpellsContainer or spellContainerClass:CreateSpellContainer(Details.container_type.CONTAINER_DAMAGE_CLASS)
|
|
|
|
|
local augmentedSpell = evokerActor.augmentedSpellsContainer._ActorTable[extraSpellId]
|
|
|
|
|
if (not augmentedSpell) then
|
|
|
|
|
augmentedSpell = evokerActor.augmentedSpellsContainer:GetOrCreateSpell(extraSpellId, true, token)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
evokerActor.total_extra = evokerActor.total_extra + amount
|
|
|
|
|
|
|
|
|
|
augmentedSpell.total = augmentedSpell.total + amount
|
|
|
|
|
augmentedSpell.targets[sourceName] = (augmentedSpell.targets[sourceName] or 0) + amount
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
@@ -1348,18 +1393,27 @@
|
|
|
|
|
|
|
|
|
|
---@type actor
|
|
|
|
|
local evokerActor = damage_cache[evokerSourceSerial]
|
|
|
|
|
|
|
|
|
|
if (not evokerActor) then
|
|
|
|
|
evokerActor = _current_damage_container:GetOrCreateActor(evokerSourceSerial, evokerSourceName, evokerSourceFlags, true)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if (evokerActor) then
|
|
|
|
|
evokerActor.total_extra = (evokerActor.total_extra or 0) + amount
|
|
|
|
|
local extraSpellId = 410265
|
|
|
|
|
evokerActor.augmentedSpellsContainer = evokerActor.augmentedSpellsContainer or spellContainerClass:CreateSpellContainer(Details.container_type.CONTAINER_DAMAGE_CLASS)
|
|
|
|
|
local augmentedSpell = evokerActor.augmentedSpellsContainer._ActorTable[extraSpellId]
|
|
|
|
|
if (not augmentedSpell) then
|
|
|
|
|
augmentedSpell = evokerActor.augmentedSpellsContainer:GetOrCreateSpell(extraSpellId, true, token)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
evokerActor.total_extra = evokerActor.total_extra + amount
|
|
|
|
|
|
|
|
|
|
augmentedSpell.total = augmentedSpell.total + amount
|
|
|
|
|
augmentedSpell.targets[sourceName] = (augmentedSpell.targets[sourceName] or 0) + amount
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if (spellId == 409632) then
|
|
|
|
|
if (spellId == 409632 and sourceName ~= Details.playername) then
|
|
|
|
|
local breathTargets = augmentation_cache.breath_targets
|
|
|
|
|
|
|
|
|
|
---@type evokereonsbreathinfo[]
|
|
|
|
@@ -1381,13 +1435,22 @@
|
|
|
|
|
|
|
|
|
|
---@type actor
|
|
|
|
|
local evokerActor = damage_cache[evokerSerial]
|
|
|
|
|
|
|
|
|
|
if (not evokerActor) then
|
|
|
|
|
evokerActor = _current_damage_container:GetOrCreateActor(evokerSerial, evokerName, evokerFlags, true)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if (evokerActor) then
|
|
|
|
|
evokerActor.total_extra = (evokerActor.total_extra or 0) + amount
|
|
|
|
|
local extraSpellId = 409632
|
|
|
|
|
evokerActor.augmentedSpellsContainer = evokerActor.augmentedSpellsContainer or spellContainerClass:CreateSpellContainer(Details.container_type.CONTAINER_DAMAGE_CLASS)
|
|
|
|
|
local augmentedSpell = evokerActor.augmentedSpellsContainer._ActorTable[extraSpellId]
|
|
|
|
|
if (not augmentedSpell) then
|
|
|
|
|
augmentedSpell = evokerActor.augmentedSpellsContainer:GetOrCreateSpell(extraSpellId, true, token)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
evokerActor.total_extra = evokerActor.total_extra + amount
|
|
|
|
|
|
|
|
|
|
augmentedSpell.total = augmentedSpell.total + amount
|
|
|
|
|
augmentedSpell.targets[sourceName] = (augmentedSpell.targets[sourceName] or 0) + amount
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
@@ -1427,7 +1490,7 @@
|
|
|
|
|
--actor spells table
|
|
|
|
|
local spellTable = sourceActor.spells._ActorTable[spellId]
|
|
|
|
|
if (not spellTable) then
|
|
|
|
|
spellTable = sourceActor.spells:PegaHabilidade(spellId, true, token)
|
|
|
|
|
spellTable = sourceActor.spells:GetOrCreateSpell(spellId, true, token)
|
|
|
|
|
spellTable.spellschool = spellType or school
|
|
|
|
|
if (_current_combat.is_boss and sourceFlags and bitBand(sourceFlags, OBJECT_TYPE_ENEMY) ~= 0) then
|
|
|
|
|
Details.spell_school_cache[spellName] = spellType or school
|
|
|
|
@@ -1997,7 +2060,7 @@
|
|
|
|
|
--actor spells table
|
|
|
|
|
local spell = sourceActor.spells._ActorTable[spellId]
|
|
|
|
|
if (not spell) then
|
|
|
|
|
spell = sourceActor.spells:PegaHabilidade(spellId, true, token)
|
|
|
|
|
spell = sourceActor.spells:GetOrCreateSpell(spellId, true, token)
|
|
|
|
|
spell.spellschool = spellType
|
|
|
|
|
if (_current_combat.is_boss and sourceFlags and bitBand(sourceFlags, OBJECT_TYPE_ENEMY) ~= 0) then
|
|
|
|
|
Details.spell_school_cache[spellName] = spellType
|
|
|
|
@@ -2189,7 +2252,7 @@
|
|
|
|
|
--actor spells table
|
|
|
|
|
local spell = sourceActor.spells._ActorTable[spellIdAbsorb]
|
|
|
|
|
if (not spell) then
|
|
|
|
|
spell = sourceActor.spells:PegaHabilidade(spellIdAbsorb, true, token)
|
|
|
|
|
spell = sourceActor.spells:GetOrCreateSpell(spellIdAbsorb, true, token)
|
|
|
|
|
if (_current_combat.is_boss and sourceFlags and bitBand(sourceFlags, OBJECT_TYPE_ENEMY) ~= 0) then
|
|
|
|
|
Details.spell_school_cache[spellNameAbsorb] = spellSchoolAbsorb or 1
|
|
|
|
|
end
|
|
|
|
@@ -2517,7 +2580,7 @@
|
|
|
|
|
--actor spells table
|
|
|
|
|
local spellTable = sourceActor.spells._ActorTable[spellId]
|
|
|
|
|
if (not spellTable) then
|
|
|
|
|
spellTable = sourceActor.spells:PegaHabilidade(spellId, true, token)
|
|
|
|
|
spellTable = sourceActor.spells:GetOrCreateSpell(spellId, true, token)
|
|
|
|
|
if (bIsShield) then
|
|
|
|
|
spellTable.is_shield = true
|
|
|
|
|
end
|
|
|
|
@@ -2609,7 +2672,7 @@
|
|
|
|
|
|
|
|
|
|
local spell = este_jogador.spells._ActorTable [spellid]
|
|
|
|
|
if (not spell) then
|
|
|
|
|
spell = este_jogador.spells:PegaHabilidade (spellid, true, token)
|
|
|
|
|
spell = este_jogador.spells:GetOrCreateSpell(spellid, true, token)
|
|
|
|
|
spell.neutral = true
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
@@ -2635,70 +2698,72 @@
|
|
|
|
|
sourceSerial = ""
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if (spellId == 395152) then --~roskash
|
|
|
|
|
augmentation_cache.ebon_might[targetSerial] = augmentation_cache.ebon_might[targetSerial] or {}
|
|
|
|
|
---@type evokerinfo
|
|
|
|
|
local evokerInfo = {sourceSerial, sourceName, sourceFlags, amount}
|
|
|
|
|
table.insert(augmentation_cache.ebon_might[targetSerial], evokerInfo)
|
|
|
|
|
if (special_buffs_spells[spellId]) then
|
|
|
|
|
if (spellId == 395152) then --~roskash
|
|
|
|
|
augmentation_cache.ebon_might[targetSerial] = augmentation_cache.ebon_might[targetSerial] or {}
|
|
|
|
|
---@type evokerinfo
|
|
|
|
|
local evokerInfo = {sourceSerial, sourceName, sourceFlags, amount}
|
|
|
|
|
table.insert(augmentation_cache.ebon_might[targetSerial], evokerInfo)
|
|
|
|
|
|
|
|
|
|
elseif (spellId == 413984) then --ss
|
|
|
|
|
--print("ss de ", sourceName, "em:", targetName)
|
|
|
|
|
if (UnitExists(targetName) and not UnitIsUnit("player", targetName)) then
|
|
|
|
|
--print("ss validou!")
|
|
|
|
|
local auraName, texture, count, auraType, duration, expirationTime, sourceUnit, isStealable, nameplateShowPersonal, spellId, canApplyAura, isBossAura, isFromPlayerOrPlayerPet, nameplateShowAll, timeMod, v1, v2, v3, v4, v5 = Details:FindBuffCastedBy(targetName, spellId, sourceName)
|
|
|
|
|
--dumpt({auraName, texture, count, auraType, duration, expirationTime, sourceUnit, isStealable, nameplateShowPersonal, spellId, canApplyAura, isBossAura, isFromPlayerOrPlayerPet, nameplateShowAll, timeMod, v1, v2, v3, v4, v5})
|
|
|
|
|
local versaGained = v1
|
|
|
|
|
if (type(versaGained) == "number") then
|
|
|
|
|
--print("tem versa: ", versaGained)
|
|
|
|
|
augmentation_cache.ss[targetSerial] = augmentation_cache.ss[targetSerial] or {}
|
|
|
|
|
local ssInfo = {sourceSerial, sourceName, sourceFlags, versaGained}
|
|
|
|
|
table.insert(augmentation_cache.ss[targetSerial], ssInfo)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
elseif (spellId == 410089) then
|
|
|
|
|
augmentation_cache.prescience[targetSerial] = augmentation_cache.prescience[targetSerial] or {}
|
|
|
|
|
---@type evokerinfo
|
|
|
|
|
local evokerInfo = {sourceSerial, sourceName, sourceFlags, amount}
|
|
|
|
|
table.insert(augmentation_cache.prescience[targetSerial], evokerInfo)
|
|
|
|
|
|
|
|
|
|
elseif (spellId == 409560) then
|
|
|
|
|
local unitIDAffected = Details:FindUnitIDByUnitSerial(targetSerial)
|
|
|
|
|
if (unitIDAffected) then
|
|
|
|
|
local duration, expirationTime = Details:FindDebuffDuration(unitIDAffected, spellId, sourceName)
|
|
|
|
|
if (duration) then
|
|
|
|
|
local breathTargets = augmentation_cache.breath_targets[targetSerial]
|
|
|
|
|
if (not breathTargets) then
|
|
|
|
|
augmentation_cache.breath_targets[targetSerial] = {}
|
|
|
|
|
breathTargets = augmentation_cache.breath_targets[targetSerial]
|
|
|
|
|
elseif (spellId == 413984) then --ss
|
|
|
|
|
--print("ss de ", sourceName, "em:", targetName)
|
|
|
|
|
if (UnitExists(targetName) and not UnitIsUnit("player", targetName)) then
|
|
|
|
|
--print("ss validou!")
|
|
|
|
|
local auraName, texture, count, auraType, duration, expirationTime, sourceUnit, isStealable, nameplateShowPersonal, spellId, canApplyAura, isBossAura, isFromPlayerOrPlayerPet, nameplateShowAll, timeMod, v1, v2, v3, v4, v5 = Details:FindBuffCastedBy(targetName, spellId, sourceName)
|
|
|
|
|
--dumpt({auraName, texture, count, auraType, duration, expirationTime, sourceUnit, isStealable, nameplateShowPersonal, spellId, canApplyAura, isBossAura, isFromPlayerOrPlayerPet, nameplateShowAll, timeMod, v1, v2, v3, v4, v5})
|
|
|
|
|
local versaGained = v1
|
|
|
|
|
if (type(versaGained) == "number") then
|
|
|
|
|
--print("tem versa: ", versaGained)
|
|
|
|
|
augmentation_cache.ss[targetSerial] = augmentation_cache.ss[targetSerial] or {}
|
|
|
|
|
local ssInfo = {sourceSerial, sourceName, sourceFlags, versaGained}
|
|
|
|
|
table.insert(augmentation_cache.ss[targetSerial], ssInfo)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
--evoker serial, evoker name, evoker flags, target unitID, unixtime, duration, expirationTime (GetTime + duration)
|
|
|
|
|
---@type evokereonsbreathinfo
|
|
|
|
|
local eonsBreathInfo = {sourceSerial, sourceName, sourceFlags, unitIDAffected, time, duration, expirationTime}
|
|
|
|
|
table.insert(breathTargets, eonsBreathInfo)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
elseif (spellId == 410089) then
|
|
|
|
|
augmentation_cache.prescience[targetSerial] = augmentation_cache.prescience[targetSerial] or {}
|
|
|
|
|
---@type evokerinfo
|
|
|
|
|
local evokerInfo = {sourceSerial, sourceName, sourceFlags, amount}
|
|
|
|
|
table.insert(augmentation_cache.prescience[targetSerial], evokerInfo)
|
|
|
|
|
|
|
|
|
|
elseif (spellId == 409560) then
|
|
|
|
|
local unitIDAffected = Details:FindUnitIDByUnitSerial(targetSerial)
|
|
|
|
|
if (unitIDAffected) then
|
|
|
|
|
local duration, expirationTime = Details:FindDebuffDuration(unitIDAffected, spellId, sourceName)
|
|
|
|
|
if (duration) then
|
|
|
|
|
local breathTargets = augmentation_cache.breath_targets[targetSerial]
|
|
|
|
|
if (not breathTargets) then
|
|
|
|
|
augmentation_cache.breath_targets[targetSerial] = {}
|
|
|
|
|
breathTargets = augmentation_cache.breath_targets[targetSerial]
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
--evoker serial, evoker name, evoker flags, target unitID, unixtime, duration, expirationTime (GetTime + duration)
|
|
|
|
|
---@type evokereonsbreathinfo
|
|
|
|
|
local eonsBreathInfo = {sourceSerial, sourceName, sourceFlags, unitIDAffected, time, duration, expirationTime}
|
|
|
|
|
table.insert(breathTargets, eonsBreathInfo)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
elseif (spellId == 360827) then
|
|
|
|
|
augmentation_cache.shield[targetSerial] = augmentation_cache.shield[targetSerial] or {}
|
|
|
|
|
---@type evokerinfo
|
|
|
|
|
local evokerInfo = {sourceSerial, sourceName, sourceFlags, amount}
|
|
|
|
|
table.insert(augmentation_cache.shield[targetSerial], evokerInfo)
|
|
|
|
|
|
|
|
|
|
elseif (spellId == 410263) then
|
|
|
|
|
augmentation_cache.infernobless[targetSerial] = augmentation_cache.infernobless[targetSerial] or {}
|
|
|
|
|
---@type evokerinfo
|
|
|
|
|
local evokerInfo = {sourceSerial, sourceName, sourceFlags}
|
|
|
|
|
table.insert(augmentation_cache.infernobless[targetSerial], evokerInfo)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
elseif (spellId == 360827) then
|
|
|
|
|
augmentation_cache.shield[targetSerial] = augmentation_cache.shield[targetSerial] or {}
|
|
|
|
|
---@type evokerinfo
|
|
|
|
|
local evokerInfo = {sourceSerial, sourceName, sourceFlags, amount}
|
|
|
|
|
table.insert(augmentation_cache.shield[targetSerial], evokerInfo)
|
|
|
|
|
|
|
|
|
|
elseif (spellId == 410263) then
|
|
|
|
|
augmentation_cache.infernobless[targetSerial] = augmentation_cache.infernobless[targetSerial] or {}
|
|
|
|
|
---@type evokerinfo
|
|
|
|
|
local evokerInfo = {sourceSerial, sourceName, sourceFlags}
|
|
|
|
|
table.insert(augmentation_cache.infernobless[targetSerial], evokerInfo)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if (buffs_makeyourown[spellId]) then
|
|
|
|
|
sourceSerial, sourceName, sourceFlags = targetSerial, targetName, targetFlags
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------------
|
|
|
|
|
--spell reflection
|
|
|
|
|
------------------------------------------------------------------------------------------------
|
|
|
|
|
--spell reflection
|
|
|
|
|
if (reflection_spellid[spellId]) then --~reflect
|
|
|
|
|
--this is a spell reflect aura
|
|
|
|
|
--we save the info on who received this aura and from whom
|
|
|
|
@@ -2893,7 +2958,7 @@
|
|
|
|
|
|
|
|
|
|
if (not sourceActor.cc_done) then
|
|
|
|
|
sourceActor.cc_done = Details:GetOrderNumber()
|
|
|
|
|
sourceActor.cc_done_spells = container_habilidades:NovoContainer(container_misc)
|
|
|
|
|
sourceActor.cc_done_spells = spellContainerClass:CreateSpellContainer(container_misc)
|
|
|
|
|
sourceActor.cc_done_targets = {}
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
@@ -2904,7 +2969,7 @@
|
|
|
|
|
--actor spells table
|
|
|
|
|
local spellTable = sourceActor.cc_done_spells._ActorTable[spellId]
|
|
|
|
|
if (not spellTable) then
|
|
|
|
|
spellTable = sourceActor.cc_done_spells:PegaHabilidade(spellId, true)
|
|
|
|
|
spellTable = sourceActor.cc_done_spells:GetOrCreateSpell(spellId, true)
|
|
|
|
|
end
|
|
|
|
|
spellTable.targets[targetName] = (spellTable.targets[targetName] or 0) + 1
|
|
|
|
|
spellTable.counter = spellTable.counter + 1
|
|
|
|
@@ -2913,7 +2978,7 @@
|
|
|
|
|
if (ownerActor) then
|
|
|
|
|
if (not ownerActor.cc_done) then
|
|
|
|
|
ownerActor.cc_done = Details:GetOrderNumber()
|
|
|
|
|
ownerActor.cc_done_spells = container_habilidades:NovoContainer(container_misc)
|
|
|
|
|
ownerActor.cc_done_spells = spellContainerClass:CreateSpellContainer(container_misc)
|
|
|
|
|
ownerActor.cc_done_targets = {}
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
@@ -2924,7 +2989,7 @@
|
|
|
|
|
--actor spells table
|
|
|
|
|
local ownerSpellTable = ownerActor.cc_done_spells._ActorTable[spellId]
|
|
|
|
|
if (not ownerSpellTable) then
|
|
|
|
|
ownerSpellTable = ownerActor.cc_done_spells:PegaHabilidade(spellId, true)
|
|
|
|
|
ownerSpellTable = ownerActor.cc_done_spells:GetOrCreateSpell(spellId, true)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
ownerSpellTable.targets[targetName] = (ownerSpellTable.targets[targetName] or 0) + 1
|
|
|
|
@@ -2981,60 +3046,62 @@
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if (spellid == 395152) then --~roskash
|
|
|
|
|
local bFound = false
|
|
|
|
|
augmentation_cache.ebon_might[targetSerial] = augmentation_cache.ebon_might[targetSerial] or {}
|
|
|
|
|
if (special_buffs_spells[spellid]) then
|
|
|
|
|
if (spellid == 395152) then --~roskash
|
|
|
|
|
local bFound = false
|
|
|
|
|
augmentation_cache.ebon_might[targetSerial] = augmentation_cache.ebon_might[targetSerial] or {}
|
|
|
|
|
|
|
|
|
|
for index, evokerInfo in ipairs(augmentation_cache.ebon_might[targetSerial]) do
|
|
|
|
|
if (evokerInfo[1] == sourceSerial) then
|
|
|
|
|
evokerInfo[4] = amount
|
|
|
|
|
bFound = true
|
|
|
|
|
break
|
|
|
|
|
for index, evokerInfo in ipairs(augmentation_cache.ebon_might[targetSerial]) do
|
|
|
|
|
if (evokerInfo[1] == sourceSerial) then
|
|
|
|
|
evokerInfo[4] = amount
|
|
|
|
|
bFound = true
|
|
|
|
|
break
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if (not bFound) then
|
|
|
|
|
table.insert(augmentation_cache.ebon_might[targetSerial], {sourceSerial, sourceName, sourceFlags, amount})
|
|
|
|
|
end
|
|
|
|
|
if (not bFound) then
|
|
|
|
|
table.insert(augmentation_cache.ebon_might[targetSerial], {sourceSerial, sourceName, sourceFlags, amount})
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
elseif (spellid == 413984) then --ss
|
|
|
|
|
if (UnitExists(targetName) and not UnitIsUnit("player", targetName)) then
|
|
|
|
|
local auraName, texture, count, auraType, duration, expirationTime, sourceUnit, isStealable, nameplateShowPersonal, spellId, canApplyAura, isBossAura, isFromPlayerOrPlayerPet, nameplateShowAll, timeMod, v1, v2, v3, v4, v5 = Details:FindBuffCastedBy(targetName, spellid, sourceName)
|
|
|
|
|
local versaGained = v1
|
|
|
|
|
elseif (spellid == 413984) then --ss
|
|
|
|
|
if (UnitExists(targetName) and not UnitIsUnit("player", targetName)) then
|
|
|
|
|
local auraName, texture, count, auraType, duration, expirationTime, sourceUnit, isStealable, nameplateShowPersonal, spellId, canApplyAura, isBossAura, isFromPlayerOrPlayerPet, nameplateShowAll, timeMod, v1, v2, v3, v4, v5 = Details:FindBuffCastedBy(targetName, spellid, sourceName)
|
|
|
|
|
local versaGained = v1
|
|
|
|
|
|
|
|
|
|
if (type(versaGained) == "number") then
|
|
|
|
|
local bFound = false
|
|
|
|
|
augmentation_cache.ss[targetSerial] = augmentation_cache.ss[targetSerial] or {}
|
|
|
|
|
if (type(versaGained) == "number") then
|
|
|
|
|
local bFound = false
|
|
|
|
|
augmentation_cache.ss[targetSerial] = augmentation_cache.ss[targetSerial] or {}
|
|
|
|
|
|
|
|
|
|
for index, evokerInfo in ipairs(augmentation_cache.ss[targetSerial]) do
|
|
|
|
|
if (evokerInfo[1] == sourceSerial) then
|
|
|
|
|
evokerInfo[4] = versaGained
|
|
|
|
|
bFound = true
|
|
|
|
|
break
|
|
|
|
|
for index, evokerInfo in ipairs(augmentation_cache.ss[targetSerial]) do
|
|
|
|
|
if (evokerInfo[1] == sourceSerial) then
|
|
|
|
|
evokerInfo[4] = versaGained
|
|
|
|
|
bFound = true
|
|
|
|
|
break
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if (not bFound) then
|
|
|
|
|
table.insert(augmentation_cache.ss[targetSerial], {sourceSerial, sourceName, sourceFlags, versaGained})
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if (not bFound) then
|
|
|
|
|
table.insert(augmentation_cache.ss[targetSerial], {sourceSerial, sourceName, sourceFlags, versaGained})
|
|
|
|
|
elseif (spellid == 410089) then
|
|
|
|
|
local bFound = false
|
|
|
|
|
augmentation_cache.prescience[targetSerial] = augmentation_cache.prescience[targetSerial] or {}
|
|
|
|
|
|
|
|
|
|
for index, evokerInfo in ipairs(augmentation_cache.prescience[targetSerial]) do
|
|
|
|
|
if (evokerInfo[1] == sourceSerial) then
|
|
|
|
|
evokerInfo[4] = amount
|
|
|
|
|
bFound = true
|
|
|
|
|
break
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
elseif (spellid == 410089) then
|
|
|
|
|
local bFound = false
|
|
|
|
|
augmentation_cache.prescience[targetSerial] = augmentation_cache.prescience[targetSerial] or {}
|
|
|
|
|
|
|
|
|
|
for index, evokerInfo in ipairs(augmentation_cache.prescience[targetSerial]) do
|
|
|
|
|
if (evokerInfo[1] == sourceSerial) then
|
|
|
|
|
evokerInfo[4] = amount
|
|
|
|
|
bFound = true
|
|
|
|
|
break
|
|
|
|
|
if (not bFound) then
|
|
|
|
|
table.insert(augmentation_cache.prescience[targetSerial], {sourceSerial, sourceName, sourceFlags, amount})
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if (not bFound) then
|
|
|
|
|
table.insert(augmentation_cache.prescience[targetSerial], {sourceSerial, sourceName, sourceFlags, amount})
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if (buffs_makeyourown[spellid]) then
|
|
|
|
@@ -3110,52 +3177,54 @@
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if (tipo == "BUFF") then
|
|
|
|
|
if (spellid == 395152) then --~roskash
|
|
|
|
|
if (augmentation_cache.ebon_might[targetSerial]) then
|
|
|
|
|
for index, evokerInfo in ipairs(augmentation_cache.ebon_might[targetSerial]) do
|
|
|
|
|
if (evokerInfo[1] == sourceSerial) then
|
|
|
|
|
table.remove(augmentation_cache.ebon_might[targetSerial], index)
|
|
|
|
|
break
|
|
|
|
|
if (special_buffs_spells[spellid]) then
|
|
|
|
|
if (spellid == 395152) then --~roskash
|
|
|
|
|
if (augmentation_cache.ebon_might[targetSerial]) then
|
|
|
|
|
for index, evokerInfo in ipairs(augmentation_cache.ebon_might[targetSerial]) do
|
|
|
|
|
if (evokerInfo[1] == sourceSerial) then
|
|
|
|
|
table.remove(augmentation_cache.ebon_might[targetSerial], index)
|
|
|
|
|
break
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
elseif (spellid == 413984) then
|
|
|
|
|
if (augmentation_cache.ss[targetSerial]) then
|
|
|
|
|
for index, evokerInfo in ipairs(augmentation_cache.ss[targetSerial]) do
|
|
|
|
|
if (evokerInfo[1] == sourceSerial) then
|
|
|
|
|
table.remove(augmentation_cache.ss[targetSerial], index)
|
|
|
|
|
break
|
|
|
|
|
elseif (spellid == 413984) then
|
|
|
|
|
if (augmentation_cache.ss[targetSerial]) then
|
|
|
|
|
for index, evokerInfo in ipairs(augmentation_cache.ss[targetSerial]) do
|
|
|
|
|
if (evokerInfo[1] == sourceSerial) then
|
|
|
|
|
table.remove(augmentation_cache.ss[targetSerial], index)
|
|
|
|
|
break
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
elseif (spellid == 410089) then
|
|
|
|
|
if (augmentation_cache.prescience[targetSerial]) then
|
|
|
|
|
for index, evokerInfo in ipairs(augmentation_cache.prescience[targetSerial]) do
|
|
|
|
|
if (evokerInfo[1] == sourceSerial) then
|
|
|
|
|
table.remove(augmentation_cache.prescience[targetSerial], index)
|
|
|
|
|
break
|
|
|
|
|
elseif (spellid == 410089) then
|
|
|
|
|
if (augmentation_cache.prescience[targetSerial]) then
|
|
|
|
|
for index, evokerInfo in ipairs(augmentation_cache.prescience[targetSerial]) do
|
|
|
|
|
if (evokerInfo[1] == sourceSerial) then
|
|
|
|
|
table.remove(augmentation_cache.prescience[targetSerial], index)
|
|
|
|
|
break
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
elseif (spellid == 360827) then
|
|
|
|
|
if (augmentation_cache.shield[targetSerial]) then
|
|
|
|
|
for index, evokerInfo in ipairs(augmentation_cache.shield[targetSerial]) do
|
|
|
|
|
if (evokerInfo[1] == sourceSerial) then
|
|
|
|
|
table.remove(augmentation_cache.shield[targetSerial], index)
|
|
|
|
|
break
|
|
|
|
|
elseif (spellid == 360827) then
|
|
|
|
|
if (augmentation_cache.shield[targetSerial]) then
|
|
|
|
|
for index, evokerInfo in ipairs(augmentation_cache.shield[targetSerial]) do
|
|
|
|
|
if (evokerInfo[1] == sourceSerial) then
|
|
|
|
|
table.remove(augmentation_cache.shield[targetSerial], index)
|
|
|
|
|
break
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
elseif (spellid == 410263) then
|
|
|
|
|
if (augmentation_cache.infernobless[targetSerial]) then
|
|
|
|
|
for index, evokerInfo in ipairs(augmentation_cache.infernobless[targetSerial]) do
|
|
|
|
|
if (evokerInfo[1] == sourceSerial) then
|
|
|
|
|
table.remove(augmentation_cache.infernobless[targetSerial], index)
|
|
|
|
|
break
|
|
|
|
|
elseif (spellid == 410263) then
|
|
|
|
|
if (augmentation_cache.infernobless[targetSerial]) then
|
|
|
|
|
for index, evokerInfo in ipairs(augmentation_cache.infernobless[targetSerial]) do
|
|
|
|
|
if (evokerInfo[1] == sourceSerial) then
|
|
|
|
|
table.remove(augmentation_cache.infernobless[targetSerial], index)
|
|
|
|
|
break
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
@@ -3189,7 +3258,7 @@
|
|
|
|
|
--BfA monk talent
|
|
|
|
|
if (monk_guard_talent [sourceSerial]) then
|
|
|
|
|
local damage_prevented = monk_guard_talent [sourceSerial] - (amount or 0)
|
|
|
|
|
parser:heal (token, time, sourceSerial, sourceName, sourceFlags, targetSerial, targetName, targetFlags, targetFlags2, spellid, spellName, spellSchool, damage_prevented, ceil (amount or 0), 0, 0, true)
|
|
|
|
|
parser:heal(token, time, sourceSerial, sourceName, sourceFlags, targetSerial, targetName, targetFlags, targetFlags2, spellid, spellName, spellSchool, damage_prevented, ceil (amount or 0), 0, 0, true)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
elseif (spellid == 388007 or spellid == 388011) then --buff: bleesing of the summer
|
|
|
|
@@ -3313,7 +3382,7 @@
|
|
|
|
|
este_jogador.spellschool = spellschool
|
|
|
|
|
este_jogador.damage_spellid = spellid
|
|
|
|
|
este_jogador.debuff_uptime = 0
|
|
|
|
|
este_jogador.debuff_uptime_spells = container_habilidades:NovoContainer (container_misc)
|
|
|
|
|
este_jogador.debuff_uptime_spells = spellContainerClass:CreateSpellContainer (container_misc)
|
|
|
|
|
este_jogador.debuff_uptime_targets = {}
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
@@ -3458,7 +3527,7 @@
|
|
|
|
|
|
|
|
|
|
if (not este_jogador.debuff_uptime) then
|
|
|
|
|
este_jogador.debuff_uptime = 0
|
|
|
|
|
este_jogador.debuff_uptime_spells = container_habilidades:NovoContainer (container_misc)
|
|
|
|
|
este_jogador.debuff_uptime_spells = spellContainerClass:CreateSpellContainer (container_misc)
|
|
|
|
|
este_jogador.debuff_uptime_targets = {}
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
@@ -3471,7 +3540,7 @@
|
|
|
|
|
--actor spells table
|
|
|
|
|
local spell = este_jogador.debuff_uptime_spells._ActorTable [spellid]
|
|
|
|
|
if (not spell) then
|
|
|
|
|
spell = este_jogador.debuff_uptime_spells:PegaHabilidade (spellid, true, "DEBUFF_UPTIME")
|
|
|
|
|
spell = este_jogador.debuff_uptime_spells:GetOrCreateSpell(spellid, true, "DEBUFF_UPTIME")
|
|
|
|
|
end
|
|
|
|
|
return _spell_utility_func (spell, alvo_serial, alvo_name, alvo_flags, who_name, este_jogador, "BUFF_OR_DEBUFF", in_out)
|
|
|
|
|
|
|
|
|
@@ -3488,7 +3557,7 @@
|
|
|
|
|
--get actors
|
|
|
|
|
local este_jogador = misc_cache [who_name]
|
|
|
|
|
if (not este_jogador) then --pode ser um desconhecido ou um pet
|
|
|
|
|
este_jogador = _current_misc_container:GetOrCreateActor (who_serial, who_name, who_flags, true)
|
|
|
|
|
este_jogador = _current_misc_container:GetOrCreateActor(who_serial, who_name, who_flags, true)
|
|
|
|
|
misc_cache [who_name] = este_jogador
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
@@ -3497,7 +3566,7 @@
|
|
|
|
|
|
|
|
|
|
if (not este_jogador.buff_uptime) then
|
|
|
|
|
este_jogador.buff_uptime = 0
|
|
|
|
|
este_jogador.buff_uptime_spells = container_habilidades:NovoContainer (container_misc)
|
|
|
|
|
este_jogador.buff_uptime_spells = spellContainerClass:CreateSpellContainer(container_misc)
|
|
|
|
|
este_jogador.buff_uptime_targets = {}
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
@@ -3510,7 +3579,7 @@
|
|
|
|
|
--actor spells table
|
|
|
|
|
local spell = este_jogador.buff_uptime_spells._ActorTable [spellid]
|
|
|
|
|
if (not spell) then
|
|
|
|
|
spell = este_jogador.buff_uptime_spells:PegaHabilidade (spellid, true, "BUFF_UPTIME")
|
|
|
|
|
spell = este_jogador.buff_uptime_spells:GetOrCreateSpell(spellid, true, "BUFF_UPTIME")
|
|
|
|
|
end
|
|
|
|
|
return _spell_utility_func (spell, alvo_serial, alvo_name, alvo_flags, who_name, este_jogador, "BUFF_OR_DEBUFF", in_out)
|
|
|
|
|
|
|
|
|
@@ -3768,7 +3837,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
|
|
|
|
--actor spells table
|
|
|
|
|
local spellTable = sourceActor.spells._ActorTable[spellId]
|
|
|
|
|
if (not spellTable) then
|
|
|
|
|
spellTable = sourceActor.spells:PegaHabilidade(spellId, true, token)
|
|
|
|
|
spellTable = sourceActor.spells:GetOrCreateSpell(spellId, true, token)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
--return spell:Add (alvo_serial, alvo_name, alvo_flags, amount, who_name, powertype)
|
|
|
|
@@ -3809,7 +3878,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
|
|
|
|
if (not sourceActor.cooldowns_defensive) then
|
|
|
|
|
sourceActor.cooldowns_defensive = Details:GetOrderNumber(sourceName)
|
|
|
|
|
sourceActor.cooldowns_defensive_targets = {}
|
|
|
|
|
sourceActor.cooldowns_defensive_spells = container_habilidades:NovoContainer(container_misc)
|
|
|
|
|
sourceActor.cooldowns_defensive_spells = spellContainerClass:CreateSpellContainer(container_misc)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
--local targetActor, targetOwner = damage_cache[targetSerial] or damage_cache_pets[targetSerial] or damage_cache[targetName], damage_cache_petsOwners[targetSerial]
|
|
|
|
@@ -3875,7 +3944,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
|
|
|
|
--actor spells table
|
|
|
|
|
local spellTable = sourceActor.cooldowns_defensive_spells._ActorTable[spellId]
|
|
|
|
|
if (not spellTable) then
|
|
|
|
|
spellTable = sourceActor.cooldowns_defensive_spells:PegaHabilidade(spellId, true, token)
|
|
|
|
|
spellTable = sourceActor.cooldowns_defensive_spells:GetOrCreateSpell(spellId, true, token)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if (_hook_cooldowns) then
|
|
|
|
@@ -3891,7 +3960,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
|
|
|
|
return _spell_utility_func(spellTable, targetSerial, targetName, targetFlags, sourceName, token, "BUFF_OR_DEBUFF", "COOLDOWN")
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
--serach key: ~interrupts
|
|
|
|
|
--serach key: ~interrupt
|
|
|
|
|
---comment: this function is called when a spell is interrupted
|
|
|
|
|
---@param token string
|
|
|
|
|
---@param time unixtime
|
|
|
|
@@ -3939,7 +4008,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
|
|
|
|
if (not sourceActor.interrupt) then
|
|
|
|
|
sourceActor.interrupt = Details:GetOrderNumber()
|
|
|
|
|
sourceActor.interrupt_targets = {}
|
|
|
|
|
sourceActor.interrupt_spells = container_habilidades:NovoContainer(container_misc)
|
|
|
|
|
sourceActor.interrupt_spells = spellContainerClass:CreateSpellContainer(container_misc)
|
|
|
|
|
sourceActor.interrompeu_oque = {}
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
@@ -3968,7 +4037,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
|
|
|
|
--actor spells table
|
|
|
|
|
local spell = sourceActor.interrupt_spells._ActorTable[spellId]
|
|
|
|
|
if (not spell) then
|
|
|
|
|
spell = sourceActor.interrupt_spells:PegaHabilidade(spellId, true, token)
|
|
|
|
|
spell = sourceActor.interrupt_spells:GetOrCreateSpell(spellId, true, token)
|
|
|
|
|
end
|
|
|
|
|
_spell_utility_func(spell, targetSerial, targetName, targetFlags, sourceName, token, extraSpellID, extraSpellName)
|
|
|
|
|
|
|
|
|
@@ -3977,7 +4046,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
|
|
|
|
if (not ownerActor.interrupt) then
|
|
|
|
|
ownerActor.interrupt = Details:GetOrderNumber(sourceName)
|
|
|
|
|
ownerActor.interrupt_targets = {}
|
|
|
|
|
ownerActor.interrupt_spells = container_habilidades:NovoContainer(container_misc)
|
|
|
|
|
ownerActor.interrupt_spells = spellContainerClass:CreateSpellContainer(container_misc)
|
|
|
|
|
ownerActor.interrompeu_oque = {}
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
@@ -4111,7 +4180,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
|
|
|
|
---@type spelltable
|
|
|
|
|
local spellTable = enemyActorObject.spells._ActorTable[spellId]
|
|
|
|
|
if (not spellTable) then
|
|
|
|
|
spellTable = enemyActorObject.spells:PegaHabilidade(spellId, true, token)
|
|
|
|
|
spellTable = enemyActorObject.spells:GetOrCreateSpell(spellId, true, token)
|
|
|
|
|
end
|
|
|
|
|
spellTable.successful_casted = spellTable.successful_casted + 1
|
|
|
|
|
end
|
|
|
|
@@ -4174,7 +4243,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
|
|
|
|
sourceActor.dispell_targets = {}
|
|
|
|
|
|
|
|
|
|
---@type spellcontainer
|
|
|
|
|
sourceActor.dispell_spells = container_habilidades:NovoContainer(container_misc)
|
|
|
|
|
sourceActor.dispell_spells = spellContainerClass:CreateSpellContainer(container_misc)
|
|
|
|
|
|
|
|
|
|
---@type table<spellid, number>
|
|
|
|
|
sourceActor.dispell_oque = {}
|
|
|
|
@@ -4220,7 +4289,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
|
|
|
|
---@type spelltable
|
|
|
|
|
local spellTable = sourceActor.dispell_spells._ActorTable[spellId]
|
|
|
|
|
if (not spellTable) then
|
|
|
|
|
spellTable = sourceActor.dispell_spells:PegaHabilidade(spellId, true, token)
|
|
|
|
|
spellTable = sourceActor.dispell_spells:GetOrCreateSpell(spellId, true, token)
|
|
|
|
|
end
|
|
|
|
|
_spell_utility_func(spellTable, targetSerial, targetName, targetFlags, sourceName, token, extraSpellID, extraSpellName)
|
|
|
|
|
|
|
|
|
@@ -4229,7 +4298,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
|
|
|
|
if (not ownerActor.dispell) then
|
|
|
|
|
ownerActor.dispell = Details:GetOrderNumber(sourceName)
|
|
|
|
|
ownerActor.dispell_targets = {}
|
|
|
|
|
ownerActor.dispell_spells = container_habilidades:NovoContainer(container_misc)
|
|
|
|
|
ownerActor.dispell_spells = spellContainerClass:CreateSpellContainer(container_misc)
|
|
|
|
|
ownerActor.dispell_oque = {}
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
@@ -4244,12 +4313,8 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
--serach key: ~ress
|
|
|
|
|
function parser:ress (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname)
|
|
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------------
|
|
|
|
|
--early checks and fixes
|
|
|
|
|
|
|
|
|
|
if (bitBand(who_flags, AFFILIATION_GROUP) == 0) then
|
|
|
|
|
function parser:ress(token, time, sourceSerial, sourceName, sourceFlags, targetSerial, targetName, targetFlags, targetFlags2, spellId, spellName)
|
|
|
|
|
if (bitBand(sourceFlags, AFFILIATION_GROUP) == 0) then
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
@@ -4260,65 +4325,55 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
|
|
|
|
|
|
|
|
|
_current_misc_container.need_refresh = true
|
|
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------------
|
|
|
|
|
--get actors
|
|
|
|
|
|
|
|
|
|
--main actor
|
|
|
|
|
local este_jogador, meu_dono = misc_cache [who_name]
|
|
|
|
|
if (not este_jogador) then --pode ser um desconhecido ou um pet
|
|
|
|
|
este_jogador, meu_dono, who_name = _current_misc_container:GetOrCreateActor (who_serial, who_name, who_flags, true)
|
|
|
|
|
if (not meu_dono) then --se n�o for um pet, add no cache
|
|
|
|
|
misc_cache [who_name] = este_jogador
|
|
|
|
|
local sourceActor, ownerActor = misc_cache[sourceName]
|
|
|
|
|
if (not sourceActor) then
|
|
|
|
|
sourceActor, ownerActor, sourceName = _current_misc_container:GetOrCreateActor(sourceSerial, sourceName, sourceFlags, true)
|
|
|
|
|
if (not ownerActor) then --if not a pet, add no cache
|
|
|
|
|
misc_cache[sourceName] = sourceActor
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------------
|
|
|
|
|
--build containers on the fly
|
|
|
|
|
--update last event
|
|
|
|
|
sourceActor.last_event = _tempo
|
|
|
|
|
|
|
|
|
|
if (not este_jogador.ress) then
|
|
|
|
|
este_jogador.ress = Details:GetOrderNumber(who_name)
|
|
|
|
|
este_jogador.ress_targets = {}
|
|
|
|
|
este_jogador.ress_spells = container_habilidades:NovoContainer (container_misc) --cria o container das habilidades usadas para interromper
|
|
|
|
|
--build containers on the fly
|
|
|
|
|
if (not sourceActor.ress) then
|
|
|
|
|
sourceActor.ress = Details:GetOrderNumber(sourceName)
|
|
|
|
|
sourceActor.ress_targets = {}
|
|
|
|
|
sourceActor.ress_spells = spellContainerClass:CreateSpellContainer(container_misc) --cria o container das habilidades usadas para interromper
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------------
|
|
|
|
|
--add amount
|
|
|
|
|
|
|
|
|
|
--update last event
|
|
|
|
|
este_jogador.last_event = _tempo
|
|
|
|
|
|
|
|
|
|
--combat ress total
|
|
|
|
|
_current_total [4].ress = _current_total [4].ress + 1
|
|
|
|
|
|
|
|
|
|
if (este_jogador.grupo) then
|
|
|
|
|
_current_combat.totals_grupo[4].ress = _current_combat.totals_grupo[4].ress+1
|
|
|
|
|
--add amount
|
|
|
|
|
_current_total[4].ress = _current_total[4].ress + 1
|
|
|
|
|
if (sourceActor.grupo) then
|
|
|
|
|
_current_combat.totals_grupo[4].ress = _current_combat.totals_grupo[4].ress + 1
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
--add ress amount
|
|
|
|
|
este_jogador.ress = este_jogador.ress + 1
|
|
|
|
|
sourceActor.ress = sourceActor.ress + 1
|
|
|
|
|
|
|
|
|
|
--add battle ress
|
|
|
|
|
if (UnitAffectingCombat(who_name)) then
|
|
|
|
|
--procura a �ltima morte do alvo na tabela do combate:
|
|
|
|
|
if (UnitAffectingCombat(sourceName)) then
|
|
|
|
|
--search for the latest death of the target actor
|
|
|
|
|
for i = 1, #_current_combat.last_events_tables do
|
|
|
|
|
if (_current_combat.last_events_tables [i] [3] == alvo_name) then
|
|
|
|
|
|
|
|
|
|
local deadLog = _current_combat.last_events_tables [i] [1]
|
|
|
|
|
if (_current_combat.last_events_tables[i][3] == targetName) then
|
|
|
|
|
local deathLog = _current_combat.last_events_tables[i][1] --deathinfo index 1 = a table with the death log
|
|
|
|
|
local jaTem = false
|
|
|
|
|
for _, evento in ipairs(deadLog) do
|
|
|
|
|
if (evento [1] and not evento[3]) then
|
|
|
|
|
for _, evento in ipairs(deathLog) do
|
|
|
|
|
if (evento[1] and not evento[3]) then
|
|
|
|
|
jaTem = true
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if (not jaTem) then
|
|
|
|
|
tinsert(_current_combat.last_events_tables [i] [1], 1, {
|
|
|
|
|
tinsert(_current_combat.last_events_tables[i][1], 1, {
|
|
|
|
|
2,
|
|
|
|
|
spellid,
|
|
|
|
|
spellId,
|
|
|
|
|
1,
|
|
|
|
|
time,
|
|
|
|
|
UnitHealth (alvo_name),
|
|
|
|
|
who_name
|
|
|
|
|
UnitHealth(targetName),
|
|
|
|
|
sourceName
|
|
|
|
|
})
|
|
|
|
|
break
|
|
|
|
|
end
|
|
|
|
@@ -4327,21 +4382,21 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
|
|
|
|
|
|
|
|
|
if (_hook_battleress) then
|
|
|
|
|
for _, func in ipairs(_hook_battleress_container) do
|
|
|
|
|
func (nil, token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname)
|
|
|
|
|
func (nil, token, time, sourceSerial, sourceName, sourceFlags, targetSerial, targetName, targetFlags, spellId, spellName)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
--actor targets
|
|
|
|
|
este_jogador.ress_targets [alvo_name] = (este_jogador.ress_targets [alvo_name] or 0) + 1
|
|
|
|
|
sourceActor.ress_targets[targetName] = (sourceActor.ress_targets[targetName] or 0) + 1
|
|
|
|
|
|
|
|
|
|
--actor spells table
|
|
|
|
|
local spell = este_jogador.ress_spells._ActorTable [spellid]
|
|
|
|
|
local spell = sourceActor.ress_spells._ActorTable[spellId]
|
|
|
|
|
if (not spell) then
|
|
|
|
|
spell = este_jogador.ress_spells:PegaHabilidade (spellid, true, token)
|
|
|
|
|
spell = sourceActor.ress_spells:GetOrCreateSpell(spellId, true, token)
|
|
|
|
|
end
|
|
|
|
|
return _spell_utility_func (spell, alvo_serial, alvo_name, alvo_flags, who_name, token, extraSpellID, extraSpellName)
|
|
|
|
|
return _spell_utility_func(spell, targetSerial, targetName, targetFlags, sourceName, token)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
--serach key: ~cc
|
|
|
|
@@ -4383,7 +4438,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
|
|
|
|
sourceActor.cc_break_targets = {}
|
|
|
|
|
sourceActor.cc_break_oque = {}
|
|
|
|
|
---@type spellcontainer
|
|
|
|
|
sourceActor.cc_break_spells = container_habilidades:NovoContainer(container_misc)
|
|
|
|
|
sourceActor.cc_break_spells = spellContainerClass:CreateSpellContainer(container_misc)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
sourceActor.last_event = _tempo
|
|
|
|
@@ -4406,7 +4461,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
|
|
|
|
---@type spelltable
|
|
|
|
|
local spellTable = sourceActor.cc_break_spells._ActorTable[extraSpellID]
|
|
|
|
|
if (not spellTable) then
|
|
|
|
|
spellTable = sourceActor.cc_break_spells:PegaHabilidade(extraSpellID, true, token)
|
|
|
|
|
spellTable = sourceActor.cc_break_spells:GetOrCreateSpell(extraSpellID, true, token)
|
|
|
|
|
end
|
|
|
|
|
return _spell_utility_func(spellTable, targetSerial, targetName, targetFlags, sourceName, token, spellId, spellName)
|
|
|
|
|
end
|
|
|
|
|