수도원 2넴이 사용하는 희생의 장작더미 스택을 추적하는 바
같이 쐐기하는 탱커님이
가끔 Kira가 사용하는 위크오라를 만들어 달라고 요청한다
이번에 요청한 것은
희생의 장작더미 스택을 추적하는 위크오라였다
소크 타임 남은 시간이야
간단한 작업이고
밑에 스택바는 쉽지않을 것 같았다
일단 저 3스택 세 칸을 만들어야 한다
처음 접근한 방식은 리틀윅 애드온에서 저 스킬의 매커니즘을 알아봤다
해당 폴더의 바론 브라운파이크 lua파일을 열면
-- Mythic
self:Log("SPELL_CAST_START", "SacrificialPyre", 446368) --희생의 장작더미
self:Log("SPELL_AURA_APPLIED", "SacrificialFlameApplied", 446403) - 희생의 불꽃
self:Log("SPELL_AURA_APPLIED_DOSE", "SacrificialFlameApplied", 446403)
self:Log("SPELL_MISSED", "SacrificialFlameMissed", 446403) -- for immunities
end
이러한 부분이 있다
Sacrificial Pyre가 희생의 장작더미인데
코드를 보면 희생의 장작더미를 캐스트 시작을 체크하는 이벤트와
희생의 불꽃 디버프를 추적하는 이벤트가 있고
-- Mythic
function mod:SacrificialPyre(args)
unleashedPyreCharges = vindictiveWrathActive and 5 or 3
nextUnleashedPyre = args.time + 30
self:Message(args.spellId, "cyan", CL.extra:format(args.spellName, L.charges:format(unleashedPyreCharges)))
self:Bar(446525, 30, CL.count:format(self:SpellName(446525), unleashedPyreCharges)) -- Unleashed Pyre
self:CDBar(args.spellId, 33.6)
self:PlaySound(args.spellId, "info")
end
function mod:SacrificialFlameApplied(args)
self:StopBar(CL.count:format(self:SpellName(446525), unleashedPyreCharges)) -- Unleashed Pyre
self:StackMessage(args.spellId, "yellow", args.destName, args.amount, 1)
unleashedPyreCharges = unleashedPyreCharges - 1
if unleashedPyreCharges > 0 then
local unleashedPyreTimeLeft = nextUnleashedPyre - args.time
self:Bar(446525, {unleashedPyreTimeLeft, 30}, CL.count:format(self:SpellName(446525), unleashedPyreCharges)) -- Unleashed Pyre
elseif unleashedPyreCharges == 0 then
self:Message(446368, "green", CL.over:format(self:SpellName(446368))) -- Sacrificial Pyre
end
self:PlaySound(args.spellId, "info", nil, args.destName)
end
function mod:SacrificialFlameMissed(args)
self:StopBar(CL.count:format(self:SpellName(446525), unleashedPyreCharges)) -- Unleashed Pyre
unleashedPyreCharges = unleashedPyreCharges - 1
if unleashedPyreCharges > 0 then
local unleashedPyreTimeLeft = nextUnleashedPyre - args.time
self:Bar(446525, {unleashedPyreTimeLeft, 30}, CL.count:format(self:SpellName(446525), unleashedPyreCharges)) -- Unleashed Pyre
elseif unleashedPyreCharges == 0 then
self:Message(446368, "green", CL.over:format(self:SpellName(446368))) -- Sacrificial Pyre
end
end
이 부분을 보면 빅윅에서 희생의 장작더미 스택을 추적하는 방법과
스택을 차감하는 코드를 찾을 수 있다
중간에
self:StopBar(CL.count:format(self:SpellName(446525), unleashedPyreCharges)) -- Unleashed Pyre
self:StackMessage(args.spellId, "yellow", args.destName, args.amount, 1)
unleashedPyreCharges = unleashedPyreCharges - 1
if unleashedPyreCharges > 0 then
이런 코드가 있는데
unleashedPyre를 검색해보니
해방된 장작불이라고 나온다
난 이게 희생의 장작더미를 시전하고 난 후 생기는 오브젝트인줄 알고 이것으로 접근했다
리틀윅 코드를 참고하여
해방된 장작불을 추적하고 스택을 확인하고 차감시키면 될 줄 알았음
하지만 내가 잘못한건지
해방된 장작불을 위크오라로 불러올 수 없었음
여기서 이미 2~3시간 헛짓거리함
접근방식이 잘못됐다 생각하고
그냥 희생의 장작더미를 시전하면 임의의 스택형 바를 만들기로 방향을 바꿈
Causese의 쐐기 위크오라에서
잿불맥주 양조장 1넴의 맥주 배달 스택형 바를 일단 가져옴
이렇게 생긴 것
이 코드도 즐거운 시간 시작할 때 위크오라로 스택형 바를 만든 것인데
이걸 변형하기로 했다
function(allstates, event, ...)
if event == "COMBAT_LOG_EVENT_UNFILTERED" then
local timestamp, subEvent, hideCaster, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags, spellID, _,_, auraType = ...
if subEvent == "SPELL_CAST_SUCCESS" and spellID == 442525 then
allstates[""] = {
show = true,
changed = true,
progressType = "static",
value = 5,
}
return true
elseif subEvent == "SPELL_AURA_REMOVED" and spellID == 431896 then
local state = allstates[""]
if state then
state.value = state.value - 1
state.changed = true
if state.value <= 0 then
state.show = false
end
return true
end
end
end
end
if subEvent == "SPELL_CAST_SUCCESS" and spellID == 442525 then
이 부분을 442525 대신 희생의 장작더미 주문id로 변경하고
value = 5,
벨류값을 기본 3으로 변경
elseif subEvent == "SPELL_AURA_REMOVED" and spellID == 431896 then
이 부분은 431896(고성방가) 맥주 배달해야 하는 대상들의 버프인데
맥주를 하나씩 먹이면 버프가 사라짐
그래서 SPELL_AURA_REMOVED 로 오라가 사라질때마다
1스택씩 차감되는 형태
이걸 변형하기 위해
희생의 장작더미에 소킹할때마다 희생의 불꽃 디버프가 생기므로
SPELL_AURA_APPLIED 로 변형하고 희생의 불꽃 디버프 주문id를 넣음
그리고 일단 테스트를 진행해봤는데
실패
스택이 쌓이지않는 이뮨 스킬의 존재로 인해 제대로 작동하지 않음
로그를 찾아보며 대체 할 수 있는 이벤트를 찾아봄
희생의 장작더미에 소킹하게 되면
희생의 불꽃 디버프도 생기지만
희생의 장작더미 (1218149) 라는 파동 형태의 데미지도 있음
이걸로 스택을 차감하기로 하고 다시 만들어봄
elseif subEvent == "SPELL_DAMAGE" and spellID == 1218149 then
local state = allstates[""]
if state then
state.value = state.value - 1
state.changed = true
if state.value <= 0 then
state.show = false
end
return true
end
이런식으로
SPELL_DAMAGE 이벤트를 활용해서
1218149에 의해 피해를 입을때 마다 1스택씩 차감
오 잘되는데? 하면서 쐐기에서 테스트
쐐기에서 테스트 하니 희생의 장작더미 스택바 생성은 됐는데
바로 사라짐
아직 인게임 스택은 남아 있는데 바가 그냥 사라졌음
위에 코딩 자체로는 1218149에 피해를 입을 때 마다 스택이 차감되는데
5인이니까 한번만 밟아도 5스택이 사라짐
로그를 살펴보면
파티원들이 받는 데미지는 거리에 비례하긴하나
0.03초 안에 다 같이 피해를 입음
local now = GetTime()
aura_env.lastHitTime = aura_env.lastHitTime or 0
if now - aura_env.lastHitTime < 0.1 then return end
aura_env.lastHitTime = now
위와 같은 코드로 히트 타이밍이 0.1초 보다 빠르다면 스택이 차감되지 않게 조건을 걸어둠
그러고 다시 쐐기에서 테스트 한 결과
일단 내 생각대로 작동은 함
조금 더 플레이하면서 생각치 못한 부분의 오류를 발견하면 수정해야 할 듯
그래서 완성된 코드는 아래
function(allstates, event, ...)
if event == "PLAYER_REGEN_ENABLED" then
aura_env.castCount = 0
allstates[""] = {
show = false,
changed = true
}
return true
end
if event == "COMBAT_LOG_EVENT_UNFILTERED" then
local timeStamp, subEvent, _, _, _, _, _, _, _, _, _, spellID = ...
if subEvent == "SPELL_CAST_SUCCESS" and spellID == 446368 then
aura_env.castCount = (aura_env.castCount or 0) + 1
local isEven = aura_env.castCount % 2 == 0
local stackCount = isEven and 5 or 3
allstates[""] = {
show = true,
changed = true,
progressType = "static",
value = stackCount,
total = stackCount,
}
return true
elseif (subEvent == "SPELL_DAMAGE" or subEvent == "SPELL_MISSED") and spellID == 1218149 then
local now = GetTime()
aura_env.lastHitTime = aura_env.lastHitTime or 0
if now - aura_env.lastHitTime < 0.1 then return end
aura_env.lastHitTime = now
local state = allstates[""]
if state and state.value > 0 then
state.value = state.value - 1
state.changed = true
if state.value <= 0 then
state.show = false
end
return true
end
end
end
end
중간에 응징의 천벌의 버프 유무에 따라 3스택과 5스택을 설정하는 부분이 생략됐는데
이것도 개고생을 했음
응징의 천벌 버프의 유무로 스택을 조절하려 했지만
생각한 모든 방법이 개같이 실패해서
그냥 홀수시전 짝수시전으로 나눠
홀수는 3스택
짝수는 5스택으로 나오게 설정함
제작한 시간은 대략 10시간 걸린 듯 함
한번에 작업한 것은 아니고 시간날때 마나 며칠간격으로 제작했는데
깡신을 2넴앞까지 혼자 뚫는 것이 너무 힘들었음
중간중간 길드원과 지인들이 깡신 뚫는 것을 안 도와줬다면
포기했을 듯
.
.
.
.
.
.
.
누군가 위크오라 제작과정이 궁금하다고 해서
과정을 한번 써봤는데
이게 왜 궁금한건지 모르겠지만
재밌게 봐주셨으면 감사
'WOW > - WeakAuras 내부전쟁' 카테고리의 다른 글
어둠불꽃 동굴 - 떠도는 양초 사거리 위크오라 (0) | 2025.04.01 |
---|---|
복원된 금고 열쇠 카운팅 / 구렁탐험가의 은혜 확인 위크오라 (0) | 2025.04.01 |
리퀴드 언더마인 위크오라 한글 - Last updated 4월 6일 (2) | 2025.03.28 |
드워프 석화 / 검무쇠 불꽃피 위크오라 - Last updated 4월 13일 (0) | 2025.03.06 |
2시즌 문장&용맹석 위크오라 (0) | 2025.03.06 |