薛之猫大王
2026-02-22 38e3dbea877e5d75b05d6e5c235cef9944ad8180
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
local M = {}
 
local profession_handlers = {}
 
function M.register(name, handler)
    profession_handlers[name] = handler
end
 
function M.on_ability_cast(unit, ability)
    local prof = unit:storage_get('profession')
    if not prof then return end
    local handler = profession_handlers[prof]
    if handler then
        handler(unit, ability)
    end
end
 
return M