Commit 7c8db9d1 authored by Ivaria's avatar Ivaria
Browse files

Merge branch 'tbcc' into vanilla

parents 88af86cd 2d679006
......@@ -31,7 +31,6 @@ externals:
Libs/AceBucket-3.0: https://repos.wowace.com/wow/ace3/trunk/AceBucket-3.0
Libs/AceEvent-3.0: https://repos.wowace.com/wow/ace3/trunk/AceEvent-3.0
Libs/!LibTotemInfo: https://github.com/SwimmingTiger/LibTotemInfo.git
Libs/LibHealComm-4.0: https://repos.curseforge.com/wow/libhealcomm-4-0
Libs/LibClassicDurations: https://repos.curseforge.com/wow/libclassicdurations
......
......@@ -404,13 +404,13 @@ end
--
local tEmptyRaid = { };
local tInfo;
function VUHDO_OnEvent(_, anEvent, anArg1, anArg2, anArg3, anArg4, anArg5, anArg6, anArg7, anArg8, anArg9, anArg10, anArg11, anArg12, anArg13, anArg14, anArg15, anArg16, anArg17)
function VUHDO_OnEvent(_, anEvent, anArg1, anArg2, anArg3, anArg4, anArg5, anArg6, anArg7, anArg8, anArg9, anArg10, anArg11, anArg12, anArg13, anArg14, anArg15, anArg16, anArg17, anArg18, anArg19, anArg20, anArg21, anArg22)
--VUHDO_Msg(anEvent);
if "COMBAT_LOG_EVENT_UNFILTERED" == anEvent then
if VUHDO_VARIABLES_LOADED then
-- As of 8.x COMBAT_LOG_EVENT_UNFILTERED is now just an event with no arguments
anArg1, anArg2, anArg3, anArg4, anArg5, anArg6, anArg7, anArg8, anArg9, anArg10, anArg11, anArg12, anArg13, anArg14, anArg15, anArg16, anArg17 = CombatLogGetCurrentEventInfo();
anArg1, anArg2, anArg3, anArg4, anArg5, anArg6, anArg7, anArg8, anArg9, anArg10, anArg11, anArg12, anArg13, anArg14, anArg15, anArg16, anArg17, anArg18, anArg19, anArg20, anArg21, anArg22 = CombatLogGetCurrentEventInfo();
-- in classic, CLEU payload for spell ID is always 0
-- map this as best we can but lookups outside player spellbook will fail
......@@ -430,7 +430,7 @@ function VUHDO_OnEvent(_, anEvent, anArg1, anArg2, anArg3, anArg4, anArg5, anArg
if VUHDO_INTERNAL_TOGGLES[36] then -- VUHDO_UPDATE_SHIELD
-- for SPELL events with _AURA suffixes the amount healed is the 16th arg
-- for SPELL_HEAL/SPELL_PERIODIC_HEAL the amount absorbed is the 17th arg
VUHDO_parseCombatLogShieldAbsorb(anArg2, anArg4, anArg8, anArg13, anArg16, anArg12, anArg17);
VUHDO_parseCombatLogShieldAbsorb(anArg2, anArg4, anArg8, anArg13, anArg16, anArg12, anArg17, anArg15, anArg18, anArg20, anArg21, anArg22, anArg19);
end
if VUHDO_INTERNAL_TOGGLES[37] then -- VUHDO_UPDATE_SPELL_TRACE
......@@ -751,7 +751,7 @@ end
--
local function VUHDO_printAbout()
VUHDO_Msg("VuhDo |cffffe566['vu:du:]|r v" .. VUHDO_VERSION .. " (use /vd). Currently maintained by Ivaria@US-Hyjal in honor of Marshy and our newborn daughter Kiana.");
VUHDO_Msg("VuhDo |cffffe566['vu:du:]|r v" .. VUHDO_VERSION .. " (use /vd). Currently maintained by Ivaria@US-Hyjal in honor of Marshy and our two daughters.");
end
......
......@@ -388,11 +388,10 @@ local function VUHDO_generateRaidMacroTemplate(anAction, anIsKeyboard, aTarget,
else
tVehicleCond = "";
end
-- Blizzard has broken the way vehicles work for the Antoran High Command encounter
-- For now just disable vehicle support (note: this breaks encounters like Malygos)
--tText = tText .. tCastText .. "[" .. tModiSpell .. "nounithasvehicleui,@vuhdo]" .. tVehicleCond .. " " .. anAction .. "\n";
tText = tText .. tCastText .. "[" .. tModiSpell .. "@vuhdo]" .. tVehicleCond .. " " .. anAction .. "\n";
tText = tText .. tCastText .. "[" .. tModiSpell .. "nounithasvehicleui,@vuhdo]" .. tVehicleCond .. " " .. anAction .. "\n";
tText = tText .. tSpellPost;
if aPet then
tText = tText .. "/tar [unithasvehicleui,@vdpet]\n";
end
......
......@@ -5,16 +5,21 @@ local type = type;
local UnitGetTotalAbsorbs = VUHDO_unitGetTotalAbsorbs;
local VUHDO_SHIELDS = {
[17] = 15, -- VUHDO_SPELL_ID.POWERWORD_SHIELD -- ok
[123258] = 15, -- Power Word: Shield (Improved)
[11426] = 60, -- VUHDO_SPELL_ID.ICE_BARRIER -- ok
[116849] = 12, -- Life Cocoon
--[77535] = 10, -- Blood Shield (Blood DK) - Physical damage ONLY
[108416] = 20, -- Sacrificial Pact (warlock talent)
[1463] = 8, -- Incanter's Ward (mage talent)
[114893] = 10, -- Stone Bulwark Totem (shaman talent)
[187805] = 15, -- VUHDO_SPELL_ID.BUFF_ETHERALUS
[114908] = 10, -- VUHDO_SPELL_ID.SPIRIT_SHELL
[17] = 30, -- Power Word: Shield (rank 1)
[592] = 30, -- Power Word: Shield (rank 2)
[600] = 30, -- Power Word: Shield (rank 3)
[3747] = 30, -- Power Word: Shield (rank 4)
[6056] = 30, -- Power Word: Shield (rank 5)
[6066] = 30, -- Power Word: Shield (rank 6)
[10898] = 30, -- Power Word: Shield (rank 7)
[10899] = 30, -- Power Word: Shield (rank 8)
[10900] = 30, -- Power Word: Shield (rank 9)
[10901] = 30, -- Power Word: Shield (rank 10)
[25217] = 30, -- Power Word: Shield (rank 11)
[25218] = 30, -- Power Word: Shield (rank 12)
[48065] = 30, -- Power Word: Shield (rank 13)
[48066] = 30, -- Power Word: Shield (rank 14)
[56160] = 30, -- Glyph of Power Word: Shield
}
......@@ -114,6 +119,8 @@ local sMissedEvents = {
local VUHDO_SHIELD_LEFT = { };
setmetatable(VUHDO_SHIELD_LEFT, VUHDO_META_NEW_ARRAY);
local VUHDO_SHIELD_LEFT_TEMP = { };
setmetatable(VUHDO_SHIELD_LEFT_TEMP, VUHDO_META_NEW_ARRAY);
local VUHDO_SHIELD_SIZE = { };
setmetatable(VUHDO_SHIELD_SIZE, VUHDO_META_NEW_ARRAY);
local VUHDO_SHIELD_EXPIRY = { };
......@@ -207,6 +214,7 @@ local function VUHDO_removeShield(aUnit, aShieldName)
VUHDO_SHIELD_LEFT[aUnit][aShieldName] = nil;
VUHDO_SHIELD_EXPIRY[aUnit][aShieldName] = nil;
VUHDO_SHIELD_LAST_SOURCE_GUID[aUnit][aShieldName] = nil;
VUHDO_SHIELD_LEFT_TEMP[aUnit][aShieldName] = nil;
--VUHDO_xMsg("Removed shield " .. aShieldName .. " from " .. aUnit);
end
......@@ -301,7 +309,21 @@ end
--
function VUHDO_getUnitOverallShieldRemain(aUnit)
return UnitGetTotalAbsorbs(aUnit) or 0;
local aRemain = UnitGetTotalAbsorbs(aUnit);
if aRemain > 0 then
return aRemain;
end
if VUHDO_SHIELD_LEFT[aUnit] then
for _, value in pairs(VUHDO_SHIELD_LEFT[aUnit]) do
if value then
aRemain = aRemain + value;
end
end
end
return aRemain;
end
......@@ -310,7 +332,7 @@ end
local tUnit;
local VUHDO_DEBUFF_SHIELDS = { };
local tDelta, tShieldName;
function VUHDO_parseCombatLogShieldAbsorb(aMessage, aSrcGuid, aDstGuid, aShieldName, anAmount, aSpellId, anAbsorbAmount)
function VUHDO_parseCombatLogShieldAbsorb(aMessage, aSrcGuid, aDstGuid, aShieldName, anAmount, aSpellId, anAbsorbAmount, aHealAmount, aCritical, anAbsorbSpellName, anAbsorbSpellSchool, anAbsorbSpellDamageAmount, anAbsorbSwingDamageAmount)
tUnit = VUHDO_RAID_GUIDS[aDstGuid];
if not tUnit then return; end
......@@ -327,15 +349,31 @@ function VUHDO_parseCombatLogShieldAbsorb(aMessage, aSrcGuid, aDstGuid, aShieldN
if VUHDO_SHIELDS[aSpellId] then
if "SPELL_AURA_REFRESH" == aMessage then
if "SPELL_AURA_REFRESH" == aMessage then
if not anAmount then -- anAmount is always nil in Wrath Classic
anAmount = VUHDO_SHIELD_LEFT_TEMP[tUnit][aShieldName] or 0;
end
VUHDO_updateShieldValue(tUnit, aShieldName, anAmount, VUHDO_SHIELDS[aSpellId]);
elseif "SPELL_AURA_APPLIED" == aMessage then
elseif "SPELL_AURA_APPLIED" == aMessage then
if not anAmount then -- anAmount is always nil in Wrath Classic
anAmount = VUHDO_SHIELD_LEFT_TEMP[tUnit][aShieldName] or 0;
end
VUHDO_initShieldValue(tUnit, aShieldName, anAmount, VUHDO_SHIELDS[aSpellId]);
VUHDO_SHIELD_LAST_SOURCE_GUID[tUnit][aShieldName] = aSrcGuid;
elseif "SPELL_AURA_REMOVED" == aMessage
or "SPELL_AURA_BROKEN" == aMessage
or "SPELL_AURA_BROKEN_SPELL" == aMessage then
VUHDO_removeShield(tUnit, aShieldName);
elseif "SPELL_HEAL" == aMessage and aSpellId == 56160 then -- Glyph of Power Word: Shield
anAmount = aHealAmount / 0.2; -- the glyph heal amount is 20% of the absorb amount
if aCritical then
anAmount = math.floor(anAmount / 1.5); -- critical heals in Wrath Classic are 150%
end
VUHDO_SHIELD_LEFT_TEMP[tUnit][VUHDO_SPELL_ID.POWERWORD_SHIELD] = anAmount;
end
elseif VUHDO_ABSORB_DEBUFFS[aSpellId] then
......@@ -368,6 +406,22 @@ function VUHDO_parseCombatLogShieldAbsorb(aMessage, aSrcGuid, aDstGuid, aShieldN
"SPELL_AURA_BROKEN_SPELL" == aMessage) then
VUHDO_updateAllHoTs();
VUHDO_updateAllCyclicBouquets(true);
elseif "SPELL_ABSORBED" == aMessage then
-- SPELL_ABSORBED optionally includes the spell payload if triggered from what would be SPELL_DAMAGE
-- this offsets the CLEU payload by +3
-- see: https://wowpedia.fandom.com/wiki/COMBAT_LOG_EVENT#SPELL_ABSORBED
if anAbsorbSpellSchool then
tShieldName = anAbsorbSpellName;
anAmount = anAbsorbSpellDamageAmount or 0;
else
tShieldName = anAbsorbAmount;
anAmount = anAbsorbSwingDamageAmount or 0;
end
if VUHDO_SHIELD_LEFT[tUnit][tShieldName] then
tDelta = VUHDO_getShieldLeftAmount(tUnit, tShieldName) - anAmount;
VUHDO_updateShieldValue(tUnit, tShieldName, tDelta);
end
end
VUHDO_updateBouquetsForEvent(tUnit, 36); -- VUHDO_UPDATE_SHIELD
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment