diff --git a/lua/app/ui/gm/gm_tool_ui.lua b/lua/app/ui/gm/gm_tool_ui.lua index 554c06b1..b85a2472 100644 --- a/lua/app/ui/gm/gm_tool_ui.lua +++ b/lua/app/ui/gm/gm_tool_ui.lua @@ -114,6 +114,9 @@ function GMToolUI:sendMsg(gmCommand) isMystery = args.args[4] ~= nil } self:closeUI() + elseif args.args[1] == "check_skill_sound" then + self:checkSkillSoundExist() + self:closeUI() elseif args.args[1] == "time" then -- 特殊处理 local args1 = {} args1.args = {} @@ -176,4 +179,23 @@ function GMToolUI:addMonsterSkill(args) self:closeUI() end +function GMToolUI:checkSkillSoundExist() + local skillCfg = ConfigManager:getConfig("skill") + local errorMap = {} + for skillId, info in pairs(skillCfg) do + if info.sound_hit then + for _, id in ipairs(info.sound_hit) do + if id > 0 and not io.open(string.format("assets/arts/sounds/sfx/battle/%s.wav", id), 'r') then + if not errorMap[skillId] then + errorMap[skillId] = {} + end + table.insert(errorMap[skillId], id) + end + end + end + end + Logger.logHighlight("音效遍历完成") + Logger.printTable(errorMap) +end + return GMToolUI