Commit ff34050a authored by Ivaria's avatar Ivaria
Browse files

Added new power types and associated power colors for Astral Power, Maelstrom and Insanity.

parent a98e175a
......@@ -1702,7 +1702,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 },
["interests"] = { VUHDO_UPDATE_INC, VUHDO_UPDATE_HEALTH, VUHDO_UPDATE_RANGE, VUHDO_UPDATE_HEALTH_MAX, VUHDO_UPDATE_ALIVE }, --ignoring some for now (eg. VUHDO_UPDATE_MANA, VUHDO_UPDATE_DC, etc.)
},
};
......
......@@ -272,12 +272,15 @@ VUHDO_UPDATE_SHIELD = 36;
-- Unit power types (== Blizzard defined types)
VUHDO_UNIT_POWER_MANA = 0;
VUHDO_UNIT_POWER_RAGE = 1;
VUHDO_UNIT_POWER_FOCUS = 2;
VUHDO_UNIT_POWER_ENERGY = 3;
VUHDO_UNIT_POWER_HAPPINESS = 4;
VUHDO_UNIT_POWER_RUNES = 6;
VUHDO_UNIT_POWER_MANA = SPELL_POWER_MANA;
VUHDO_UNIT_POWER_RAGE = SPELL_POWER_RAGE;
VUHDO_UNIT_POWER_FOCUS = SPELL_POWER_FOCUS;
VUHDO_UNIT_POWER_ENERGY = SPELL_POWER_ENERGY;
VUHDO_UNIT_POWER_HAPPINESS = SPELL_POWER_COMBO_POINTS;
VUHDO_UNIT_POWER_RUNES = SPELL_POWER_RUNIC_POWER;
VUHDO_UNIT_POWER_LUNAR_POWER = SPELL_POWER_LUNAR_POWER;
VUHDO_UNIT_POWER_MAELSTROM = SPELL_POWER_MAELSTROM;
VUHDO_UNIT_POWER_INSANITY = SPELL_POWER_INSANITY;
......
......@@ -718,12 +718,15 @@ local VUHDO_DEFAULT_CU_DE_STORED_SETTINGS = {
VUHDO_DEFAULT_POWER_TYPE_COLORS = {
[VUHDO_UNIT_POWER_MANA] = VUHDO_makeFullColor(0, 0, 1, 1, 0, 0, 1, 1),
[VUHDO_UNIT_POWER_RAGE] = VUHDO_makeFullColor(1, 0, 0, 1, 1, 0, 0, 1),
[VUHDO_UNIT_POWER_FOCUS] = VUHDO_makeFullColor(1, 0.5, 0.25, 1, 1, 0.5, 0.25, 1),
[VUHDO_UNIT_POWER_ENERGY] = VUHDO_makeFullColor(1, 1, 0, 1, 1, 1, 0, 1),
[VUHDO_UNIT_POWER_HAPPINESS] = VUHDO_makeFullColor(0, 1, 1, 1, 0, 1, 1, 1),
[VUHDO_UNIT_POWER_RUNES] = VUHDO_makeFullColor(0.5, 0.5, 0.5, 1, 0.5, 0.5, 0.5, 1),
[VUHDO_UNIT_POWER_MANA] = VUHDO_makeFullColor(0, 0, 1, 1, 0, 0, 1, 1),
[VUHDO_UNIT_POWER_RAGE] = VUHDO_makeFullColor(1, 0, 0, 1, 1, 0, 0, 1),
[VUHDO_UNIT_POWER_FOCUS] = VUHDO_makeFullColor(1, 0.5, 0.25, 1, 1, 0.5, 0.25, 1),
[VUHDO_UNIT_POWER_ENERGY] = VUHDO_makeFullColor(1, 1, 0, 1, 1, 1, 0, 1),
[VUHDO_UNIT_POWER_HAPPINESS] = VUHDO_makeFullColor(0, 1, 1, 1, 0, 1, 1, 1),
[VUHDO_UNIT_POWER_RUNES] = VUHDO_makeFullColor(0.5, 0.5, 0.5, 1, 0.5, 0.5, 0.5, 1),
[VUHDO_UNIT_POWER_LUNAR_POWER] = VUHDO_makeFullColor(0.87, 0.95, 1, 1, 0.87, 0.95, 1, 1),
[VUHDO_UNIT_POWER_MAELSTROM] = VUHDO_makeFullColor(0.09, 0.56, 1, 1, 0.09, 0.56, 1, 1),
[VUHDO_UNIT_POWER_INSANITY] = VUHDO_makeFullColor(0.15, 0.97, 1, 1, 0.15, 0.97, 1, 1),
};
......
......@@ -614,6 +614,10 @@ VUHDO_I18N_TT.K555 = "Check to allow the VuhDo menu command to be bound even whe
VUHDO_I18N_TT.K556 = "Check this to have an extra panel for boss encounter NPCs (eg. shards on Tectus, mushrooms on Brackenspore).";
VUHDO_I18N_TT.K557 = "Body of the custom flag function. Must return true or false. Example: return (\"YOURNAME\" == VUHDO_unitInfo\[\"name\"\])";
VUHDO_I18N_TT.K558 = "Hide buff watch while out of combat.";
VUHDO_I18N_TT.K559 = "Click to select focus bar color.";
VUHDO_I18N_TT.K560 = "Click to select astral power bar color.";
VUHDO_I18N_TT.K561 = "Click to select maelstrom bar color.";
VUHDO_I18N_TT.K562 = "Click to select insanity bar color.";
VUHDO_I18N_DEFAULT_PROFILE = "Default Profile";
VUHDO_I18N_DEFAULT_LAYOUT = "Default Layout";
......@@ -1094,3 +1098,8 @@ VUHDO_I18N_HIDE_OUT_OF_COMBAT = "Show Only\nIn Combat";
VUHDO_I18N_IMPORT = "Import";
VUHDO_I18N_IMPORT_STRING_INVALID = "Import string was invalid.";
VUHDO_I18N_REALLY_IMPORT = "Do you really want to import?\n\nYou should only import strings from known and\nreputable sources. Never import a string whose\nsource is not trusted.";
VUHDO_I18N_LUNAR_POWER = "Astral Power";
VUHDO_I18N_MAELSTROM = "Maelstrom";
VUHDO_I18N_INSANITY = "Insanity";
......@@ -613,6 +613,10 @@ VUHDO_I18N_TT.K555 = "Check to allow the VuhDo menu command to be bound even whe
VUHDO_I18N_TT.K556 = "Check this to have an extra panel for boss encounter NPCs (eg. shards on Tectus, mushrooms on Brackenspore).";
VUHDO_I18N_TT.K557 = "Body of the custom flag function. Must return true or false. Example: return (\"YOURNAME\" == VUHDO_unitInfo\[\"name\"\])";
VUHDO_I18N_TT.K558 = "Hide buff watch while out of combat.";
VUHDO_I18N_TT.K559 = "Click to select focus bar color.";
VUHDO_I18N_TT.K560 = "Click to select astral power bar color.";
VUHDO_I18N_TT.K561 = "Click to select maelstrom bar color.";
VUHDO_I18N_TT.K562 = "Click to select insanity bar color.";
VUHDO_I18N_DEFAULT_PROFILE = "Default Profile";
VUHDO_I18N_DEFAULT_LAYOUT = "Default Layout";
......@@ -1094,3 +1098,7 @@ VUHDO_I18N_HIDE_OUT_OF_COMBAT = "Show Only\nIn Combat";
VUHDO_I18N_IMPORT = "Import";
VUHDO_I18N_IMPORT_STRING_INVALID = "Import string was invalid.";
VUHDO_I18N_REALLY_IMPORT = "Do you really want to import?\n\nYou should only import strings from known and\nreputable sources. Never import a string whose\nsource is not trusted.";
VUHDO_I18N_LUNAR_POWER = "Astral Power";
VUHDO_I18N_MAELSTROM = "Maelstrom";
VUHDO_I18N_INSANITY = "Insanity";
......@@ -621,6 +621,10 @@ VUHDO_I18N_TT.K555 = "Check to allow the VuhDo menu command to be bound even whe
VUHDO_I18N_TT.K556 = "Check this to have an extra panel for boss encounter NPCs (eg. shards on Tectus, mushrooms on Brackenspore).";
VUHDO_I18N_TT.K557 = "Body of the custom flag function. Must return true or false. Example: return (\"YOURNAME\" == VUHDO_unitInfo\[\"name\"\])";
VUHDO_I18N_TT.K558 = "Hide buff watch while out of combat.";
VUHDO_I18N_TT.K559 = "Click to select focus bar color.";
VUHDO_I18N_TT.K560 = "Click to select astral power bar color.";
VUHDO_I18N_TT.K561 = "Click to select maelstrom bar color.";
VUHDO_I18N_TT.K562 = "Click to select insanity bar color.";
VUHDO_I18N_DEFAULT_PROFILE = "Default Profile";
VUHDO_I18N_DEFAULT_LAYOUT = "Default Layout";
......@@ -1109,3 +1113,8 @@ VUHDO_I18N_HIDE_OUT_OF_COMBAT = "Show Only\nIn Combat";
VUHDO_I18N_IMPORT = "Import";
VUHDO_I18N_IMPORT_STRING_INVALID = "Import string was invalid.";
VUHDO_I18N_REALLY_IMPORT = "Do you really want to import?\n\nYou should only import strings from known and\nreputable sources. Never import a string whose\nsource is not trusted.";
VUHDO_I18N_LUNAR_POWER = "Astral Power";
VUHDO_I18N_MAELSTROM = "Maelstrom";
VUHDO_I18N_INSANITY = "Insanity";
......@@ -623,6 +623,10 @@ VUHDO_I18N_TT.K555 = "Check to allow the VuhDo menu command to be bound even whe
VUHDO_I18N_TT.K556 = "Check this to have an extra panel for boss encounter NPCs (eg. shards on Tectus, mushrooms on Brackenspore).";
VUHDO_I18N_TT.K557 = "Body of the custom flag function. Must return true or false. Example: return (\"YOURNAME\" == VUHDO_unitInfo\[\"name\"\])";
VUHDO_I18N_TT.K558 = "Hide buff watch while out of combat.";
VUHDO_I18N_TT.K559 = "Click to select focus bar color.";
VUHDO_I18N_TT.K560 = "Click to select astral power bar color.";
VUHDO_I18N_TT.K561 = "Click to select maelstrom bar color.";
VUHDO_I18N_TT.K562 = "Click to select insanity bar color.";
VUHDO_I18N_DEFAULT_PROFILE = "Default Profile";
VUHDO_I18N_DEFAULT_LAYOUT = "Default Layout";
......@@ -1110,3 +1114,8 @@ VUHDO_I18N_HIDE_OUT_OF_COMBAT = "Show Only\nIn Combat";
VUHDO_I18N_IMPORT = "Import";
VUHDO_I18N_IMPORT_STRING_INVALID = "Import string was invalid.";
VUHDO_I18N_REALLY_IMPORT = "Do you really want to import?\n\nYou should only import strings from known and\nreputable sources. Never import a string whose\nsource is not trusted.";
VUHDO_I18N_LUNAR_POWER = "Astral Power";
VUHDO_I18N_MAELSTROM = "Maelstrom";
VUHDO_I18N_INSANITY = "Insanity";
......@@ -721,6 +721,10 @@ VUHDO_I18N_TT.K555 = "Check to allow the VuhDo menu command to be bound even whe
VUHDO_I18N_TT.K556 = "Check this to have an extra panel for boss encounter NPCs (eg. shards on Tectus, mushrooms on Brackenspore).";
VUHDO_I18N_TT.K557 = "Body of the custom flag function. Must return true or false. Example: return (\"YOURNAME\" == VUHDO_unitInfo\[\"name\"\])";
VUHDO_I18N_TT.K558 = "Hide buff watch while out of combat.";
VUHDO_I18N_TT.K559 = "Click to select focus bar color.";
VUHDO_I18N_TT.K560 = "Click to select astral power bar color.";
VUHDO_I18N_TT.K561 = "Click to select maelstrom bar color.";
VUHDO_I18N_TT.K562 = "Click to select insanity bar color.";
VUHDO_I18N_DEFAULT_PROFILE = "Default Profile";
VUHDO_I18N_DEFAULT_LAYOUT = "Default Layout";
......@@ -1274,3 +1278,8 @@ VUHDO_I18N_HIDE_OUT_OF_COMBAT = "Show Only\nIn Combat";
VUHDO_I18N_IMPORT = "Import";
VUHDO_I18N_IMPORT_STRING_INVALID = "Import string was invalid.";
VUHDO_I18N_REALLY_IMPORT = "Do you really want to import?\n\nYou should only import strings from known and\nreputable sources. Never import a string whose\nsource is not trusted.";
VUHDO_I18N_LUNAR_POWER = "Astral Power";
VUHDO_I18N_MAELSTROM = "Maelstrom";
VUHDO_I18N_INSANITY = "Insanity";
......@@ -615,6 +615,10 @@ VUHDO_I18N_TT.K555 = "Check to allow the VuhDo menu command to be bound even whe
VUHDO_I18N_TT.K556 = "Check this to have an extra panel for boss encounter NPCs (eg. shards on Tectus, mushrooms on Brackenspore).";
VUHDO_I18N_TT.K557 = "Body of the custom flag function. Must return true or false. Example: return (\"YOURNAME\" == VUHDO_unitInfo\[\"name\"\])";
VUHDO_I18N_TT.K558 = "Hide buff watch while out of combat.";
VUHDO_I18N_TT.K559 = "Click to select focus bar color.";
VUHDO_I18N_TT.K560 = "Click to select astral power bar color.";
VUHDO_I18N_TT.K561 = "Click to select maelstrom bar color.";
VUHDO_I18N_TT.K562 = "Click to select insanity bar color.";
VUHDO_I18N_DEFAULT_PROFILE = "Default Profile";
VUHDO_I18N_DEFAULT_LAYOUT = "Default Layout";
......@@ -1096,3 +1100,8 @@ VUHDO_I18N_HIDE_OUT_OF_COMBAT = "Show Only\nIn Combat";
VUHDO_I18N_IMPORT = "Import";
VUHDO_I18N_IMPORT_STRING_INVALID = "Import string was invalid.";
VUHDO_I18N_REALLY_IMPORT = "Do you really want to import?\n\nYou should only import strings from known and\nreputable sources. Never import a string whose\nsource is not trusted.";
VUHDO_I18N_LUNAR_POWER = "Astral Power";
VUHDO_I18N_MAELSTROM = "Maelstrom";
VUHDO_I18N_INSANITY = "Insanity";
......@@ -615,6 +615,10 @@ VUHDO_I18N_TT.K555 = "Check to allow the VuhDo menu command to be bound even whe
VUHDO_I18N_TT.K556 = "Check this to have an extra panel for boss encounter NPCs (eg. shards on Tectus, mushrooms on Brackenspore).";
VUHDO_I18N_TT.K557 = "Body of the custom flag function. Must return true or false. Example: return (\"YOURNAME\" == VUHDO_unitInfo\[\"name\"\])";
VUHDO_I18N_TT.K558 = "Hide buff watch while out of combat.";
VUHDO_I18N_TT.K559 = "Click to select focus bar color.";
VUHDO_I18N_TT.K560 = "Click to select astral power bar color.";
VUHDO_I18N_TT.K561 = "Click to select maelstrom bar color.";
VUHDO_I18N_TT.K562 = "Click to select insanity bar color.";
VUHDO_I18N_DEFAULT_PROFILE = "Default Profile";
VUHDO_I18N_DEFAULT_LAYOUT = "Default Layout";
......@@ -1096,3 +1100,8 @@ VUHDO_I18N_HIDE_OUT_OF_COMBAT = "Show Only\nIn Combat";
VUHDO_I18N_IMPORT = "Import";
VUHDO_I18N_IMPORT_STRING_INVALID = "Import string was invalid.";
VUHDO_I18N_REALLY_IMPORT = "Do you really want to import?\n\nYou should only import strings from known and\nreputable sources. Never import a string whose\nsource is not trusted.";
VUHDO_I18N_LUNAR_POWER = "Astral Power";
VUHDO_I18N_MAELSTROM = "Maelstrom";
VUHDO_I18N_INSANITY = "Insanity";
......@@ -3,12 +3,12 @@
<Frames>
<Frame name="$parentPowerTypesPanel" inherits="VuhDoPanelTemplate">
<Size>
<AbsDimension x="126" y="249" />
<AbsDimension x="126" y="359" />
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="146" y="-72" />
<AbsDimension x="146" y="-42" />
</Offset>
</Anchor>
</Anchors>
......@@ -102,12 +102,63 @@
<Scripts>
<OnLoad>
VUHDO_lnfSetModel(self, "VUHDO_POWER_TYPE_COLORS.##2");
VUHDO_lnfInitColorSwatch(self, "Energy", "Energy");
VUHDO_lnfSetTooltip(self, nil);
VUHDO_lnfInitColorSwatch(self, VUHDO_I18N_FOCUS, VUHDO_I18N_FOCUS);
VUHDO_lnfSetTooltip(self, VUHDO_I18N_TT.K559);
</OnLoad>
</Scripts>
</Frame>
<Frame name="$parentLunarPowerTexture" inherits="VuhDoColorSwatchTexture">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="13" y="-240" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
VUHDO_lnfSetModel(self, "VUHDO_POWER_TYPE_COLORS.##8");
VUHDO_lnfInitColorSwatch(self, VUHDO_I18N_LUNAR_POWER, VUHDO_I18N_LUNAR_POWER);
VUHDO_lnfSetTooltip(self, VUHDO_I18N_TT.K560);
</OnLoad>
</Scripts>
</Frame>
<Frame name="$parentMaelstromTexture" inherits="VuhDoColorSwatchTexture">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="13" y="-278" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
VUHDO_lnfSetModel(self, "VUHDO_POWER_TYPE_COLORS.##11");
VUHDO_lnfInitColorSwatch(self, VUHDO_I18N_MAELSTROM, VUHDO_I18N_MAELSTROM);
VUHDO_lnfSetTooltip(self, VUHDO_I18N_TT.K561);
</OnLoad>
</Scripts>
</Frame>
<Frame name="$parentInsanityTexture" inherits="VuhDoColorSwatchTexture">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="13" y="-316" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
VUHDO_lnfSetModel(self, "VUHDO_POWER_TYPE_COLORS.##13");
VUHDO_lnfInitColorSwatch(self, VUHDO_I18N_INSANITY, VUHDO_I18N_INSANITY);
VUHDO_lnfSetTooltip(self, VUHDO_I18N_TT.K562);
</OnLoad>
</Scripts>
</Frame>
</Frames>
</Frame>
</Frames>
......
......@@ -305,8 +305,8 @@ function VUHDO_determineRole(aUnit)
end
elseif 28 == tClassId then -- VUHDO_ID_PRIESTS
_, _, tBuffExist = UnitBuff(aUnit, VUHDO_SPELL_ID.SHADOWFORM);
if (tBuffExist) then
tPowerType = UnitPowerType(aUnit);
if VUHDO_UNIT_POWER_INSANITY == tPowerType then
VUHDO_FIX_ROLES[tName] = 62; -- VUHDO_ID_RANGED_DAMAGE
return 62; -- VUHDO_ID_RANGED_DAMAGE
else
......@@ -326,13 +326,10 @@ function VUHDO_determineRole(aUnit)
elseif 27 == tClassId then -- VUHDO_ID_DRUIDS
tPowerType = UnitPowerType(aUnit);
if VUHDO_UNIT_POWER_MANA == tPowerType then
_, _, tBuffExist = UnitBuff(aUnit, VUHDO_SPELL_ID.MOONKIN_FORM);
if tBuffExist then
VUHDO_FIX_ROLES[tName] = 62; -- VUHDO_ID_RANGED_DAMAGE
return 62; -- VUHDO_ID_RANGED_DAMAGE
else
return 63; -- VUHDO_ID_RANGED_HEAL
end
return 63; -- VUHDO_ID_RANGED_HEAL
elseif VUHDO_UNIT_POWER_LUNAR_POWER == tPowerType then
VUHDO_FIX_ROLES[tName] = 62; -- VUHDO_ID_RANGED_DAMAGE
return 62; -- VUHDO_ID_RANGED_DAMAGE
elseif VUHDO_UNIT_POWER_RAGE == tPowerType then
VUHDO_FIX_ROLES[tName] = 60; -- VUHDO_ID_MELEE_TANK
return 60; -- VUHDO_ID_MELEE_TANK
......@@ -370,10 +367,11 @@ function VUHDO_determineRole(aUnit)
if tAgility > tIntellect then
return 61; -- VUHDO_ID_MELEE_DAMAGE
else
if VUHDO_DF_TOOL_ROLES[tName] == 61 then -- VUHDO_ID_MELEE_DAMAGE
tPowerType = UnitPowerType(aUnit);
if VUHDO_UNIT_POWER_MAELSTROM == tPowerType then -- VUHDO_ID_RANGED_DAMAGE
return 62; -- VUHDO_ID_RANGED_DAMAGE
else
return 63; -- Can't tell, assume its a healer -- VUHDO_ID_RANGED_HEAL
return 63; -- VUHDO_ID_RANGED_HEAL
end
end
end
......
......@@ -28,6 +28,7 @@ Bugfixes:
Improvements:
-- Added new power types and power colors (Astral Power, Maelstrom, Insanity)
--------------------------------------------------------------
......
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