ETH官方钱包

前往
大廳
主題

[WOW][BFA]火法燃灼炎爆數(shù)量及點(diǎn)燃峰值通報(bào)

死鬥 | 2020-08-31 00:58:02 | 巴幣 0 | 人氣 337

火法燃灼炎爆數(shù)量及點(diǎn)燃峰值

(非WA版)

local addonName,addonTable = ...
---------確認(rèn)是否有載入Lib_ZYF, 若無則返回
if (Lib_ZYF == nil ) then
print("No Lib_ZYF loaded")
return
end
---------
addonTable.CountOfFlameBurst = nil
addonTable.maxIgnite = 0

---------戰(zhàn)鬥子事件:光環(huán)套用時(shí)開始統(tǒng)計(jì)

Lib_ZYF:SetCombatLogEvent("SPELL_AURA_APPLIED",function(...)
---------
local timestamp, eventType, hideCaster,                                                                                           -- arg1  to arg3
sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags,                        -- arg4  to arg11
spellId, spellName, spellSchool,                                                                                           -- arg12 to arg14
amount, overkill, school, resisted, blocked, absorbed, critical, glancing, crushing = CombatLogGetCurrentEventInfo()       -- arg15 to arg23
local msg
if (sourceGUID == UnitGUID("player")) and (spellId == 190319) then
msg = "開始統(tǒng)計(jì)"..spellName.."期間炎爆數(shù)量"
if UnitInRaid("player") then
SendChatMessage(msg,"say")
else
--SendChatMessage(msg,"guild")
print(msg)
end
addonTable.CountOfFlameBurst = 0
end
end)

---------戰(zhàn)鬥子事件:光環(huán)移除時(shí)通報(bào)統(tǒng)計(jì)數(shù)值

Lib_ZYF:SetCombatLogEvent("SPELL_AURA_REMOVED",function(...)

---------
local timestamp, eventType, hideCaster,                                                                                           -- arg1  to arg3
sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags,                        -- arg4  to arg11
spellId, spellName, spellSchool,                                                                                           -- arg12 to arg14
amount, overkill, school, resisted, blocked, absorbed, critical, glancing, crushing = CombatLogGetCurrentEventInfo()       -- arg15 to arg23
local msg
if (sourceGUID == UnitGUID("player")) and (spellId == 190319) then
msg = GetSpellLink(spellId).."結(jié)束,期間"..GetSpellLink(11366)
msg = msg..addonTable.CountOfFlameBurst.."發(fā)"
msg = msg..","..GetSpellLink(12654).."峰值"..addonTable.maxIgnite

if UnitInRaid("player") then
SendChatMessage(msg,"say")
else
SendChatMessage(msg,"guild")
end
addonTable.CountOfFlameBurst = nil
addonTable.maxIgnite = 0
end
end)

---------戰(zhàn)鬥子事件:每次炎爆術(shù)施放成功時(shí)統(tǒng)計(jì)並通報(bào)

Lib_ZYF:SetCombatLogEvent("SPELL_CAST_SUCCESS",function(...)
---------
local timestamp, eventType, hideCaster,                                                                         -- arg1  to arg3
sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags,       -- arg4  to arg11
spellId, spellName, spellSchool,                                                                          -- arg12 to arg14
amount, overkill, school, resisted, blocked, absorbed, critical, glancing, crushing = ...
local msg
local SendChatMessage = SendChatMessage
if (sourceGUID == UnitGUID("player")) and (spellId == 11366) then
if addonTable.CountOfFlameBurst then
addonTable.CountOfFlameBurst = addonTable.CountOfFlameBurst + 1
msg = GetSpellLink(190319)
msg = msg..GetSpellLink(195283)
msg = msg..GetSpellLink(11366)
msg = msg..addonTable.CountOfFlameBurst
--print(msg)

--若在團(tuán)隊(duì)內(nèi)則通報(bào)到白字,若不在團(tuán)隊(duì)則通報(bào)到公會(huì)頻道

--若不想通報(bào)到任何頻道則可自行修改成print(msg)
if UnitInRaid("player") then
SendChatMessage(msg,"say")
else
SendChatMessage(msg,"guild")
end
end
end
end)

---------戰(zhàn)鬥子事件:週期性傷害,紀(jì)錄點(diǎn)燃最大傷害

Lib_ZYF:SetCombatLogEvent("SPELL_PERIODIC_DAMAGE",function(...)
---------
local timestamp, eventType, hideCaster,                                                                         -- arg1  to arg3
sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags,       -- arg4  to arg11
spellId, spellName, spellSchool,                                                                          -- arg12 to arg14
amount, overkill, school, resisted, blocked, absorbed, critical, glancing, crushing = ...
if (sourceGUID == UnitGUID("player")) and (spellId == 12654) then
if amount > addonTable.maxIgnite then
addonTable.maxIgnite = amount
print(GetSpellLink(spellId)..amount.."(MAX:"..addonTable.maxIgnite..")")
end
end
end)



創(chuàng)作回應(yīng)

更多創(chuàng)作