Commit bd9bd4ed authored by Ivaria's avatar Ivaria
Browse files

Integrate LibThreatClassic to estimate threat status

parent 34509b83
......@@ -13,6 +13,13 @@ 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/AceTimer-3.0: https://repos.wowace.com/wow/ace3/trunk/AceTimer-3.0
Libs/AceSerializer-3.0: https://repos.wowace.com/wow/ace3/trunk/AceSerializer-3.0
Libs/AceComm-3.0: https://repos.wowace.com/wow/ace3/trunk/AceComm-3.0
Libs/LibSharedMedia-3.0: svn://svn.wowace.com/wow/libsharedmedia-3-0/mainline/trunk/LibSharedMedia-3.0
Libs/LibDataBroker-1.1: git://git.wowace.com/wow/libdatabroker-1-1/mainline.git
Libs/UTF8: svn://svn.wowace.com/wow/utf8/mainline/trunk
......@@ -22,6 +29,7 @@ externals:
Libs/LibCustomGlow-1.0: git://github.com/Stanzilla/LibCustomGlow.git
Libs/LibClassicDurations: https://repos.curseforge.com/wow/libclassicdurations
Libs/LibClassicHealComm-1.0: https://github.com/Aviana/LibClassicHealComm-1.0.git
Libs/ThreatClassic-1.0: https://github.com/EsreverWoW/LibThreatClassic.git
VuhDoOptions/Libs/ChatThrottleLib: svn://svn.wowace.com/wow/chatthrottlelib/mainline/trunk
......
......@@ -9,14 +9,20 @@
## DefaultState: Enabled
## LoadOnDemand: 0
VuhDo.xml
Libs\AceAddon-3.0\AceAddon-3.0.xml
Libs\AceGUI-3.0\AceGUI-3.0.xml
Libs\AceConfig-3.0\AceConfig-3.0.xml
Libs\AceBucket-3.0\AceBucket-3.0.xml
Libs\AceComm-3.0\AceComm-3.0.xml
Libs\AceEvent-3.0\AceEvent-3.0.xml
Libs\AceTimer-3.0\AceTimer-3.0.xml
Libs\AceSerializer-3.0\AceSerializer-3.0.xml
Libs\UTF8\utf8.lua
Libs\UTF8\utf8data.lua
Libs\ThreatClassic-1.0\lib.xml
VuhDo.xml
VuhDoPanel.xml
VuhDoBuffWatch.xml
......@@ -24,6 +24,8 @@ if VUHDO_LibClassicDurations then
VUHDO_LibClassicDurations:Register("VuhDo");
end
VUHDO_LibThreatClassic = LibStub("ThreatClassic-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");
......
......@@ -1134,12 +1134,39 @@ end
function VUHDO_unitThreatSituation(...)
function VUHDO_unitThreatSituation(aUnit)
if not aUnit then
return nil;
end
if not UnitThreatSituation then
return 0;
if VUHDO_LibThreatClassic then
local tOtherUnit = nil;
-- check target and boss unit threat
if UnitExists(aUnit .. "target") and UnitIsEnemy(aUnit, aUnit .. "target") then
tOtherUnit = aUnit .. "target";
elseif UnitExists("target") and UnitIsEnemy("player", "target") then
tOtherUnit = "target";
elseif UnitExists("boss1") and UnitIsEnemy("player", "boss1") then
tOtherUnit = "boss1";
elseif UnitExists("boss2") and UnitIsEnemy("player", "boss2") then
tOtherUnit = "boss2";
elseif UnitExists("boss3") and UnitIsEnemy("player", "boss3") then
tOtherUnit = "boss3";
elseif UnitExists("boss4") and UnitIsEnemy("player", "boss4") then
tOtherUnit = "boss4";
elseif UnitExists("boss5") and UnitIsEnemy("player", "boss5") then
tOtherUnit = "boss5";
end
return VUHDO_LibThreatClassic:UnitThreatSituation(aUnit, tOtherUnit);
else
return nil;
end
else
return UnitThreatSituation(...);
return UnitThreatSituation(aUnit);
end
end
......
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