mirror of
https://codeberg.org/Duvelcorp/MetaHunt.git
synced 2026-09-24 00:26:58 +00:00
Add trainer planning and level-up tracking
This commit is contained in:
+33
-8
@@ -331,15 +331,40 @@ function SlashCmdList.MTH(msg, editbox)
|
||||
else
|
||||
MTH:Print("Train scan is not available.")
|
||||
end
|
||||
elseif lowerCmd == "trainerscan" then
|
||||
if type(MTH_CommandTrainerScan) == "function" then
|
||||
MTH_CommandTrainerScan()
|
||||
else
|
||||
MTH:Print("Trainer catalog scanner is not available.")
|
||||
end
|
||||
elseif lowerCmd == "spellscan" then
|
||||
if type(MTH_HT_RescanSpellbook) ~= "function" then
|
||||
MTH:Print("Hunter spellbook scanner is not available.")
|
||||
return
|
||||
end
|
||||
MTH_HT_RescanSpellbook()
|
||||
local mail = type(MTH_HT_GetSpellInfo) == "function" and MTH_HT_GetSpellInfo("Mail") or nil
|
||||
if mail then
|
||||
MTH:Print("Hunter spellbook scan: Mail found (rank=" .. tostring(mail.rank or "") .. ", slot=" .. tostring(mail.slot or "?") .. ").")
|
||||
else
|
||||
MTH:Print("Hunter spellbook scan: Mail was not returned by the client spellbook API.")
|
||||
end
|
||||
elseif lowerCmd == "leveltest" then
|
||||
local _, _, kind, levelText = string.find(lowerArg or "", "^(%S+)%s*(%d*)")
|
||||
if type(MTH_LevelTracker_Test) ~= "function" then
|
||||
MTH:Print("Level tracker is not available.")
|
||||
elseif not MTH_LevelTracker_Test(kind, tonumber(levelText)) then
|
||||
MTH:Print("Use /mth leveltest hunter [level], pet [level], or loyalty [level]")
|
||||
end
|
||||
elseif lowerCmd == "fx" or lowerCmd == "fireworks" or lowerCmd == "celebrate" then
|
||||
-- TEMP: preview the pet-ability celebration effect.
|
||||
if type(MTH_Celebrate) == "function" then
|
||||
local label = msg
|
||||
local _, _, rest = string.find(msg, "^%S+%s+(.-)%s*$")
|
||||
if rest and rest ~= "" then
|
||||
MTH_Celebrate("New Pet Ability!", rest)
|
||||
else
|
||||
MTH_Celebrate("New Pet Ability!", "Growl (Rank 3)")
|
||||
if type(MTH_CelebratePreview) == "function" then
|
||||
local style = lowerArg or ""
|
||||
if style == "" then style = "firework" end
|
||||
if style == "help" or style == "list" then
|
||||
MTH:Print("Celebrations: firework, blackhole, shockwave, shatter, all")
|
||||
elseif not MTH_CelebratePreview(style) then
|
||||
MTH:Print("Unknown celebration: " .. tostring(style))
|
||||
MTH:Print("Use /mth fx help for: firework, blackhole, shockwave, shatter, all")
|
||||
end
|
||||
else
|
||||
-- Self-diagnosing: report which piece failed to load so we can tell
|
||||
|
||||
Reference in New Issue
Block a user