Skip to content

Commit 32ccc9d

Browse files
committed
forgot staging
1 parent e4b65b3 commit 32ccc9d

File tree

4 files changed

+63
-43
lines changed

4 files changed

+63
-43
lines changed

Commands/Commands_Generics.lua

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,14 @@ function genericCaller(dictionaryID, callID, value)
8080
if call[GENERICS_isValueNeeded] then
8181
data['value'] = value
8282
elseif call[GENERICS_isParametersNeeded] then
83-
data['value'] = dictionary[GENERICS_parametersGet]()
83+
local v = dictionary[GENERICS_parametersGet]()
84+
if (not v or v == '') then
85+
MangAdmin:Print(Locale["paramError"])
86+
return
87+
88+
else
89+
data['value'] = v
90+
end
8491
end
8592
if call[GENERICS_isTargetCheckNeeded] then
8693
if commandTargetCheck() or call[GENERICS_canTargetBeACreature] then

Frames/MangFrames_SectionChar.lua

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -229,11 +229,11 @@ function MangAdmin:CreateCharSection()
229229
})
230230

231231
FrameLib:BuildButton({
232-
name = "ma_demorphbutton",
232+
name = "CHAR_demorphButton",
233233
group = "char",
234234
parent = ma_midframe,
235235
texture = {
236-
name = "ma_demorphbutton_texture",
236+
name = "CHAR_demorphButton_texture",
237237
color = {color.btn.r, color.btn.g, color.btn.b, transparency.btn}
238238
},
239239
size = {
@@ -245,7 +245,7 @@ function MangAdmin:CreateCharSection()
245245
offX = 222, --charColTwo
246246
offY = -117 --charRowFive
247247
},
248-
text = Locale["ma_DemorphButton"]
248+
text = Locale["labelCHAR_demorphButton"]
249249
})
250250

251251
FrameLib:BuildButton({
@@ -289,11 +289,11 @@ function MangAdmin:CreateCharSection()
289289
})
290290

291291
FrameLib:BuildButton({
292-
name = "ma_gpsbutton",
292+
name = "CHAR_gpsButton",
293293
group = "char",
294294
parent = ma_midframe,
295295
texture = {
296-
name = "ma_gpsbutton_texture",
296+
name = "CHAR_gpsButton_texture",
297297
color = {color.btn.r, color.btn.g, color.btn.b, transparency.btn}
298298
},
299299
size = {
@@ -305,7 +305,7 @@ function MangAdmin:CreateCharSection()
305305
offX = 303, --charColThree
306306
offY = -74 --charRowThree
307307
},
308-
text = Locale["ma_GPSButton"]
308+
text = Locale["labelCHAR_gpsButton"]
309309
})
310310

311311
FrameLib:BuildButton({
@@ -514,11 +514,11 @@ function MangAdmin:CreateCharSection()
514514
})
515515

516516
FrameLib:BuildButton({
517-
name = "ma_charbindsight",
517+
name = "CHAR_bindSightButton",
518518
group = "char",
519519
parent = ma_midframe,
520520
texture = {
521-
name = "ma_charbindsight_texture",
521+
name = "CHAR_bindSightButton_texture",
522522
color = {color.btn.r, color.btn.g, color.btn.b, transparency.btn}
523523
},
524524
size = {
@@ -530,15 +530,15 @@ function MangAdmin:CreateCharSection()
530530
offX = 303, --charColThree
531531
offY = -95 --charRowFour
532532
},
533-
text = Locale["ma_CharBindsight"]
533+
text = Locale["labelCHAR_bindSightButton"]
534534
})
535535

