Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Havoc Fury Trigger
- function(event, ...)
- if event == "UNIT_POWER_FREQUENT" then
- local unit, power = ...;
- if unit == "player" and power == "FURY" then
- aura_env.fury = UnitPower(unit, SPELL_POWER_FURY);
- --print(string.format("%s %d", event, aura_env.fury));
- end
- elseif event == "UNIT_MAXPOWER" then
- aura_env.fury_max = UnitPowerMax("player", SPELL_POWER_FURY);
- elseif event == "COMBAT_LOG_EVENT_UNFILTERED" then
- local _, cEvent, _, sGUID = ...;
- if sGUID == UnitGUID("player") then
- if cEvent == "SPELL_DAMAGE" and (select(12, ...) == 222031 or select(12, ...) == 201427) and select(21, ...) then
- aura_env.buffer = 20;
- elseif cEvent == "SPELL_ENERGIZE" and select(12, ...) == 193840 then
- aura_env.buffer = 0;
- elseif cEvent == "SPELL_PERIODIC_ENERGIZE" and select(12, ...) == 203650 then
- --[[local d = 0;
- if aura_env.lastPrep then
- d = GetTime() - aura_env.lastPrep;
- end
- print(string.format("%.3f %.3f", GetTime(), d));
- aura_env.lastPrep = GetTime();]]
- aura_env.preparedTick(aura_env.preparedCurrentTick);
- elseif cEvent == "SPELL_AURA_APPLIED" and select(12, ...) == 203650 then
- aura_env.prepared = {};
- aura_env.preparedCurrentTick = 1;
- for i=1,aura_env.preparedTicks do
- aura_env.prepared[i] = GetTime() + aura_env.preparedInterval * i;
- end
- aura_env.scheduleTick(1);
- end
- end
- elseif event == "PLAYER_REGEN_ENABLED" then
- aura_env.buffer = 0;
- elseif event == "WA_PREPARED_TICK" then
- aura_env.preparedTick(..., true);
- end
- return true;
- end
Advertisement
Add Comment
Please, Sign In to add comment