general fixes for game client versions

This commit is contained in:
Tercio Jose
2021-06-10 12:09:28 -03:00
parent 361264a5f4
commit bd1700b5f1
14 changed files with 577 additions and 94 deletions
+147 -82
View File
@@ -5,6 +5,7 @@
local _tempo = time()
local _
local DetailsFramework = DetailsFramework
local isTBC = DetailsFramework.IsTBCWow()
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> local pointers
@@ -189,54 +190,60 @@
}
--> spellIds override
local override_spellId = {
[184707] = 218617, --warrior rampage
[184709] = 218617, --warrior rampage
[201364] = 218617, --warrior rampage
[201363] = 218617, --warrior rampage
[85384] = 96103, --warrior raging blow
[85288] = 96103, --warrior raging blow
[280849] = 5308, --warrior execute
[163558] = 5308, --warrior execute
[217955] = 5308, --warrior execute
[217956] = 5308, --warrior execute
[217957] = 5308, --warrior execute
[224253] = 5308, --warrior execute
[199850] = 199658, --warrior whirlwind
[190411] = 199658, --warrior whirlwind
[44949] = 199658, --warrior whirlwind
[199667] = 199658, --warrior whirlwind
[199852] = 199658, --warrior whirlwind
[199851] = 199658, --warrior whirlwind
[222031] = 199547, --deamonhunter ChaosStrike
[200685] = 199552, --deamonhunter Blade Dance
[210155] = 210153, --deamonhunter Death Sweep
[227518] = 201428, --deamonhunter Annihilation
[187727] = 178741, --deamonhunter Immolation Aura
[201789] = 201628, --deamonhunter Fury of the Illidari
[225921] = 225919, --deamonhunter Fracture talent
[205164] = 205165, --death knight Crystalline Swords
[193315] = 197834, --rogue Saber Slash
[202822] = 202823, --rogue greed
[280720] = 282449, --rogue Secret Technique
[280719] = 282449, --rogue Secret Technique
[27576] = 5374, --rogue mutilate
[233496] = 233490, --warlock Unstable Affliction
[233497] = 233490, --warlock Unstable Affliction
[233498] = 233490, --warlock Unstable Affliction
[233499] = 233490, --warlock Unstable Affliction
[261947] = 261977, --monk fist of the white tiger talent
local override_spellId
[32175] = 17364, -- shaman Stormstrike (from Turkar on github)
[32176] = 17364, -- shaman Stormstrike
[45284] = 188196, --shaman lightining bolt overloaded
}
if (isTBC) then
override_spellId = {}
else --retail
override_spellId = {
[184707] = 218617, --warrior rampage
[184709] = 218617, --warrior rampage
[201364] = 218617, --warrior rampage
[201363] = 218617, --warrior rampage
[85384] = 96103, --warrior raging blow
[85288] = 96103, --warrior raging blow
[280849] = 5308, --warrior execute
[163558] = 5308, --warrior execute
[217955] = 5308, --warrior execute
[217956] = 5308, --warrior execute
[217957] = 5308, --warrior execute
[224253] = 5308, --warrior execute
[199850] = 199658, --warrior whirlwind
[190411] = 199658, --warrior whirlwind
[44949] = 199658, --warrior whirlwind
[199667] = 199658, --warrior whirlwind
[199852] = 199658, --warrior whirlwind
[199851] = 199658, --warrior whirlwind
[222031] = 199547, --deamonhunter ChaosStrike
[200685] = 199552, --deamonhunter Blade Dance
[210155] = 210153, --deamonhunter Death Sweep
[227518] = 201428, --deamonhunter Annihilation
[187727] = 178741, --deamonhunter Immolation Aura
[201789] = 201628, --deamonhunter Fury of the Illidari
[225921] = 225919, --deamonhunter Fracture talent
[205164] = 205165, --death knight Crystalline Swords
[193315] = 197834, --rogue Saber Slash
[202822] = 202823, --rogue greed
[280720] = 282449, --rogue Secret Technique
[280719] = 282449, --rogue Secret Technique
[27576] = 5374, --rogue mutilate
[233496] = 233490, --warlock Unstable Affliction
[233497] = 233490, --warlock Unstable Affliction
[233498] = 233490, --warlock Unstable Affliction
[233499] = 233490, --warlock Unstable Affliction
[261947] = 261977, --monk fist of the white tiger talent
[32175] = 17364, -- shaman Stormstrike (from Turkar on github)
[32176] = 17364, -- shaman Stormstrike
[45284] = 188196, --shaman lightining bolt overloaded
}
end
local bitfield_debuffs_ids = _detalhes.BitfieldSwapDebuffsIDs
local bitfield_debuffs = {}
@@ -248,13 +255,20 @@
bitfield_debuffs [spellid] = true
end
end
--tbc prayer of mending cache
local TBC_PrayerOfMendingCache = {}
--tbc earth shield cache
local TBC_EarthShieldCache = {}
--tbc life bloom cache
local TBC_LifeBloomLatestHeal
--expose the override spells table to external scripts
_detalhes.OverridedSpellIds = override_spellId
--> list of ignored npcs by the user
local ignored_npcids = {}
--> ignore soul link (damage from the warlock on his pet - current to demonology only)
local SPELLID_WARLOCK_SOULLINK = 108446
--> when checking if can start a new combat, ignore the damage from warlock's burning rush
@@ -274,6 +288,23 @@
local SPELLID_KYRIAN_DRUID_HEAL = 327149
local SPELLID_KYRIAN_DRUID_TANK = 327037
--> shaman earth shield (bcc)
local SPELLID_SHAMAN_EARTHSHIELD_HEAL = 379
local SPELLID_SHAMAN_EARTHSHIELD_BUFF_RANK1 = 974
local SPELLID_SHAMAN_EARTHSHIELD_BUFF_RANK2 = 32593
local SPELLID_SHAMAN_EARTHSHIELD_BUFF_RANK3 = 32594
local SHAMAN_EARTHSHIELD_BUFF = {
[SPELLID_SHAMAN_EARTHSHIELD_BUFF_RANK1] = true,
[SPELLID_SHAMAN_EARTHSHIELD_BUFF_RANK2] = true,
[SPELLID_SHAMAN_EARTHSHIELD_BUFF_RANK3] = true,
}
--> holy priest prayer of mending (bcc)
local SPELLID_PRIEST_POM_BUFF = 41635
local SPELLID_PRIEST_POM_HEAL = 33110
--> druid lifebloom explosion (bcc)
local SPELLID_DRUID_LIFEBLOOM_BUFF = 33763
local SPELLID_DRUID_LIFEBLOOM_HEAL = 33778
local SPELLID_SANGUINE_HEAL = 226510
local SPELLID_BARGAST_DEBUFF = 334695 --REMOVE ON 10.0
@@ -1830,6 +1861,8 @@
if (is_using_spellId_override) then
spellid = override_spellId [spellid] or spellid
end
--sanguine ichor mythic dungeon affix (heal enemies)
if (spellid == SPELLID_SANGUINE_HEAL) then
@@ -1848,7 +1881,31 @@
--cura_efetiva = absorbed + amount - overhealing
cura_efetiva = cura_efetiva + amount - overhealing
end
if (isTBC) then
--earth shield
if (spellid == SPELLID_SHAMAN_EARTHSHIELD_HEAL) then
--get the information of who placed the buff into this actor
local sourceData = TBC_EarthShieldCache[who_name]
if (sourceData) then
who_serial, who_name, who_flags = unpack(sourceData)
end
--prayer of mending
elseif (spellid == SPELLID_PRIEST_POM_HEAL) then
local sourceData = TBC_PrayerOfMendingCache[who_name]
if (sourceData) then
who_serial, who_name, who_flags = unpack(sourceData)
TBC_PrayerOfMendingCache[who_name] = nil
end
--life bloom explosion (second part of the heal)
elseif (spellid == SPELLID_DRUID_LIFEBLOOM_HEAL) then
TBC_LifeBloomLatestHeal = cura_efetiva
return
end
end
_current_heal_container.need_refresh = true
if (spellid == SPELLID_KYRIAN_DRUID_HEAL) then
@@ -2127,35 +2184,6 @@
}
end
------------------------------------------------------------------------------------------------
-->
--[=[
--druid_kyrian_bounds
--damager on damager
SPELL_CAST_SUCCESS,Player-3209-065BAEDE,"Bullcéfalo-Azralon",0x512,0x0,Player-3209-0A79112C,"Symantec-Azralon",0x511,0x0,326434,"Kindred Spirits",0x40,Player-3209-065BAEDE,0000000000000000,28240,28240,1233,448,472,0,0,10000,10000,200,-3298.34,5440.53,1525,5.8081,177
SPELL_AURA_APPLIED,Player-3209-065BAEDE,"Bullcéfalo-Azralon",0x512,0x0,Player-3209-0A79112C,"Symantec-Azralon",0x511,0x0,326434,"Kindred Spirits",0x40,BUFF
SPELL_AURA_REMOVED,Player-3209-065BAEDE,"Bullcéfalo-Azralon",0x512,0x0,Player-3209-0A79112C,"Symantec-Azralon",0x511,0x0,326434,"Kindred Spirits",0x40,BUFF
12/15 10:03:51.702 SPELL_CAST_SUCCESS,Player-3209-065BAEDE,"Bullcéfalo-Azralon",0x512,0x0,0000000000000000,nil,0x80000000,0x80000000,326446,"Empower Bond",0x40,Player-3209-065BAEDE,0000000000000000,28240,28240,1234,448,472,0,3,100,100,0,-3294.17,5437.12,1525,0.7611,177
12/15 10:03:51.702 SPELL_AURA_APPLIED,Player-3209-065BAEDE,"Bullcéfalo-Azralon",0x512,0x0,Player-3209-0A79112C,"Symantec-Azralon",0x511,0x0,327139,"Kindred Empowerment",0x40,BUFF
12/15 10:03:51.702 SPELL_AURA_APPLIED,Player-3209-065BAEDE,"Bullcéfalo-Azralon",0x512,0x0,Player-3209-0A79112C,"Symantec-Azralon",0x511,0x0,327022,"Kindred Empowerment",0x40,BUFF,1
12/15 10:03:51.702 SPELL_AURA_APPLIED,Player-3209-0A79112C,"Symantec-Azralon",0x511,0x0,Player-3209-065BAEDE,"Bullcéfalo-Azralon",0x512,0x0,327139,"Kindred Empowerment",0x40,BUFF
12/15 10:03:51.702 SPELL_AURA_APPLIED,Player-3209-0A79112C,"Symantec-Azralon",0x511,0x0,Player-3209-065BAEDE,"Bullcéfalo-Azralon",0x512,0x0,327022,"Kindred Empowerment",0x40,BUFF,1
SPELL_DAMAGE,Player-3209-065BAEDE,"Bullcéfalo-Azralon",0x512,0x0,Creature-0-4217-2222-22679-166718-000058B14F,"Manifestation of Envy",0x10a48,0x0,338411,"Kindred Empowerment",0x40,Creature-0-4217-2222-22679-166718-000058B14F,0000000000000000,4218,5895,0,0,651,0,0,2289,2289,0,-3290.46,5445.37,1525,4.1809,58,31,30,-1,64,0,0,0,nil,nil,nil
SPELL_DAMAGE,Player-3209-0A79112C,"Symantec-Azralon",0x511,0x0,Creature-0-4217-2222-22679-166718-000058B14F,"Manifestation of Envy",0x10a48,0x0,338411,"Kindred Empowerment",0x40,Creature-0-4217-2222-22679-166718-000058B14F,0000000000000000,867,5895,0,0,651,0,0,2289,2289,0,-3289.84,5446.94,1525,4.3379,58,89,89,-1,64,0,0,0,nil,nil,nil
SPELL_HEAL,Player-3209-0A79112C,"Symantec-Azralon",0x511,0x0,Player-3209-065BAEDE,"Bullcéfalo-Azralon",0x10512,0x0,327149,"Kindred Focus",0x40,Player-3209-065BAEDE,0000000000000000,50058,50058,1575,448,1510,8832,1,1000,1000,0,-2640.65,5656.60,1525,3.3950,177,485,485,485,0,nil
12/15 10:04:01.739 SPELL_AURA_REMOVED,Player-3209-0A79112C,"Symantec-Azralon",0x511,0x0,Player-3209-065BAEDE,"Bullcéfalo-Azralon",0x512,0x0,327139,"Kindred Empowerment",0x40,BUFF
12/15 10:04:01.739 SPELL_AURA_REMOVED,Player-3209-065BAEDE,"Bullcéfalo-Azralon",0x512,0x0,Player-3209-0A79112C,"Symantec-Azralon",0x511,0x0,327139,"Kindred Empowerment",0x40,BUFF
--]=]
------------------------------------------------------------------------------------------------
--> handle shields
@@ -2176,6 +2204,15 @@ SPELL_HEAL,Player-3209-0A79112C,"Symantec-Azralon",0x511,0x0,Player-3209-065BAED
necro_cheat_deaths[who_serial] = true
end
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
if (_recording_buffs_and_debuffs) then
if (who_name == alvo_name and raid_members_cache [who_serial] and _in_combat) then
--> call record buffs uptime
@@ -2429,7 +2466,7 @@ SPELL_HEAL,Player-3209-0A79112C,"Symantec-Azralon",0x511,0x0,Player-3209-065BAED
parser:add_buff_uptime (token, time, alvo_serial, alvo_name, alvo_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, "BUFF_UPTIME_REFRESH")
end
end
------------------------------------------------------------------------------------------------
--> healing done (shields)
if (absorb_spell_list [spellid] and _recording_healing and amount) then
@@ -2447,7 +2484,17 @@ SPELL_HEAL,Player-3209-0A79112C,"Symantec-Azralon",0x511,0x0,Player-3209-065BAED
return parser:heal (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, nil, 0, _math_ceil (overheal), 0, 0, nil, true)
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
@@ -2571,7 +2618,23 @@ SPELL_HEAL,Player-3209-0A79112C,"Symantec-Azralon",0x511,0x0,Player-3209-065BAED
elseif (spellid == SPELLID_NECROMANCER_CHEAT_DEATH) then --remove on 10.0
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)
@@ -3127,6 +3190,8 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
------------------------------------------------------------------------------------------------
--> check if is energy or resource
--Details:Dump({token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype, amount, overpower, powertype, altpower})
--> get resource type
local is_resource, resource_amount, resource_id = resource_power_type [powertype], amount, powertype
@@ -5822,7 +5887,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 (DetailsFramework.IsTBCWow()) then
if (isTBC) 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)