536536
FrameLib:BuildButton({
537-
name = "ma_charunbindsight",
537+
name = "CHAR_unbindSightButton",
538538
group = "char",
539539
parent = ma_midframe,
540540
texture = {
541-
name = "ma_charunbindsight_texture",
541+
name = "CHAR_unbindSightButton_texture",
542542
color = {color.btn.r, color.btn.g, color.btn.b, transparency.btn}
543543
},
544544
size = {
@@ -550,7 +550,7 @@ function MangAdmin:CreateCharSection()
550550
offX = 303, --charColThree
551551
offY = -117 --charRowFive
552552
},
553-
text = Locale["ma_CharUnBindsight"]
553+
text = Locale["labelCHAR_unbindSightButton"]
554554
})
555555

556556
FrameLib:BuildButton({
@@ -835,11 +835,11 @@ function MangAdmin:CreateCharSection()
835835
})
836836

837837
FrameLib:BuildButton({
838-
name = "ma_charmorphbutton",
838+
name = "CHAR_morphButton",
839839
group = "char",
840840
parent = ma_midframe,
841841
texture = {
842-
name = "ma_charmorphbutton_texture",
842+
name = "CHAR_morphButton_texture",
843843
color = {color.btn.r, color.btn.g, color.btn.b, transparency.btn}
844844
},
845845
size = {
@@ -851,7 +851,7 @@ function MangAdmin:CreateCharSection()
851851
offX = 385, --charColFour
852852
offY = -139 --charRowSix
853853
},
854-
text = Locale["ma_Morph"]
854+
text = Locale["labelCHAR_morphButton"]
855855
})
856856

