function(_, _, msg, _, srcGUID, _, _, _, destGUID, destName, _, _, spellID)
if msg == "SPELL_CAST_START" and spellID == 184931 then
local core = WA_RaidHUD
if not core then return end
core:Request2Show(aura_env.id, true, 6)
elseif msg == "SPELL_AURA_APPLIED" and spellID == 184964 then
local core = WA_RaidHUD
if not core then return end
local unit = core.roster[destGUID]
if not unit then return end
local x, y, _, map = UnitPosition(unit)
if not map then return end
if aura_env.list[destGUID] then
aura_env.disks[destGUID]:Free()
aura_env.disks[destGUID] = nil
aura_env.lines[destGUID]:Free()
aura_env.lines[destGUID] = nil
end
aura_env.list[destGUID] = true
local disk = core:NewDisk(25)
aura_env.disks[destGUID] = disk
local _, class = UnitClass(destName)
disk:Label(destName, RAID_CLASS_COLORS[class].r, RAID_CLASS_COLORS[class].g, RAID_CLASS_COLORS[class].b)
disk:Blip(true)
disk:Stick({x, y, map})
local line = core:NewLine(0, 0, 0, 0, .8)
aura_env.lines[destGUID] = line
if unit == "player" then
line:Color(1, .4, .1)
else
line:Color(.5, .5, .5)
end
line:Stick({x, y, map}, destGUID)
return true
elseif msg == "SPELL_AURA_REMOVED" and spellID == 184964 then
if aura_env.list[destGUID] then
aura_env.list[destGUID] = nil
aura_env.disks[destGUID]:Free()
aura_env.disks[destGUID] = nil
aura_env.lines[destGUID]:Free()
aura_env.lines[destGUID] = nil
end
end
end
-- 주문 시전 시작시 Request2Show 명령(첨부파일 설명서 참고)으로 일단 HUD를 표시합니다. 일부 기능은 표시된 상태에서만 동작하기 때문에 개체를 생성하기 전에 우선 HUD 자체가 표시될 필요가 있습니다.