Commit b981148d authored by Ivaria's avatar Ivaria

Merge branch 'classic' into 'master'

# Conflicts:
#   .pkgmeta
parents 340ae3ee 352c7416
......@@ -60,4 +60,4 @@ gitlab:
script:
- cd .release
- chmod +x ./release.sh
- echo ./release.sh -ocelzLWH
- ./release.sh -ocelzLWH
......@@ -13,6 +13,8 @@ externals:
Libs/AceAddon-3.0: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceAddon-3.0
Libs/AceGUI-3.0: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceGUI-3.0
Libs/AceConfig-3.0: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceConfig-3.0
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/AceComm-3.0: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceComm-3.0
Libs/AceLocale-3.0: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceLocale-3.0
Libs/AceTimer-3.0: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceTimer-3.0
......@@ -24,10 +26,13 @@ externals:
Libs/LibBase64-1.0: git://git.wowace.com/wow/libbase64-1-0/mainline.git
Libs/LibDBIcon-1.0: svn://svn.wowace.com/wow/libdbicon-1-0/mainline/trunk/LibDBIcon-1.0
Libs/LibCustomGlow-1.0:
url: https://github.com/Stanzilla/LibCustomGlow
url: https://github.com/Stanzilla/LibCustomGlow.git
Libs/LibClassicDurations: https://repos.curseforge.com/wow/libclassicdurations
Libs/LibHealComm-4.0: https://repos.wowace.com/wow/libhealcomm-4-0
Libs/!LibTotemInfo: https://github.com/SwimmingTiger/LibTotemInfo.git
VuhDoOptions/Libs/ChatThrottleLib: svn://svn.wowace.com/wow/chatthrottlelib/mainline/trunk
move-folders:
VuhDo/VuhDoOptions: VuhDoOptions
VuhDo/VuhDoOptions: VuhDoOptions
\ No newline at end of file
......@@ -2,7 +2,7 @@
export CF_ID=7950
#export CF_API_KEY=
export WOWI_ID=14239
export WOWI_ID=24919
#export WOWI_ID_TEST=
#export WOWI_API_TOKEN=
#export GITHUB_SLUG=
......
......@@ -22,4 +22,8 @@
<Include file="LibCustomGlow-1.0\LibCustomGlow-1.0.xml" />
<Include file="NickTag-1.0\NickTag-1.0.xml" />
<Include file="!LibTotemInfo\embeds.xml" />
<Include file="LibClassicDurations\LibClassicDurations.xml" />
<Include file="LibHealComm-4.0\LibHealComm-4.0.xml" />
</Ui>
......@@ -91,7 +91,7 @@ local UnitIsAFK = UnitIsAFK;
local UnitIsConnected = UnitIsConnected;
local UnitIsCharmed = UnitIsCharmed;
local UnitInRaid = UnitInRaid;
local UnitHasVehicleUI = UnitHasVehicleUI;
local VUHDO_unitHasVehicleUI = VUHDO_unitHasVehicleUI;
local UnitTargetsVehicleInRaidUI = UnitTargetsVehicleInRaidUI;
local UnitCanAttack = UnitCanAttack;
local GetNumGroupMembers = GetNumGroupMembers;
......@@ -101,8 +101,8 @@ local UnitPowerMax = UnitPowerMax;
local UnitThreatSituation = UnitThreatSituation;
local UnitClass = UnitClass;
local UnitPowerType = UnitPowerType;
local UnitHasVehicleUI = UnitHasVehicleUI;
local UnitGroupRolesAssigned = UnitGroupRolesAssigned;
local VUHDO_unitHasVehicleUI = VUHDO_unitHasVehicleUI;
local VUHDO_unitGroupRolesAssigned = VUHDO_unitGroupRolesAssigned;
local GetRaidRosterInfo = GetRaidRosterInfo;
local InCombatLockdown = InCombatLockdown;
local IsInRaid = IsInRaid;
......@@ -333,6 +333,7 @@ function VUHDO_setHealth(aUnit, aMode)
tName, tRealm = UnitName(aUnit);
tInfo["healthmax"] = UnitHealthMax(aUnit);
tInfo["health"] = UnitHealth(aUnit);
tInfo["loghealth"] = UnitHealth(aUnit);
tInfo["name"] = tName;
tInfo["number"] = VUHDO_getUnitNo(aUnit);
tInfo["unit"] = aUnit;
......@@ -351,7 +352,7 @@ function VUHDO_setHealth(aUnit, aMode)
tInfo["connected"] = tIsConnected;
tInfo["threat"] = UnitThreatSituation(aUnit) or 0;
tInfo["threatPerc"] = 0;
tInfo["isVehicle"] = UnitHasVehicleUI(aUnit);
tInfo["isVehicle"] = VUHDO_unitHasVehicleUI(aUnit);
tInfo["className"] = tLocalClass or "";
tInfo["petUnit"] = VUHDO_OWNER_2_PET[aUnit];
tInfo["targetUnit"] = VUHDO_getTargetUnit(aUnit);
......@@ -386,14 +387,30 @@ function VUHDO_setHealth(aUnit, aMode)
VUHDO_updateBouquetsForEvent(aUnit, 19); -- VUHDO_UPDATE_DC
end
if 2 == aMode then -- VUHDO_UPDATE_HEALTH
tNewHealth = UnitHealth(aUnit);
if 2 == aMode or 12 == aMode then -- VUHDO_UPDATE_HEALTH -- VUHDO_UPDATE_HEALTH_COMBAT_LOG
if 12 == aMode then -- VUHDO_UPDATE_HEALTH_COMBAT_LOG
tNewHealth = tInfo["loghealth"];
end
if 2 == aMode then
-- Filter exception UNIT_HEALTH_FREQUENT event in classic
-- Sometimes there is a UNIT_HEALTH_FREQUENT event in the interim period
if tInfo["updateTime"] == GetTime() then
return;
-- Filter exception health data from UnitHealth API
-- UnitHealth will return 0 if the hunter cast FeignDeath
-- Sometimes UnitIsDeadOrGhost return false and UnitHealth return 0 before UnitIsFeignDeath return true
elseif UnitIsFeignDeath(aUnit) or not UnitIsDeadOrGhost(aUnit) and UnitHealth(aUnit) == 0 then
return;
else
tNewHealth = UnitHealth(aUnit);
end
end
if not tIsDead and tInfo["health"] > 0 then
tInfo["lifeLossPerc"] = tNewHealth / tInfo["health"];
end
tInfo["health"] = tNewHealth;
if tInfo["dead"] ~= tIsDead then
if not tIsDead then
tInfo["healthmax"] = UnitHealthMax(aUnit);
......@@ -407,6 +424,7 @@ function VUHDO_setHealth(aUnit, aMode)
tInfo["dead"] = tIsDead;
tInfo["healthmax"] = UnitHealthMax(aUnit);
tInfo["sortMaxHp"] = VUHDO_getUnitSortMaxHp(aUnit);
tInfo["loghealth"] = UnitHealth(aUnit);
elseif 6 == aMode then -- VUHDO_UPDATE_AFK
tInfo["afk"] = tIsAfk;
......@@ -438,7 +456,7 @@ function VUHDO_updateHealth(aUnit, aMode)
tIsPet = VUHDO_RAID[aUnit] and VUHDO_RAID[aUnit]["isPet"];
if not tIsPet or VUHDO_INTERNAL_TOGGLES[26] then -- VUHDO_UPDATE_PETS -- Enthlt nur Pets als eigene Balken, vehicles werden ?ber owner dargestellt s.unten
if not tIsPet or VUHDO_INTERNAL_TOGGLES[26] then -- VUHDO_UPDATE_PETS -- Enth\84lt nur Pets als eigene Balken, vehicles werden ?ber owner dargestellt s.unten
VUHDO_setHealth(aUnit, aMode);
VUHDO_updateHealthBarsFor(aUnit, aMode);
end
......@@ -453,7 +471,7 @@ function VUHDO_updateHealth(aUnit, aMode)
end
if 1 ~= sCurrentMode -- VUHDO_MODE_NEUTRAL
and (2 == aMode or 3 == aMode) then -- VUHDO_UPDATE_HEALTH -- VUHDO_UPDATE_HEALTH_MAX
and (2 == aMode or 3 == aMode or 12 == aMode) then -- VUHDO_UPDATE_HEALTH -- VUHDO_UPDATE_HEALTH_MAX -- VUHDO_UPDATE_HEALTH_COMBAT_LOG
-- Remove old emergencies
VUHDO_FORCE_RESET = true;
for tUnit, _ in pairs(VUHDO_EMERGENCIES) do
......@@ -539,7 +557,7 @@ end
--
local tRole;
local function VUHDO_addUnitToSpecial(aUnit)
if VUHDO_CONFIG["OMIT_DFT_MTS"] and "TANK" == (UnitGroupRolesAssigned(aUnit)) then
if VUHDO_CONFIG["OMIT_DFT_MTS"] and "TANK" == (VUHDO_unitGroupRolesAssigned(aUnit)) then
tinsert(VUHDO_GROUPS[41], aUnit); -- VUHDO_ID_MAINTANKS
return;
end
......@@ -864,7 +882,7 @@ function VUHDO_refreshRaidMembers()
else
tInfo["group"] = VUHDO_getUnitGroup(tPlayer, false);
tInfo["isVehicle"] = UnitHasVehicleUI(tPlayer);
tInfo["isVehicle"] = VUHDO_unitHasVehicleUI(tPlayer);
if ( tInfo["isVehicle"] ) then
local tRaidId = UnitInRaid(tPlayer);
......@@ -905,7 +923,7 @@ function VUHDO_refreshRaidMembers()
VUHDO_setHealth(bossUnitId, 1); -- VUHDO_UPDATE_ALL
else
tInfo["group"] = VUHDO_getUnitGroup(bossUnitId, false);
tInfo["isVehicle"] = UnitHasVehicleUI(bossUnitId);
tInfo["isVehicle"] = VUHDO_unitHasVehicleUI(bossUnitId);
tInfo["afk"] = false;
tInfo["connected"] = true;
......
## Interface: 80300
## Interface: 11305
## Title: VuhDo ['vu:du:]
## Author: Iza@Gilneas, humfras, Ivaria@Hyjal
## Version: 3.114
## Version: 3.114-classic
## Notes: Raid Frames providing click-heal functionality, buff and debuff control, main tank management and much more
## SavedVariablesPerCharacter: VUHDO_CONFIG, VUHDO_PANEL_SETUP, VUHDO_SPELL_ASSIGNMENTS, VUHDO_HOSTILE_SPELL_ASSIGNMENTS, VUHDO_MM_SETTINGS, VUHDO_PLAYER_TARGETS, VUHDO_MAINTANK_NAMES, VUHDO_BUFF_SETTINGS, VUHDO_POWER_TYPE_COLORS, VUHDO_SPELLS_KEYBOARD, VUHDO_SPELL_CONFIG, VUHDO_BUFF_ORDER, VUHDO_SPEC_LAYOUTS, VUHDO_GROUP_SIZE, VUHDO_RAID, VUHDO_INDICATOR_CONFIG
## SavedVariables: VUHDO_DEFAULT_LAYOUT, VUHDO_DEFAULT_PROFILE, VUHDO_PROFILES, VUHDO_MANUAL_ROLES, VUHDO_SPELL_LAYOUTS, VUHDO_USER_CLASS_COLORS, VUHDO_DEBUFF_BLACKLIST, VUHDO_BOUQUETS, VUHDO_COMBAT_LOG_TRACE, VUHDO_GLOBAL_CONFIG, VUHDO_DEBUG
......
......@@ -16,6 +16,16 @@ VUHDO_LibBase64 = LibStub:GetLibrary("LibBase64-1.0");
VUHDO_LibCustomGlow = LibStub("LibCustomGlow-1.0");
VUHDO_LibNickTag = LibStub("NickTag-1.0");
VUHDO_LibHealComm = LibStub("LibHealComm-4.0");
VUHDO_LibClassicDurations = LibStub("LibClassicDurations");
if VUHDO_LibClassicDurations then
VUHDO_LibClassicDurations:Register("VuhDo");
end
VUHDO_LibTotemInfo = LibStub("LibTotemInfo-1.0");
VUHDO_LibSharedMedia:Register("font", "Arial Black", "Interface\\AddOns\\VuhDo\\Fonts\\ariblk.ttf");
VUHDO_LibSharedMedia:Register("font", "Emblem", "Interface\\AddOns\\VuhDo\\Fonts\\Emblem.ttf");
VUHDO_LibSharedMedia:Register("font", "Vixar", "Interface\\AddOns\\VuhDo\\Fonts\\vixar.ttf");
......@@ -35,9 +45,11 @@ VUHDO_LibSharedMedia:Register("statusbar", "VuhDo - Plain White", "Interface\\Ad
VUHDO_LibSharedMedia:Register("statusbar", "LiteStepLite", "Interface\\AddOns\\VuhDo\\Images\\LiteStepLite.tga");
VUHDO_LibSharedMedia:Register("statusbar", "Tukui", "Interface\\AddOns\\VuhDo\\Images\\tukuibar.tga");
VUHDO_LibSharedMedia:Register("sound", "Tribal Bass Drum", 566027);
VUHDO_LibSharedMedia:Register("sound", "Thorns", 569022);
VUHDO_LibSharedMedia:Register("sound", "Elf Bell Toll", 566558);
--[[ unavailable media in classic?
VUHDO_LibSharedMedia:Register("sound", "Tribal Bass Drum", "Sound\\Doodad\\BellTollTribal.wav");
VUHDO_LibSharedMedia:Register("sound", "Thorns", "Sound\\Spells\\Thorns.wav ");
VUHDO_LibSharedMedia:Register("sound", "Elf Bell Toll", "Sound\\Doodad\\BellTollNightElf.wav");
]]
VUHDO_LibSharedMedia:Register("border", "Plain White", "Interface\\AddOns\\VuhDo\\Images\\white_square_16_16");
......
--
local UnitPower = UnitPower;
local UnitGetIncomingHeals = UnitGetIncomingHeals;
local pairs = pairs;
local ipairs = ipairs;
local floor = floor;
......@@ -242,7 +241,11 @@ local function VUHDO_isAoeSpellEnabled(aSpell)
elseif not VUHDO_CONFIG["AOE_ADVISOR"]["knownOnly"] then
return true;
else
return VUHDO_isSpellKnown(VUHDO_AOE_SPELLS[aSpell]["name"]);
if VUHDO_AOE_SPELLS[aSpell]["name"] then
return VUHDO_isSpellKnown(VUHDO_AOE_SPELLS[aSpell]["name"]);
else
return false;
end
end
end
......@@ -265,7 +268,7 @@ local function VUHDO_aoeGetIncHeals(aUnit, aCastTime)
return 0;
end
return (UnitGetIncomingHeals(aUnit) or 0) - (UnitGetIncomingHeals(aUnit, "player") or 0);
return (VUHDO_unitGetIncomingHeals(aUnit) or 0) - (VUHDO_unitGetIncomingHeals(aUnit, "player") or 0);
end
......
......@@ -690,7 +690,7 @@ function VUHDO_updateHealthBarsFor(aUnit, anUpdateMode)
tAllButtons = VUHDO_getUnitButtons(aUnit);
if not tAllButtons then return; end
if 2 == anUpdateMode then -- VUHDO_UPDATE_HEALTH
if 2 == anUpdateMode or 12 == anUpdateMode then -- VUHDO_UPDATE_HEALTH --VUHDO_UPDATE_HEALTH_COMBAT_LOG
VUHDO_determineIncHeal(aUnit);
tInfo = VUHDO_RAID[aUnit];
......
......@@ -541,15 +541,32 @@ local function VUHDO_updateHots(aUnit, anInfo)
if not tBuffIcon then
tDebuffOffset = tCnt - 1;
else
if VUHDO_LibClassicDurations then
local tNewDuration, tNewExpiry = VUHDO_LibClassicDurations:GetAuraDurationByUnit(aUnit, tSpellId, tCaster, tBuffName);
if tDuration == 0 and tNewDuration then
tDuration = tNewDuration;
tExpiry = tNewExpiry;
end
end
end
end
if tDebuffOffset then -- Achtung kein elseif
tBuffName, tBuffIcon, tStacks, _, tDuration, tExpiry, tCaster, _, _, tSpellId = UnitDebuff(aUnit, tCnt - tDebuffOffset);
if not tBuffIcon then
break;
end
if VUHDO_LibClassicDurations then
local tNewDuration, tNewExpiry = VUHDO_LibClassicDurations:GetAuraDurationByUnit(aUnit, tSpellId, tCaster, tBuffName);
if tDuration == 0 and tNewDuration then
tDuration = tNewDuration;
tExpiry = tNewExpiry;
end
end
end
tIsCastByPlayer = tCaster == "player" or tCaster == VUHDO_PLAYER_RAID_ID;
......
......@@ -205,7 +205,7 @@ end
--
local function VUHDO_isPhasedValidator(anInfo, _)
if UnitIsWarModePhased(anInfo["unit"]) or not UnitInPhase(anInfo["unit"]) then
if VUHDO_unitIsWarModePhased(anInfo["unit"]) or not UnitInPhase(anInfo["unit"]) then
return true, "Interface\\TargetingFrame\\UI-PhasingIcon",
-1, -1, -1, nil, nil, 0.15625, 0.84375, 0.15625, 0.84375;
else
......@@ -217,7 +217,7 @@ end
--
local function VUHDO_isWarModePhasedValidator(anInfo, _)
if UnitIsWarModePhased(anInfo["unit"]) then
if VUHDO_unitIsWarModePhased(anInfo["unit"]) then
return true, "Interface\\TargetingFrame\\UI-PhasingIcon",
-1, -1, -1, nil, nil, 0.15625, 0.84375, 0.15625, 0.84375;
else
......@@ -779,7 +779,7 @@ end
local function VUHDO_statusExcessAbsorbValidator(anInfo, _)
local healthmax = anInfo["healthmax"];
local excessAbsorb = (UnitGetTotalAbsorbs(anInfo["unit"]) or 0) + anInfo["health"] - healthmax;
local excessAbsorb = (VUHDO_unitGetTotalAbsorbs(anInfo["unit"]) or 0) + anInfo["health"] - healthmax;
if excessAbsorb < 0 then
return true, nil, 0, -1, healthmax;
......@@ -792,7 +792,7 @@ end
--
local function VUHDO_statusTotalAbsorbValidator(anInfo, _)
return true, nil, UnitGetTotalAbsorbs(anInfo["unit"]) or 0, -1, anInfo["healthmax"];
return true, nil, VUHDO_unitGetTotalAbsorbs(anInfo["unit"]) or 0, -1, anInfo["healthmax"];
end
......@@ -824,7 +824,7 @@ end
--
local function VUHDO_hasSummonIconValidator(anInfo, _)
if C_IncomingSummon.HasIncomingSummon(anInfo["unit"]) then
if VUHDO_hasIncomingSummon(anInfo["unit"]) then
local status = C_IncomingSummon.IncomingSummonStatus(anInfo["unit"]);
if (status == Enum.SummonStatus.Pending) then
......@@ -1472,28 +1472,28 @@ VUHDO_BOUQUET_BUFFS_SPECIAL = {
["displayName"] = VUHDO_I18N_BOUQUET_HEALTH_BELOW,
["validator"] = VUHDO_healthBelowValidator,
["custom_type"] = VUHDO_BOUQUET_CUSTOM_TYPE_PERCENT,
["interests"] = { VUHDO_UPDATE_HEALTH, VUHDO_UPDATE_HEALTH_MAX },
["interests"] = { VUHDO_UPDATE_HEALTH, VUHDO_UPDATE_HEALTH_MAX, VUHDO_UPDATE_HEALTH_COMBAT_LOG },
},
["HEALTH_ABOVE"] = {
["displayName"] = VUHDO_I18N_BOUQUET_HEALTH_ABOVE,
["validator"] = VUHDO_healthAboveValidator,
["custom_type"] = VUHDO_BOUQUET_CUSTOM_TYPE_PERCENT,
["interests"] = { VUHDO_UPDATE_HEALTH, VUHDO_UPDATE_HEALTH_MAX },
["interests"] = { VUHDO_UPDATE_HEALTH, VUHDO_UPDATE_HEALTH_MAX, VUHDO_UPDATE_HEALTH_COMBAT_LOG },
},
["HEALTH_BELOW_ABS"] = {
["displayName"] = VUHDO_I18N_BOUQUET_HEALTH_BELOW_ABS,
["validator"] = VUHDO_healthBelowAbsValidator,
["custom_type"] = VUHDO_BOUQUET_CUSTOM_TYPE_HEALTH,
["interests"] = { VUHDO_UPDATE_HEALTH, VUHDO_UPDATE_HEALTH_MAX },
["interests"] = { VUHDO_UPDATE_HEALTH, VUHDO_UPDATE_HEALTH_MAX, VUHDO_UPDATE_HEALTH_COMBAT_LOG },
},
["HEALTH_ABOVE_ABS"] = {
["displayName"] = VUHDO_I18N_BOUQUET_HEALTH_ABOVE_ABS,
["validator"] = VUHDO_healthAboveAbsValidator,
["custom_type"] = VUHDO_BOUQUET_CUSTOM_TYPE_HEALTH,
["interests"] = { VUHDO_UPDATE_HEALTH, VUHDO_UPDATE_HEALTH_MAX },
["interests"] = { VUHDO_UPDATE_HEALTH, VUHDO_UPDATE_HEALTH_MAX, VUHDO_UPDATE_HEALTH_COMBAT_LOG },
},
["MANA_BELOW"] = {
......@@ -1631,7 +1631,7 @@ VUHDO_BOUQUET_BUFFS_SPECIAL = {
["displayName"] = VUHDO_I18N_BOUQUET_STATUS_HEALTH,
["validator"] = VUHDO_statusHealthValidator,
["custom_type"] = VUHDO_BOUQUET_CUSTOM_TYPE_STATUSBAR,
["interests"] = { VUHDO_UPDATE_HEALTH, VUHDO_UPDATE_HEALTH_MAX, VUHDO_UPDATE_INC },
["interests"] = { VUHDO_UPDATE_HEALTH, VUHDO_UPDATE_HEALTH_MAX, VUHDO_UPDATE_INC, VUHDO_UPDATE_HEALTH_COMBAT_LOG },
},
["STATUS_MANA"] = {
......@@ -1676,7 +1676,7 @@ VUHDO_BOUQUET_BUFFS_SPECIAL = {
["displayName"] = VUHDO_I18N_BOUQUET_STATUS_EXCESS_ABSORB,
["validator"] = VUHDO_statusExcessAbsorbValidator,
["custom_type"] = VUHDO_BOUQUET_CUSTOM_TYPE_STATUSBAR,
["interests"] = { VUHDO_UPDATE_HEALTH, VUHDO_UPDATE_HEALTH_MAX, VUHDO_UPDATE_SHIELD },
["interests"] = { VUHDO_UPDATE_HEALTH, VUHDO_UPDATE_HEALTH_MAX, VUHDO_UPDATE_SHIELD, VUHDO_UPDATE_HEALTH_COMBAT_LOG },
},
["STATUS_TOTAL_ABSORB"] = {
......@@ -1938,7 +1938,7 @@ VUHDO_BOUQUET_BUFFS_SPECIAL = {
["validator"] = VUHDO_customFlagValidator,
["custom_type"] = VUHDO_BOUQUET_CUSTOM_TYPE_CUSTOM_FLAG,
["updateCyclic"] = true,
["interests"] = { VUHDO_UPDATE_INC, VUHDO_UPDATE_HEALTH, VUHDO_UPDATE_RANGE, VUHDO_UPDATE_HEALTH_MAX, VUHDO_UPDATE_ALIVE, VUHDO_UPDATE_NUM_CLUSTER }, --ignoring some for now (eg. VUHDO_UPDATE_MANA, VUHDO_UPDATE_DC, etc.)
["interests"] = { VUHDO_UPDATE_INC, VUHDO_UPDATE_HEALTH, VUHDO_UPDATE_RANGE, VUHDO_UPDATE_HEALTH_MAX, VUHDO_UPDATE_ALIVE, VUHDO_UPDATE_NUM_CLUSTER ,VUHDO_UPDATE_HEALTH_COMBAT_LOG}, --ignoring some for now (eg. VUHDO_UPDATE_MANA, VUHDO_UPDATE_DC, etc.)
},
};
......
......@@ -34,14 +34,31 @@ local GROUP_CRIT = { };
local GROUP_MASTERY = { };
local GROUP_STATS = { };
local GROUP_SPELL_POWER = {
VUHDO_SPELL_ID.BUFF_ARCANE_BRILLIANCE,
local GROUP_STATS = {
VUHDO_SPELL_ID.BUFF_MARK_OF_THE_WILD,
VUHDO_SPELL_ID.BUFF_GIFT_OF_THE_WILD,
};
local GROUP_SPELL_POWER = { };
local GROUP_STAM = {
VUHDO_SPELL_ID.BUFF_POWER_WORD_FORTITUDE,
VUHDO_SPELL_ID.BUFF_PRAYER_OF_FORTITUDE,
};
local GROUP_SHADOW = {
VUHDO_SPELL_ID.BUFF_SHADOW_PROTECTION,
VUHDO_SPELL_ID.BUFF_PRAYER_OF_SHADOW_PROTECTION,
};
local GROUP_SPIRIT = {
VUHDO_SPELL_ID.BUFF_DIVINE_SPIRIT,
VUHDO_SPELL_ID.BUFF_PRAYER_OF_SPIRIT,
};
local GROUP_INT = {
VUHDO_SPELL_ID.BUFF_ARCANE_INTELLECT,
VUHDO_SPELL_ID.BUFF_ARCANE_BRILLIANCE,
};
......@@ -54,10 +71,19 @@ VUHDO_CLASS_BUFFS = {
-- Priest
["PRIEST"] = {
[VUHDO_SPELL_ID.BUFF_POWER_WORD_FORTITUDE] = {
{ VUHDO_SPELL_ID.BUFF_POWER_WORD_FORTITUDE, VUHDO_BUFF_TARGET_RAID, GROUP_STAM },
{ VUHDO_SPELL_ID.BUFF_POWER_WORD_FORTITUDE, VUHDO_BUFF_TARGET_SINGLE, GROUP_STAM },
{ VUHDO_SPELL_ID.BUFF_PRAYER_OF_FORTITUDE, VUHDO_BUFF_TARGET_RAID, GROUP_STAM },
},
[VUHDO_SPELL_ID.BUFF_SHADOW_PROTECTION] = {
{ VUHDO_SPELL_ID.BUFF_SHADOW_PROTECTION, VUHDO_BUFF_TARGET_SINGLE, GROUP_SHADOW },
{ VUHDO_SPELL_ID.BUFF_PRAYER_OF_SHADOW_PROTECTION, VUHDO_BUFF_TARGET_RAID, GROUP_SHADOW },
},
[VUHDO_SPELL_ID.BUFF_DIVINE_SPIRIT] = {
{ VUHDO_SPELL_ID.BUFF_DIVINE_SPIRIT, VUHDO_BUFF_TARGET_SINGLE, GROUP_SPIRIT },
{ VUHDO_SPELL_ID.BUFF_PRAYER_OF_SPIRIT, VUHDO_BUFF_TARGET_RAID, GROUP_SPIRIT },
},
[VUHDO_SPELL_ID.BUFF_SHADOWFIEND] = {
{ VUHDO_SPELL_ID.BUFF_SHADOWFIEND, VUHDO_BUFF_TARGET_HOSTILE },
[VUHDO_SPELL_ID.BUFF_FEAR_WARD] = {
{ VUHDO_SPELL_ID.BUFF_FEAR_WARD, VUHDO_BUFF_TARGET_UNIQUE },
},
[VUHDO_SPELL_ID.BUFF_POWER_INFUSION] = {
{ VUHDO_SPELL_ID.BUFF_POWER_INFUSION, VUHDO_BUFF_TARGET_UNIQUE },
......@@ -68,9 +94,9 @@ VUHDO_CLASS_BUFFS = {
[VUHDO_SPELL_ID.BUFF_LEVITATE] = {
{ VUHDO_SPELL_ID.BUFF_LEVITATE, VUHDO_BUFF_TARGET_SINGLE },
},
[VUHDO_SPELL_ID.PAIN_SUPPRESSION] = {
{ VUHDO_SPELL_ID.PAIN_SUPPRESSION, VUHDO_BUFF_TARGET_UNIQUE },
},
[VUHDO_SPELL_ID.BUFF_INNER_FIRE] = {
{ VUHDO_SPELL_ID.BUFF_INNER_FIRE, VUHDO_BUFF_TARGET_SELF },
},
},
-- Shaman
......@@ -141,43 +167,38 @@ VUHDO_CLASS_BUFFS = {
},
["DRUID"] = {
-- TODO: what would be useful for Druids?
[VUHDO_SPELL_ID.BUFF_MARK_OF_THE_WILD] = {
{ VUHDO_SPELL_ID.BUFF_MARK_OF_THE_WILD, VUHDO_BUFF_TARGET_SINGLE, GROUP_STATS },
{ VUHDO_SPELL_ID.BUFF_GIFT_OF_THE_WILD, VUHDO_BUFF_TARGET_RAID, GROUP_STATS },
},
[VUHDO_SPELL_ID.BUFF_THORNS] = {
{ VUHDO_SPELL_ID.BUFF_THORNS, VUHDO_BUFF_TARGET_SELF },
},
},
["WARLOCK"] = {
[VUHDO_SPELL_ID.BUFF_GRIMOIRE_OF_SACRIFICE] = {
{ VUHDO_SPELL_ID.BUFF_GRIMOIRE_OF_SACRIFICE, VUHDO_BUFF_TARGET_SELF },
[VUHDO_SPELL_ID.BUFF_DEMON_SKIN] = {
{ VUHDO_SPELL_ID.BUFF_DEMON_SKIN, VUHDO_BUFF_TARGET_SELF },
},
[VUHDO_SPELL_ID.BUFF_DEMON_ARMOR] = {
{ VUHDO_SPELL_ID.BUFF_DEMON_ARMOR, VUHDO_BUFF_TARGET_SELF },
},
},
["MAGE"] = {
[VUHDO_SPELL_ID.BUFF_ARCANE_BRILLIANCE] = {
{ VUHDO_SPELL_ID.BUFF_ARCANE_BRILLIANCE, VUHDO_BUFF_TARGET_RAID, GROUP_SPELL_POWER },
{ VUHDO_SPELL_ID.BUFF_ARCANE_INTELLECT, VUHDO_BUFF_TARGET_SELF, GROUP_INT },
{ VUHDO_SPELL_ID.BUFF_ARCANE_BRILLIANCE, VUHDO_BUFF_TARGET_RAID, GROUP_INT },
},
[VUHDO_SPELL_ID.BUFF_ICE_BLOCK] = {
{ VUHDO_SPELL_ID.BUFF_ICE_BLOCK, VUHDO_BUFF_TARGET_SELF },
},
[VUHDO_SPELL_ID.BUFF_COMBUSTION] = {
{ VUHDO_SPELL_ID.BUFF_COMBUSTION, VUHDO_BUFF_TARGET_SELF },
},
[VUHDO_SPELL_ID.BUFF_SLOW_FALL] = {
{ VUHDO_SPELL_ID.BUFF_SLOW_FALL, VUHDO_BUFF_TARGET_SINGLE },
},
[VUHDO_SPELL_ID.BUFF_INVISIBILITY] = {
{ VUHDO_SPELL_ID.BUFF_INVISIBILITY, VUHDO_BUFF_TARGET_SELF },
},
[VUHDO_SPELL_ID.ICE_BARRIER] = {
{ VUHDO_SPELL_ID.ICE_BARRIER, VUHDO_BUFF_TARGET_SELF },
},
[VUHDO_SPELL_ID.RUNE_OF_POWER] = {
{ VUHDO_SPELL_ID.RUNE_OF_POWER, VUHDO_BUFF_TARGET_SELF },
},
[VUHDO_SPELL_ID.TEMPORAL_SHIELD] = {
{ VUHDO_SPELL_ID.TEMPORAL_SHIELD, VUHDO_BUFF_TARGET_SELF },
},
[VUHDO_SPELL_ID.BUFF_ARCANE_FAMILIAR] = {
{ VUHDO_SPELL_ID.BUFF_ARCANE_FAMILIAR, VUHDO_BUFF_TARGET_SELF },
},
},
["DEATHKNIGHT"] = {
......@@ -188,9 +209,6 @@ VUHDO_CLASS_BUFFS = {
[VUHDO_SPELL_ID.BUFF_BATTLE_SHOUT] = {
{ VUHDO_SPELL_ID.BUFF_BATTLE_SHOUT, VUHDO_BUFF_TARGET_RAID, GROUP_ATK_POWER },
},
[VUHDO_SPELL_ID.BUFF_COMMANDING_SHOUT] = {
{ VUHDO_SPELL_ID.BUFF_COMMANDING_SHOUT, VUHDO_BUFF_TARGET_RAID },
},
},
["HUNTER"] = {
......
......@@ -43,7 +43,7 @@ local VUHDO_isInBattleground;
local VUHDO_brightenTextColor;
local VUHDO_isConfigDemoUsers;
local GetTotemInfo = GetTotemInfo;
local GetTotemInfo = VUHDO_LibTotemInfo.GetTotemInfo;
local table = table;
local strsub = strsub;
local GetTime = GetTime;
......
local VUHDO_RAID = { };
local VUHDO_RAID_GUIDS = { };
local VUHDO_INTERNAL_TOGGLES = { };
local strsplit = strsplit;
local pairs = pairs;
local VUHDO_updateHealth;
local sCurrentTarget = nil;
local sCurrentFocus = nil;
--
function VUHDO_combatLogInitLocalOverrides()
VUHDO_RAID = _G["VUHDO_RAID"];
VUHDO_RAID_GUIDS = _G["VUHDO_RAID_GUIDS"];
VUHDO_INTERNAL_TOGGLES = _G["VUHDO_INTERNAL_TOGGLES"];
VUHDO_updateHealth = _G["VUHDO_updateHealth"];
end
--
local tInfo;
local tNewHealth;
local tDeadInfo = { ["dead"] = true };
local function VUHDO_addUnitHealth(aUnit, aDelta)
tInfo = VUHDO_RAID[aUnit] or tDeadInfo;
if not tInfo["dead"] then
tNewHealth = tInfo["health"] + aDelta;
if tNewHealth < 0 then tNewHealth = 0;
elseif tNewHealth > tInfo["healthmax"] then tNewHealth = tInfo["healthmax"]; end
if tInfo["health"] ~= tNewHealth then
tInfo["health"] = tNewHealth;
VUHDO_updateHealth(aUnit, 2); -- VUHDO_UPDATE_HEALTH
end
end
end
--
local tPre, tSuf, tSpec;
local function VUHDO_getTargetHealthImpact(aMsg, aMsg1, aMsg2, aMsg4)
tPre, tSuf, tSpec = strsplit("_", aMsg);
if "SPELL" == tPre then
if ("HEAL" == tSuf or "HEAL" == tSpec) and "MISSED" ~= tSpec then
return aMsg4;
elseif "DAMAGE" == tSuf or "DAMAGE" == tSpec then
return -aMsg4;
end
elseif "DAMAGE" == tSuf then
if "SWING" == tPre then
return -aMsg1;
elseif "RANGE" == tPre then
return -aMsg4;
elseif "ENVIRONMENTAL" == tPre then
return -aMsg2;
end
elseif "DAMAGE" == tPre and "MISSED" ~= tSpec and "RESISTED" ~= tSpec then
return -aMsg4;
end
return 0;
end
--
function VUHDO_clParserSetCurrentTarget(aUnit)
sCurrentTarget = VUHDO_INTERNAL_TOGGLES[27] and aUnit or "*"; -- VUHDO_UPDATE_PLAYER_TARGET
end
--
function VUHDO_clParserSetCurrentFocus()
sCurrentFocus = nil;
for tUnit, tInfo in pairs(VUHDO_RAID) do
if UnitIsUnit("focus", tUnit) and tUnit ~= "focus" and tUnit ~= "target" then
if tInfo["isPet"] and (VUHDO_RAID[tInfo["ownerUnit"]] or {})["isVehicle"] then
sCurrentFocus = tInfo["ownerUnit"];
else
sCurrentFocus = tUnit;
end
break;
end
end
end
--
local tUnit;
local tImpact;
function VUHDO_parseCombatLogEvent(aMsg, aDstGUID, aMsg1, aMsg2, aMsg4)
tUnit = VUHDO_RAID_GUIDS[aDstGUID];