857857
FrameLib:BuildButton({
@@ -1428,7 +1428,7 @@ function MangAdmin:CreateCharSection()
14281428

14291429
FrameLib:BuildFrame({
14301430
type = "EditBox",
1431-
name = "ma_charactertarget",
1431+
name = "CHAR_parameterInput",
14321432
group = "char",
14331433
parent = ma_midframe,
14341434
size = {

FunctionInit.lua

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -613,10 +613,10 @@ function InitControls()
613613
end
614614
)
615615
MangAdmin:PrepareScript(
616-
ma_demorphbutton,
617-
Locale["tt_DemorphButton"],
616+
CHAR_demorphButton,
617+
Locale["ttCHAR_demorph"],
618618
function()
619-
Demorph()
619+
genericCaller(CHAR_KEY, CHAR_morphResetCommand)
620620
end
621621
)
622622
MangAdmin:PrepareScript(
@@ -634,10 +634,10 @@ function InitControls()
634634
end
635635
)
636636
MangAdmin:PrepareScript(
637-
ma_gpsbutton,
638-
Locale["tt_GPSButton"],
637+
CHAR_gpsButton,
638+
Locale["ttCHAR_gps"],
639639
function()
640-
GetGPSInfo()
640+
genericCaller(CHAR_KEY, CHAR_gpsCommand)
641641
end
642642
)
643643
MangAdmin:PrepareScript(
@@ -676,17 +676,17 @@ function InitControls()
676676
end
677677
)
678678
MangAdmin:PrepareScript(
679-
ma_charbindsight,
680-
Locale["tt_charbindsight"],
679+
CHAR_bindSightButton,
680+
Locale["ttCHAR_bindSight"],
681681
function()
682-
CharBindSight()
682+
genericCaller(CHAR_KEY, CHAR_bindSightCommand)
683683
end
684684
)
685685
MangAdmin:PrepareScript(
686-
ma_charunbindsight,
687-
Locale["tt_charunbindsight"],
686+
CHAR_unbindSightButton,
687+
Locale["ttCHAR_unbindSight"],
688688
function()
689-
CharUnBindSight()
689+
genericCaller(CHAR_KEY, CHAR_unbindSightCommand)
690690
end
691691
)
692692
MangAdmin:PrepareScript(
@@ -900,10 +900,10 @@ function InitControls()
900900
end
901901
)
902902
MangAdmin:PrepareScript(
903-
ma_charmorphbutton,
904-
Locale["tt_charmorphbutton"],
903+
CHAR_morphButton,
904+
Locale["ttCHAR_morph"],
905905
function()
906-
CharMorphButton()
906+
genericCaller(CHAR_KEY, CHAR_morphCommand)
907907
end
908908
)
909909
MangAdmin:PrepareScript(

Locales/enUS.lua

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ function Return_enUS()
8181
--[[General-Other]]
8282
["inLineCommands"] = {"/azerothcoreadmin", "/acadmin"},
8383
["selectionError"] = "Please select only yourself, another player or nothing!",
84+
["paramError"] = "Parameter(s) are required for the selected action!",
8485
["genericEnabledText"] = "Enabled",
8586
["genericDisabledText"] = "Disabled",
8687
["invalidParams1"] = "|cffFF0000You must enter 1 parameters!|r",
@@ -284,7 +285,11 @@ function Return_enUS()
284285
["ttCHAR_pInfo"] = "Get information on the selected PLAYER",
285286
["ttCHAR_distance"] = "Get distance to the selected character/creature",
286287
["ttCHAR_recall"] = "Recalls selected player to location before last teleport",
287-
288+
["ttCHAR_morph"] = "Morph you or the selected player with the entered effect [[Parameters: $DisplayID]]",
289+
["ttCHAR_demorph"] = "Removes any morphs on you or the selected character",
290+
["ttCHAR_unbindSight"] = "UnBinds your vision from the selected Unit",
291+
["ttCHAR_bindSight"] = "Binds your vision to the selected Unit",
292+
["ttCHAR_gps"] = "Shows coordinates for the selected character/creature",
288293
--[[CHAR-Control-Labels]]
289294
["labelCHAR_killButton"] = "Kill",
290295
["labelCHAR_reviveButton"] = "Revive",
@@ -295,6 +300,12 @@ function Return_enUS()
295300
["labelCHAR_pInfoButton"] = "PLAYER Info",
296301
["labelCHAR_distanceButton"] = "Distance",
297302
["labelCHAR_recallButton"] = "Recall",
303+
["labelCHAR_morphButton"] = "Morph",
304+
["labelCHAR_demorphButton"] = "Demorph",
305+
["labelCHAR_bindSightButton"] = "Bindsight",
306+
["labelCHAR_unbindSightButton"] = "UnBindsight",
307+
["labelCHAR_gpsButton"] = "GPS",
308+
298309
--[[CHAR-Commands Output]]
299310
["logCHAR_kill"] = "_T_ has been killed",
300311
["logCHAR_revive"] = "_T_ has been revived",
@@ -305,19 +316,23 @@ function Return_enUS()
305316
["logCHAR_pInfo"] = "Displayed information of _T_",
306317
["logCHAR_distance"] = "Displayed the distance from yourself and _T_",
307318
["logCHAR_recall"] = "Recalled _T_ to location before last teleport",
319+
["logCHAR_morph"] = "_T_ has been morphed with the following display ID: _V1_",
320+
["logCHAR_demorph"] = "_T_ has been cleaned from morph effect",
321+
["logCHAR_unbindSight"] = "Unbind your vision from _T_",
322+
["logCHAR_bindSight"] = "Bind your vision to _T_",
323+
["logCHAR_gps"] = "Shows coordinates for the _T_",
308324

309325
["tt_RotateLeft"] = "Rotate left.",
310326
["tt_RotateRight"] = "Rotate right.",
311-
["tt_DemorphButton"] = "Removes any morphs on the selected character.",
327+
312328
["tt_ShowMapsCharButton"] = "Reveals maps for the selected character.",
313329
["tt_HideMapsCharButton"] = "Hides maps for the selected character.",
314330
["tt_learnlangbutton"] = "Learn selected langauge(s)",
315331
["tt_modifybutton"] = "Modify the selected attribute by the entered amount",
316332
["tt_resetbutton"] = "Reset the selected attribute",
317333
["tt_modelzoominbutton"] = "Zoom in the selected model",
318334
["tt_modelzoomoutbutton"] = "Zoom out the selected model",
319-
["tt_charbindsight"] = "Binds your vision to the selected Unit",
320-
["tt_charunbindsight"] = "UnBinds your vision to the selected Unit (BROKEN in CORE - right-click gear icon in buffs area)",
335+
321336
["tt_charrename"] = "Toggles selected character for rename at next login",
322337
["tt_charcustomize"] = "Toggles selected character for customization at next login",
323338
["tt_charchangerace"] = "Toggles selected character for race change at next login",
@@ -341,13 +356,12 @@ function Return_enUS()
341356
["tt_namegobutton"] = "Parameter= $charactername [[Teleports the specified character to your location]]",
342357
["tt_guildrankbutton"] = "Parameters= $charactername #ranknumber [[Sets the character specified to the rank specified in his/her guild]]",
343358
["tt_telegroupbutton"] = "Parameter= $telename [[Teleports the **selected** character and his/her group to the .tele location named $telename]]",
344-
["tt_GPSButton"] = "Shows coordinates for the selected character.",
359+
345360
["tt_unbanbutton"] = "Parameters= <account|ip|character> $NameOrIp [[Unbans the specified acct/IP/character]]",
346361
["tt_guilddeletebutton"] = "Parameter= $guildname [[Deletes the specified Guild]]",
347362
["tt_guilduninvitebutton"] = "Parameter= $charactername [[Kicks the specified character out of his/her guild]]",
348363
["tt_telenamebutton"] = "Parameters= $charactername $telename [[Teleports $charactername to $telename]]",
349364
["tt_mutebutton"] = "Parameters= $charactername #minutes [[Disables chat for $charactername's entire account for #minutes]]",
350-
["tt_charmorphbutton"] = "Parameters = #DisplayID [[Enter the DisplayID of the morph you want to apply]]",
351365
["tt_charaurabutton"] = "Parameters = #AuraID [[Enter the AuraID of the aura you want to apply]]",
352366
["tt_charunaurabutton"] = "Parameters = #AuraID [[Enter the AuraID of the aura you want to remove]]",
353367
["tt_JailAButton"] = "Parameter= $charactername [[Sends the character whose name appears in this box to the Alliance Jail]]",
@@ -365,15 +379,14 @@ function Return_enUS()
365379

366380
["ma_ShowMapsButton"] = "Show Maps",
367381
["ma_HideMapsButton"] = "Hide Maps",
368-
["ma_DemorphButton"] = "Demorph",
382+
369383
["ma_ShowMapsCharButton"] = "Show Maps",
370384
["ma_HideMapsCharButton"] = "Hide Maps",
371385
["ma_LearnLangButton"] = "All languages",
372386
["ma_Learn"] = "Learn",
373387
["ma_Modify"] = "Modify",
374388
["ma_Reset"] = "Reset",
375-
["ma_CharBindsight"] = "Bindsight",
376-
["ma_CharUnBindsight"] = "UnBindsight",
389+
377390
["ma_charrename"] = "Rename",
378391
["ma_charcustomize"] = "Customize",
379392
["ma_charchangerace"] = "Chng Race",
@@ -398,14 +411,14 @@ function Return_enUS()
398411
["ma_guildrankbutton"] = "G Rank",
399412
["ma_telegroupbutton"] = "TeleGroup",
400413
["ma_unbanbutton"] = "UnBan",
401-
["ma_GPSButton"] = "GPS",
414+
402415
["ma_guilddeletebutton"] = "G Delete",
403416
["ma_guilduninvitebutton"] = "G UnInv",
404417
["ma_telenamebutton"] = "TeleName",
405418
["ma_mutebutton"] = "Mute",
406419
["ma_Aura"] = "Aura",
407420
["ma_UnAura"] = "UnAura",
408-
["ma_Morph"] = "Morph",
421+
409422
["ma_JailAButton"] = "Jail (A)",
410423
["ma_JailHButton"] = "Jail (H)",
411424
["ma_UnJailButton"] = "UnJail",

0 commit comments

Comments
 (0)