Skip to content

Commit cfdb100

Browse files
committed
fix(charFrame): Fix demorph, morph and GPS
1 parent 78ee78e commit cfdb100

File tree

3 files changed

+10
-14
lines changed

3 files changed

+10
-14
lines changed

Commands/Commands_Char.lua

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -142,27 +142,23 @@ end
142142

143143
function Demorph()
144144
local player = UnitName("target") or UnitName("player")
145-
MangAdmin:ChatMsg(".demorph")
145+
MangAdmin:ChatMsg(".morph reset")
146146
MangAdmin:LogAction("Demorphed player "..player..".")
147147
end
148148

149149
function ToggleMapsChar(value)
150-
MangAdmin:ChatMsg(".explorecheat "..value)
150+
MangAdmin:ChatMsg(".cheat explore "..value)
151151
if value == 1 then
152152
MangAdmin:LogAction("Revealed all maps for selected player.")
153153
else
154154
MangAdmin:LogAction("Hide all unexplored maps for selected player.")
155155
end
156156
end
157157

158-
function GPS()
159-
if MangAdmin:Selection("player") or MangAdmin:Selection("self") or MangAdmin:Selection("none") then
158+
function GetGPSInfo()
160159
local player = UnitName("target") or UnitName("player")
161160
MangAdmin:ChatMsg(".gps")
162161
MangAdmin:LogAction("Got GPS coordinates for player "..player..".")
163-
else
164-
MangAdmin:Print(Locale["selectionerror1"])
165-
end
166162
end
167163

168164
function LearnSpell(value, state)
@@ -613,10 +609,10 @@ function MuteButton()
613609
end
614610

615611
function CharMorphButton()
616-
local cname = ma_charactertarget:GetText()
617-
local npccname = ma_npccharactertarget:GetText()
618-
MangAdmin:ChatMsg(".modify morph "..cname)
619-
MangAdmin:LogAction(".modify morph "..cname..".")
612+
local player = UnitName("target") or UnitName("player")
613+
local diplayID = ma_charactertarget:GetText()
614+
MangAdmin:ChatMsg(".morph target "..diplayID)
615+
MangAdmin:LogAction("Morph applied to "..player..".")
620616

621617
end
622618

FunctionInit.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ function InitControls()
115115
MangAdmin:PrepareScript(ma_demorphbutton , Locale["tt_DemorphButton"] , function() Demorph() end)
116116
MangAdmin:PrepareScript(ma_showmapsbutton , Locale["tt_ShowMapsCharButton"] , function() ToggleMapsChar(1) end)
117117
MangAdmin:PrepareScript(ma_hidemapsbutton , Locale["tt_HideMapsCharButton"] , function() ToggleMapsChar(0) end)
118-
MangAdmin:PrepareScript(ma_gpsbutton , Locale["tt_GPSButton"] , function() GPS() end)
118+
MangAdmin:PrepareScript(ma_gpsbutton , Locale["tt_GPSButton"] , function() GetGPSInfo() end)
119119
MangAdmin:PrepareScript(ma_learnlangbutton , Locale["tt_learnlangbutton"] , function() LearnSpell(UIDropDownMenu_GetSelectedValue(ma_learnlangdropdown)) end)
120120
MangAdmin:PrepareScript(ma_modifybutton , Locale["tt_modifybutton"] , function() Modify(UIDropDownMenu_GetSelectedValue(ma_modifydropdown),ma_modifyeditbox:GetText()) end)
121121
MangAdmin:PrepareScript(ma_resetbutton , Locale["tt_resetbutton"] , function() Reset(UIDropDownMenu_GetSelectedValue(ma_resetdropdown)) end)

Locales/enUS.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ function Return_enUS()
259259
["tt_namegobutton"] = "Parameter= $charactername [[Teleports the specified character to your location]]",
260260
["tt_guildrankbutton"] = "Parameters= $charactername #ranknumber [[Sets the character specified to the rank specified in his/her guild]]",
261261
["tt_telegroupbutton"] = "Parameter= $telename [[Teleports the **selected** character and his/her group to the .tele location named $telename]]",
262+
["tt_GPSButton"] = "Shows coordinates for the selected character.",
262263
["tt_unbanbutton"] = "Parameters= <account|ip|character> $NameOrIp [[Unbans the specified acct/IP/character]]",
263264
["tt_guilddeletebutton"] = "Parameter= $guildname [[Deletes the specified Guild]]",
264265
["tt_guilduninvitebutton"] = "Parameter= $charactername [[Kicks the specified character out of his/her guild]]",
@@ -324,6 +325,7 @@ function Return_enUS()
324325
["ma_guildrankbutton"] = "G Rank",
325326
["ma_telegroupbutton"] = "TeleGroup",
326327
["ma_unbanbutton"] = "UnBan",
328+
["ma_GPSButton"] = "GPS",
327329
["ma_guilddeletebutton"] = "G Delete",
328330
["ma_guilduninvitebutton"] = "G UnInv",
329331
["ma_telenamebutton"] = "TeleName",
@@ -416,7 +418,6 @@ function Return_enUS()
416418
["tt_NPCAura"] = "Parameters = #AuraID [[Enter the AuraID of the aura you want to apply]]",
417419
["tt_NPCUnaura"] = "Parameters = #AuraID [[Enter the AuraID of the aura you want to remove]]",
418420
["tt_PlayEmote"] = "Play Emote from list at left",
419-
["tt_GPSButton"] = "Shows coordinates for the selected character.",
420421
["tt_DisplayUp"] = "Increment NPC DisplayID UP by 1",
421422
["tt_DisplayDown"] = "Decrement NPC DisplayID DOWN by 1",
422423
["tt_IDUp"] = "Increment NPC ID UP by 1",
@@ -697,7 +698,6 @@ function Return_enUS()
697698
["ma_LearnCraftsButton"] = "All professions and recipes",
698699
["ma_LearnGMButton"] = "Default GM spells",
699700
["ma_LearnClassButton"] = "All class-spells",
700-
["ma_GPSButton"] = "GPS",
701701
["ma_Online"] = "Online",
702702
["ma_Offline"] = "Offline",
703703

0 commit comments

Comments
 (0)