Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Krazyito
VuhDo
Commits
3382ea16
Commit
3382ea16
authored
10 years ago
by
Ivaria
Browse files
Options
Download
Email Patches
Plain Diff
Misc fixes around custom debuff settings - closes CurseForge ticket 342
parent
657c10d1
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
97 additions
and
38 deletions
+97
-38
VuhDo.toc
VuhDo.toc
+1
-1
VuhDoBarCustomizerDebuffIcon.lua
VuhDoBarCustomizerDebuffIcon.lua
+3
-3
VuhDoDebuffs.lua
VuhDoDebuffs.lua
+33
-21
VuhDoOptions/VuhDoNewOptionsDebuffsCustom.lua
VuhDoOptions/VuhDoNewOptionsDebuffsCustom.lua
+13
-9
VuhDoToolbox.lua
VuhDoToolbox.lua
+39
-0
changelog.txt
changelog.txt
+8
-4
No files found.
VuhDo.toc
View file @
3382ea16
## Interface: 60000
## Title: VuhDo ['vu:du:]
## Author: Iza@Gilneas, humfras
## Version: 3.6
## Version: 3.6
0
## 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
_
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
...
...
This diff is collapsed.
Click to expand it.
VuhDoBarCustomizerDebuffIcon.lua
View file @
3382ea16
...
...
@@ -74,7 +74,7 @@ local tButton;
local
tIsAnim
;
local
function
VUHDO_animateDebuffIcon
(
aButton
,
anIconInfo
,
aNow
,
anIconIndex
,
anIsInit
,
aUnit
)
tCuDeStoConfig
=
sCuDeStoredSettings
[
anIconInfo
[
3
]]
or
sStaticConfig
;
tCuDeStoConfig
=
sCuDeStoredSettings
[
anIconInfo
[
3
]]
or
sCuDeStoredSettings
[
tostring
(
anIconInfo
[
7
])]
or
sStaticConfig
;
tIsAnim
=
tCuDeStoConfig
[
"animate"
]
and
VUHDO_MAY_DEBUFF_ANIM
;
tTimeStamp
=
anIconInfo
[
2
];
tAliveTime
=
anIsInit
and
0
or
aNow
-
tTimeStamp
;
...
...
@@ -152,7 +152,7 @@ local tSlot;
local
tOldest
;
local
tTimestamp
;
local
tFrame
,
tIconInfo
;
function
VUHDO_addDebuffIcon
(
aUnit
,
anIcon
,
aName
,
anExpiry
,
aStacks
,
aDuration
,
anIsBuff
)
function
VUHDO_addDebuffIcon
(
aUnit
,
anIcon
,
aName
,
anExpiry
,
aStacks
,
aDuration
,
anIsBuff
,
aSpellId
)
if
not
VUHDO_DEBUFF_ICONS
[
aUnit
]
then
VUHDO_DEBUFF_ICONS
[
aUnit
]
=
{
};
end
...
...
@@ -169,7 +169,7 @@ function VUHDO_addDebuffIcon(aUnit, anIcon, aName, anExpiry, aStacks, aDuration,
end
end
end
tIconInfo
=
{
anIcon
,
-
1
,
aName
,
anExpiry
,
aStacks
,
aDuration
};
tIconInfo
=
{
anIcon
,
-
1
,
aName
,
anExpiry
,
aStacks
,
aDuration
,
aSpellId
};
VUHDO_DEBUFF_ICONS
[
aUnit
][
tSlot
]
=
tIconInfo
;
for
_
,
tButton
in
pairs
(
VUHDO_getUnitButtonsSafe
(
aUnit
))
do
...
...
This diff is collapsed.
Click to expand it.
VuhDoDebuffs.lua
View file @
3382ea16
...
...
@@ -189,15 +189,15 @@ end
local
tIconIndex
=
0
;
local
tIconArray
;
local
tIconArrayDispenser
=
{
};
local
function
VUHDO_getOrCreateIconArray
(
anIcon
,
aExpiry
,
aStacks
,
aDuration
,
anIsBuff
)
local
function
VUHDO_getOrCreateIconArray
(
anIcon
,
aExpiry
,
aStacks
,
aDuration
,
anIsBuff
,
aSpellId
)
tIconIndex
=
tIconIndex
+
1
;
if
#
tIconArrayDispenser
<
tIconIndex
then
tIconArray
=
{
anIcon
,
aExpiry
,
aStacks
,
aDuration
,
anIsBuff
};
tIconArray
=
{
anIcon
,
aExpiry
,
aStacks
,
aDuration
,
anIsBuff
,
aSpellId
};
tIconArrayDispenser
[
tIconIndex
]
=
tIconArray
;
else
tIconArray
=
tIconArrayDispenser
[
tIconIndex
];
tIconArray
[
1
],
tIconArray
[
2
],
tIconArray
[
3
],
tIconArray
[
4
],
tIconArray
[
5
]
=
anIcon
,
aExpiry
,
aStacks
,
aDuration
,
anIsBuff
;
tIconArray
[
1
],
tIconArray
[
2
],
tIconArray
[
3
],
tIconArray
[
4
],
tIconArray
[
5
]
,
tIconArray
[
6
]
=
anIcon
,
aExpiry
,
aStacks
,
aDuration
,
anIsBuff
,
aSpellId
;
end
return
tIconArray
;
...
...
@@ -234,7 +234,7 @@ setmetatable(VUHDO_UNIT_DEBUFF_INFOS, {
local
sCurChosenType
;
local
sCurChosenName
;
local
sCur
SoundName
;
local
sCur
ChosenSpellId
;
local
sCurIsStandard
;
local
sCurIcons
=
{
};
...
...
@@ -248,7 +248,7 @@ local function VUHDO_initDebuffInfos(aUnit)
sCurChosenType
=
VUHDO_DEBUFF_TYPE_NONE
;
sCurChosenName
=
""
;
sCur
SoundName
=
nil
;
sCur
ChosenSpellId
=
nil
;
sCurIsStandard
=
false
;
tIconIndex
=
0
;
twipe
(
sCurIcons
);
...
...
@@ -271,6 +271,8 @@ local tIsRelevant;
local
tNow
;
local
tUnitDebuffInfo
;
local
tType
;
local
tDebuffSettings
;
local
tCurChosenStoredName
;
function
VUHDO_determineDebuff
(
aUnit
)
tInfo
=
(
VUHDO_RAID
or
sEmpty
)[
aUnit
];
...
...
@@ -290,16 +292,15 @@ function VUHDO_determineDebuff(aUnit)
if
(
tExpiry
or
0
)
==
0
then
tExpiry
=
(
sCurIcons
[
tName
]
or
sEmpty
)[
2
]
or
tNow
;
end
-- Custom Debuff?
tDebuffConfig
=
VUHDO_CUSTOM_DEBUFF_CONFIG
[
tName
]
or
VUHDO_CUSTOM_DEBUFF_CONFIG
[
tostring
(
tSpellId
or
-
1
)]
or
sEmpty
;
tDebuffConfig
=
VUHDO_CUSTOM_DEBUFF_CONFIG
[
tName
]
or
VUHDO_CUSTOM_DEBUFF_CONFIG
[
tostring
(
tSpellId
)]
or
sEmpty
;
if
tDebuffConfig
[
1
]
then
-- Farbe?
sCurChosenType
,
sCurChosenName
,
sCur
SoundName
=
6
,
tName
,
t
Name
;
-- VUHDO_DEBUFF_TYPE_CUSTOM
sCurChosenType
,
sCurChosenName
,
sCur
ChosenSpellId
=
6
,
tName
,
t
SpellId
;
-- VUHDO_DEBUFF_TYPE_CUSTOM
end
if
sCurIcons
[
tName
]
then
tStacks
=
tStacks
+
sCurIcons
[
tName
][
3
];
end
if
tDebuffConfig
[
2
]
then
-- Icon?
sCurIcons
[
tName
]
=
VUHDO_getOrCreateIconArray
(
tIcon
,
tExpiry
,
tStacks
,
tDuration
,
false
);
sCurSoundName
=
tName
;
sCurIcons
[
tName
]
=
VUHDO_getOrCreateIconArray
(
tIcon
,
tExpiry
,
tStacks
,
tDuration
,
false
,
tSpellId
);
end
tType
=
VUHDO_DEBUFF_TYPES
[
tTypeString
];
...
...
@@ -322,7 +323,7 @@ function VUHDO_determineDebuff(aUnit)
if
sIsUseDebuffIcon
and
(
tIsBossDebuff
or
not
sIsUseDebuffIconBossOnly
)
and
(
sIsNotRemoveableOnlyIcons
or
tAbility
~=
nil
)
then
sCurIcons
[
tName
]
=
VUHDO_getOrCreateIconArray
(
tIcon
,
tExpiry
,
tStacks
,
tDuration
,
false
);
sCurIcons
[
tName
]
=
VUHDO_getOrCreateIconArray
(
tIcon
,
tExpiry
,
tStacks
,
tDuration
,
false
,
tSpellId
);
sCurIsStandard
=
true
;
end
...
...
@@ -338,29 +339,32 @@ function VUHDO_determineDebuff(aUnit)
tName
,
_
,
tIcon
,
tStacks
,
_
,
tDuration
,
tExpiry
,
_
,
_
,
_
,
tSpellId
=
UnitBuff
(
aUnit
,
tCnt
);
if
not
tIcon
then
break
;
end
tDebuffConfig
=
VUHDO_CUSTOM_DEBUFF_CONFIG
[
tName
]
or
VUHDO_CUSTOM_DEBUFF_CONFIG
[
tostring
(
tSpellId
or
-
1
)]
or
sEmpty
;
tDebuffConfig
=
VUHDO_CUSTOM_DEBUFF_CONFIG
[
tName
]
or
VUHDO_CUSTOM_DEBUFF_CONFIG
[
tostring
(
tSpellId
)]
or
sEmpty
;
if
tDebuffConfig
[
1
]
then
-- Set color
sCurChosenType
,
sCurChosenName
,
sCur
SoundName
=
6
,
tName
,
t
Name
;
-- VUHDO_DEBUFF_TYPE_CUSTOM
sCurChosenType
,
sCurChosenName
,
sCur
ChosenSpellId
=
6
,
tName
,
t
SpellId
;
-- VUHDO_DEBUFF_TYPE_CUSTOM
end
if
tDebuffConfig
[
2
]
then
-- Set icon
sCurIcons
[
tName
]
=
VUHDO_getOrCreateIconArray
(
tIcon
,
tExpiry
,
tStacks
or
0
,
tDuration
,
true
);
sCurSoundName
=
tName
;
sCurIcons
[
tName
]
=
VUHDO_getOrCreateIconArray
(
tIcon
,
tExpiry
,
tStacks
or
0
,
tDuration
,
true
,
tSpellId
);
end
end
-- Gained new custom debuff?
-- note we only play sounds for debuff customs with isIcon set to true
for
tName
,
tDebuffInfo
in
pairs
(
sCurIcons
)
do
if
not
VUHDO_UNIT_CUSTOM_DEBUFFS
[
aUnit
][
tName
]
then
VUHDO_UNIT_CUSTOM_DEBUFFS
[
aUnit
][
tName
]
=
{
tDebuffInfo
[
2
],
tDebuffInfo
[
3
]
};
VUHDO_addDebuffIcon
(
aUnit
,
tDebuffInfo
[
1
],
tName
,
tDebuffInfo
[
2
],
tDebuffInfo
[
3
],
tDebuffInfo
[
4
],
tDebuffInfo
[
5
]);
VUHDO_addDebuffIcon
(
aUnit
,
tDebuffInfo
[
1
],
tName
,
tDebuffInfo
[
2
],
tDebuffInfo
[
3
],
tDebuffInfo
[
4
],
tDebuffInfo
[
5
],
tDebuffInfo
[
6
]);
if
not
VUHDO_IS_CONFIG
and
VUHDO_MAY_DEBUFF_ANIM
then
-- the key used to store the debuff settings is either the debuff name or spell ID
tDebuffSettings
=
sAllDebuffSettings
[
tName
]
or
sAllDebuffSettings
[
tostring
(
tDebuffInfo
[
6
])];
if
not
VUHDO_IS_CONFIG
and
VUHDO_MAY_DEBUFF_ANIM
and
tSoundDebuff
then
if
sAllDebuffSettings
[
tSoundDebuff
]
then
-- Spezieller custom debuff sound?
VUHDO_playDebuffSound
(
sAllDebuffSettings
[
tSoundDebuff
][
"SOUND"
]);
elseif
VUHDO_CONFIG
[
"CUSTOM_DEBUFF"
][
"SOUND"
]
then
-- Allgemeiner custom debuff sound?
if
tDebuffSettings
then
-- particular custom debuff sound?
VUHDO_playDebuffSound
(
tDebuffSettings
[
"SOUND"
]);
elseif
VUHDO_CONFIG
[
"CUSTOM_DEBUFF"
][
"SOUND"
]
then
-- default custom debuff sound?
VUHDO_playDebuffSound
(
VUHDO_CONFIG
[
"CUSTOM_DEBUFF"
][
"SOUND"
]);
end
end
...
...
@@ -403,7 +407,15 @@ function VUHDO_determineDebuff(aUnit)
sCurChosenType
=
VUHDO_DEBUFF_TYPE_MISSING_BUFF
;
end
return
sCurChosenType
,
sCurChosenName
;
-- we need to return the actual key the debuff settings are stored under
-- this is either the debuff name or the debuff spell ID
if
sAllDebuffSettings
[
sCurChosenName
]
then
tCurChosenStoredName
=
sCurChosenName
;
elseif
sAllDebuffSettings
[
tostring
(
sCurChosenSpellId
)]
then
tCurChosenStoredName
=
tostring
(
sCurChosenSpellId
);
end
return
sCurChosenType
,
tCurChosenStoredName
;
end
local
VUHDO_determineDebuff
=
VUHDO_determineDebuff
;
...
...
This diff is collapsed.
Click to expand it.
VuhDoOptions/VuhDoNewOptionsDebuffsCustom.lua
View file @
3382ea16
...
...
@@ -106,17 +106,21 @@ function VUHDO_customDebuffUpdateEditBox(anEditBox)
VUHDO_setComboModel
(
tComboBox
,
"VUHDO_CONFIG.CUSTOM_DEBUFF.STORED_SETTINGS."
..
tValue
..
".SOUND"
,
VUHDO_SOUNDS
);
VUHDO_lnfComboBoxInitFromModel
(
tComboBox
);
tColorSwatch
=
_G
[
tPanelName
..
"ColorTexture"
];
if
(
VUHDO_CONFIG
[
"CUSTOM_DEBUFF"
][
"STORED_SETTINGS"
][
tValue
].
isColor
)
then
if
(
VUHDO_CONFIG
[
"CUSTOM_DEBUFF"
][
"STORED_SETTINGS"
][
tValue
].
color
==
nil
)
then
VUHDO_CONFIG
[
"CUSTOM_DEBUFF"
][
"STORED_SETTINGS"
][
tValue
].
color
=
VUHDO_deepCopyTable
(
VUHDO_PANEL_SETUP
.
BAR_COLORS
[
"DEBUFF"
..
VUHDO_DEBUFF_TYPE_CUSTOM
]);
VUHDO_CONFIG
[
"CUSTOM_DEBUFF"
][
"STORED_SETTINGS"
][
tValue
].
color
=
VUHDO_deepCopyTable
(
VUHDO_PANEL_SETUP
.
BAR_COLORS
[
"DEBUFF"
..
VUHDO_DEBUFF_TYPE_CUSTOM
]);
end
VUHDO_lnfSetModel
(
tColorSwatch
,
"VUHDO_CONFIG.CUSTOM_DEBUFF.STORED_SETTINGS."
..
tValue
..
".color"
);
else
VUHDO_CONFIG
[
"CUSTOM_DEBUFF"
][
"STORED_SETTINGS"
][
tValue
].
color
=
nil
;
VUHDO_lnfSetModel
(
tColorSwatch
,
"VUHDO_PANEL_SETUP.BAR_COLORS.DEBUFF"
..
VUHDO_DEBUFF_TYPE_CUSTOM
);
end
tColorSwatch
=
_G
[
tPanelName
..
"ColorTexture"
];
VUHDO_lnfSetModel
(
tColorSwatch
,
"VUHDO_CONFIG.CUSTOM_DEBUFF.STORED_SETTINGS."
..
tValue
..
".color"
);
VUHDO_lnfInitColorSwatch
(
tColorSwatch
,
VUHDO_I18N_COLOR
,
VUHDO_I18N_COLOR
);
VUHDO_lnfColorSwatchInitFromModel
(
tColorSwatch
);
...
...
@@ -217,8 +221,6 @@ function VUHDO_saveCustomDebuffOnClick(aButton)
tPanelName
=
aButton
:
GetParent
():
GetName
();
VUHDO_CONFIG
[
"CUSTOM_DEBUFF"
][
"STORED_SETTINGS"
][
tValue
]
=
{
};
tCheckButton
=
_G
[
tPanelName
..
"IconCheckButton"
];
VUHDO_CONFIG
[
"CUSTOM_DEBUFF"
][
"STORED_SETTINGS"
][
tValue
].
isIcon
=
VUHDO_forceBooleanValue
(
tCheckButton
:
GetChecked
());
...
...
@@ -247,9 +249,11 @@ function VUHDO_saveCustomDebuffOnClick(aButton)
tColorSwatch
=
_G
[
tPanelName
..
"ColorTexture"
];
if
(
VUHDO_COLOR_SWATCH_MODEL
==
nil
)
then
VUHDO_CONFIG
[
"CUSTOM_DEBUFF"
][
"STORED_SETTINGS"
][
tValue
].
color
=
VUHDO_deepCopyTable
(
VUHDO_PANEL_SETUP
.
BAR_COLORS
[
"DEBUFF"
..
VUHDO_DEBUFF_TYPE_CUSTOM
]);
if
(
VUHDO_COLOR_SWATCH_MODEL
==
nil
)
then
if
(
VUHDO_CONFIG
[
"CUSTOM_DEBUFF"
][
"STORED_SETTINGS"
][
tValue
].
color
==
nil
)
then
VUHDO_CONFIG
[
"CUSTOM_DEBUFF"
][
"STORED_SETTINGS"
][
tValue
].
color
=
VUHDO_deepCopyTable
(
VUHDO_PANEL_SETUP
.
BAR_COLORS
[
"DEBUFF"
..
VUHDO_DEBUFF_TYPE_CUSTOM
]);
end
else
VUHDO_CONFIG
[
"CUSTOM_DEBUFF"
][
"STORED_SETTINGS"
][
tValue
].
color
=
VUHDO_deepCopyTable
(
VUHDO_COLOR_SWATCH_MODEL
);
...
...
This diff is collapsed.
Click to expand it.
VuhDoToolbox.lua
View file @
3382ea16
...
...
@@ -818,3 +818,42 @@ function VUHDO_getCurrentKeyModifierString()
IsControlKeyDown
()
and
"ctrl"
or
""
,
IsShiftKeyDown
()
and
"shift"
or
""
);
end
-- Helper to serialize a table to a string for pretty printing
-- Taken from Lua Users Wiki: http://lua-users.org/wiki/TableUtils
function
VUHDO_tableValueToString
(
v
)
if
"string"
==
type
(
v
)
then
v
=
string.gsub
(
v
,
"
\n
"
,
"
\\
n"
)
if
string.match
(
string.gsub
(
v
,
"[^'\"
]
",""), '^"
+
$
' ) then
return "'
" .. v .. "
'"
end
return '
"' .. string.gsub(v,'"
', '
\\
"' ) .. '"
'
else
return "table" == type( v ) and VUHDO_tableToString( v ) or
tostring( v )
end
end
function VUHDO_tableKeyToString(k)
if "string" == type( k ) and string.match( k, "^[_%a][_%a%d]*$" ) then
return k
else
return "[" .. VUHDO_tableValueToString( k ) .. "]"
end
end
function VUHDO_tableToString(tbl)
local result, done = {}, {}
for k, v in ipairs( tbl ) do
table.insert( result, VUHDO_tableValueToString( v ) )
done[ k ] = true
end
for k, v in pairs( tbl ) do
if not done[ k ] then
table.insert( result,
VUHDO_tableKeyToString( k ) .. "=" .. VUHDO_tableValueToString( v ) )
end
end
return "{" .. table.concat( result, "," ) .. "}"
end
This diff is collapsed.
Click to expand it.
changelog.txt
View file @
3382ea16
Version 3.6.
Version 3.6
0
.
Bugfixes:
-- Fixed bug where saving custom debuff settings would reset the custom debuff color
-- Fixed bug where custom debuffs added by spell ID did not have all settings applied
-- Fixed bug where custom debuffs were not playing sounds when selected
-- Fixed bug where isInSameZone check always returned true
-- BuffWatch now correctly ignores other players outside the players zone
-- Global scanner perf bump when 'same zone' limit selected
...
...
@@ -57,15 +60,16 @@ Features:
TODO:
-- Added Priest spell Holy Nova support for AOE advisor
-- Added Priest spell Holy Nova support for cluster indicator
-- Updated combat log event processing for multistrike
-- SWING_DAMAGE/SPELL_DAMAGE/SPELL_PERIODIC_DAMAGE has new params after crushing (isOffHand, multistrike)
-- SPELL_HEAL/SPELL_PERIODIC_HEAL has new param after critical (multistrike)
-- SPELL_MISSED/SPELL_PERIODIC_MISSED/RANGE_MISSED/SWING_MISSED has new param after isOffHand (multistrike)
-- Added new instance difficulties
-- Tools > Profiles > Activate due to group size
-- Move > Hold to Test
-- Updated incoming/over heal estimation
-- Not a bug in VuhDo - UnitGetIncomingHeals appears to return bogus values on beta
-- Appears to not bw a bug in VuhDo
-- UnitGetIncomingHeals API seems to return bogus values on beta/PTR
-- Updated AOE advisor spell bases
-- Healing spell base values have been removed (eg. H = Cx + B is now H = Cx)
-- Need to empirically test coefficients shown on beta tooltips
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment