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
Andrew Reed
VuhDo
Commits
8d0bf5b1
Commit
8d0bf5b1
authored
8 years ago
by
Ivaria
Browse files
Options
Download
Email Patches
Plain Diff
Fixed loading and error handling for custom flag validator trigger code.
parent
75df6924
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
VuhDoBouquetValidators.lua
VuhDoBouquetValidators.lua
+11
-4
No files found.
VuhDoBouquetValidators.lua
View file @
8d0bf5b1
...
...
@@ -1064,8 +1064,15 @@ end
--
local
function
VUHDO_customFlagValidator
(
anInfo
,
aCustom
)
if
aCustom
and
aCustom
[
"custom"
]
and
aCustom
[
"custom"
][
1
]
then
local
loadedFunction
,
errorString
=
loadstring
(
"local VUHDO_unitInfo = _G[\"
VUHDO_anInfo
\
"];"
..
aCustom
[
"custom"
][
1
]);
if
aCustom
and
aCustom
[
"custom"
]
and
aCustom
[
"custom"
][
"function"
]
then
local
customCodeString
=
"return true;"
;
-- compatibility with prior alphas where default code string was '1'
if
aCustom
[
"custom"
][
"function"
]
~=
"1"
then
customCodeString
=
aCustom
[
"custom"
][
"function"
];
end
local
loadedFunction
,
errorString
=
loadstring
(
"local VUHDO_unitInfo = _G[\"
VUHDO_anInfo
\
"]; "
..
customCodeString
);
if
loadedFunction
then
_G
[
"VUHDO_anInfo"
]
=
anInfo
;
...
...
@@ -1075,7 +1082,7 @@ local function VUHDO_customFlagValidator(anInfo, aCustom)
DEFAULT_CHAT_FRAME
:
AddMessage
(
VUHDO_I18N_ERROR_CUSTOM_FLAG_EXECUTE
,
1
.
0
,
0
.
0
,
0
.
0
);
DEFAULT_CHAT_FRAME
:
AddMessage
(
debugstack
(
1
,
2
,
0
),
1
.
0
,
0
.
0
,
0
.
0
);
DEFAULT_CHAT_FRAME
:
AddMessage
(
VUHDO_I18N_ERROR_INVALID_VALIDATOR
,
1
.
0
,
0
.
0
,
0
.
0
);
DEFAULT_CHAT_FRAME
:
AddMessage
(
aCustom
[
"custom"
][
1
],
1
.
0
,
0
.
0
,
0
.
0
);
DEFAULT_CHAT_FRAME
:
AddMessage
(
aCustom
[
"custom"
][
"function"
],
1
.
0
,
0
.
0
,
0
.
0
);
return
false
,
nil
,
-
1
,
-
1
,
-
1
;
end
...
...
@@ -1088,7 +1095,7 @@ local function VUHDO_customFlagValidator(anInfo, aCustom)
DEFAULT_CHAT_FRAME
:
AddMessage
(
VUHDO_I18N_ERROR_CUSTOM_FLAG_LOAD
,
1
.
0
,
0
.
0
,
0
.
0
);
DEFAULT_CHAT_FRAME
:
AddMessage
(
errorString
,
1
.
0
,
0
.
0
,
0
.
0
);
DEFAULT_CHAT_FRAME
:
AddMessage
(
VUHDO_I18N_ERROR_INVALID_VALIDATOR
,
1
.
0
,
0
.
0
,
0
.
0
);
DEFAULT_CHAT_FRAME
:
AddMessage
(
aCustom
[
"custom"
][
1
],
1
.
0
,
0
.
0
,
0
.
0
);
DEFAULT_CHAT_FRAME
:
AddMessage
(
aCustom
[
"custom"
][
"function"
],
1
.
0
,
0
.
0
,
0
.
0
);
end
end
...
...
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