update
This commit is contained in:
@@ -1548,7 +1548,7 @@ end
|
|||||||
do
|
do
|
||||||
local mh = GetInventorySlotInfo("MainHandSlot")
|
local mh = GetInventorySlotInfo("MainHandSlot")
|
||||||
local oh = GetInventorySlotInfo("SecondaryHandSlot")
|
local oh = GetInventorySlotInfo("SecondaryHandSlot")
|
||||||
local ranged = WeakAuras.IsClassic() and GetInventorySlotInfo("RangedSlot")
|
local ranged = GetInventorySlotInfo("RangedSlot")
|
||||||
|
|
||||||
local swingTimerFrame;
|
local swingTimerFrame;
|
||||||
local lastSwingMain, lastSwingOff, lastSwingRange;
|
local lastSwingMain, lastSwingOff, lastSwingRange;
|
||||||
@@ -1564,8 +1564,6 @@ do
|
|||||||
local name, _, _, _, _, _, _, _, _, icon = GetItemInfo(itemId or 0);
|
local name, _, _, _, _, _, _, _, _, icon = GetItemInfo(itemId or 0);
|
||||||
if(lastSwingMain) then
|
if(lastSwingMain) then
|
||||||
return swingDurationMain, lastSwingMain + swingDurationMain - mainSwingOffset, name, icon;
|
return swingDurationMain, lastSwingMain + swingDurationMain - mainSwingOffset, name, icon;
|
||||||
elseif not WeakAuras.IsClassic() and lastSwingRange then
|
|
||||||
return swingDurationRange, lastSwingRange + swingDurationRange, name, icon;
|
|
||||||
else
|
else
|
||||||
return 0, math.huge, name, icon;
|
return 0, math.huge, name, icon;
|
||||||
end
|
end
|
||||||
@@ -1611,14 +1609,14 @@ do
|
|||||||
local currentTime = GetTime();
|
local currentTime = GetTime();
|
||||||
mainSpeed, offSpeed = UnitAttackSpeed("player");
|
mainSpeed, offSpeed = UnitAttackSpeed("player");
|
||||||
offSpeed = offSpeed or 0;
|
offSpeed = offSpeed or 0;
|
||||||
if not(isOffHand) then
|
if not(lastSwingMain) then
|
||||||
lastSwingMain = currentTime;
|
lastSwingMain = currentTime;
|
||||||
swingDurationMain = mainSpeed;
|
swingDurationMain = mainSpeed;
|
||||||
mainSwingOffset = 0;
|
mainSwingOffset = 0;
|
||||||
event = "SWING_TIMER_START";
|
event = "SWING_TIMER_START";
|
||||||
timer:CancelTimer(mainTimer);
|
timer:CancelTimer(mainTimer);
|
||||||
mainTimer = timer:ScheduleTimerFixed(swingEnd, mainSpeed, "main");
|
mainTimer = timer:ScheduleTimerFixed(swingEnd, mainSpeed, "main");
|
||||||
elseif(isOffHand) then
|
elseif(OffhandHasWeapon() and not lastSwingOff) then
|
||||||
lastSwingOff = currentTime;
|
lastSwingOff = currentTime;
|
||||||
swingDurationOff = offSpeed;
|
swingDurationOff = offSpeed;
|
||||||
event = "SWING_TIMER_START";
|
event = "SWING_TIMER_START";
|
||||||
@@ -1698,22 +1696,14 @@ do
|
|||||||
local currentTime = GetTime();
|
local currentTime = GetTime();
|
||||||
local speed = UnitRangedDamage("player");
|
local speed = UnitRangedDamage("player");
|
||||||
if(lastSwingRange) then
|
if(lastSwingRange) then
|
||||||
if WeakAuras.IsClassic() then
|
timer:CancelTimer(rangeTimer, true)
|
||||||
timer:CancelTimer(rangeTimer, true)
|
|
||||||
else
|
|
||||||
timer:CancelTimer(mainTimer, true)
|
|
||||||
end
|
|
||||||
event = "SWING_TIMER_CHANGE";
|
event = "SWING_TIMER_CHANGE";
|
||||||
else
|
else
|
||||||
event = "SWING_TIMER_START";
|
event = "SWING_TIMER_START";
|
||||||
end
|
end
|
||||||
lastSwingRange = currentTime;
|
lastSwingRange = currentTime;
|
||||||
swingDurationRange = speed;
|
swingDurationRange = speed;
|
||||||
if WeakAuras.IsClassic() then
|
rangeTimer = timer:ScheduleTimerFixed(swingEnd, speed, "ranged");
|
||||||
rangeTimer = timer:ScheduleTimerFixed(swingEnd, speed, "ranged");
|
|
||||||
else
|
|
||||||
mainTimer = timer:ScheduleTimerFixed(swingEnd, speed, "main");
|
|
||||||
end
|
|
||||||
WeakAuras.ScanEvents(event);
|
WeakAuras.ScanEvents(event);
|
||||||
end
|
end
|
||||||
elseif event == "UNIT_SPELLCAST_START" then
|
elseif event == "UNIT_SPELLCAST_START" then
|
||||||
|
|||||||
@@ -3574,9 +3574,10 @@ WeakAuras.event_prototypes = {
|
|||||||
"SPELL_UPDATE_USABLE",
|
"SPELL_UPDATE_USABLE",
|
||||||
"PLAYER_TARGET_CHANGED",
|
"PLAYER_TARGET_CHANGED",
|
||||||
"RUNE_POWER_UPDATE",
|
"RUNE_POWER_UPDATE",
|
||||||
|
"RUNE_TYPE_UPDATE",
|
||||||
},
|
},
|
||||||
["unit_events"] = {
|
["unit_events"] = {
|
||||||
["player"] = { "UNIT_POWER_FREQUENT" }
|
["player"] = { "UNIT_POWER", "UNIT_ENERGY", "UNIT_MANA", "UNIT_RAGE" }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
internal_events = {
|
internal_events = {
|
||||||
@@ -3608,6 +3609,8 @@ WeakAuras.event_prototypes = {
|
|||||||
local ret = [=[
|
local ret = [=[
|
||||||
local spellName = %s
|
local spellName = %s
|
||||||
local startTime, duration = WeakAuras.GetSpellCooldown(spellName);
|
local startTime, duration = WeakAuras.GetSpellCooldown(spellName);
|
||||||
|
startTime = startTime or 0
|
||||||
|
duration = duration or 0
|
||||||
local ready = startTime == 0
|
local ready = startTime == 0
|
||||||
local active = IsUsableSpell(spellName) and ready
|
local active = IsUsableSpell(spellName) and ready
|
||||||
]=]
|
]=]
|
||||||
@@ -3629,9 +3632,8 @@ WeakAuras.event_prototypes = {
|
|||||||
name = "spellName",
|
name = "spellName",
|
||||||
display = L["Spell"],
|
display = L["Spell"],
|
||||||
required = true,
|
required = true,
|
||||||
type = "spell",
|
type = "string",
|
||||||
test = "true",
|
test = "true",
|
||||||
showExactOption = true,
|
|
||||||
store = true
|
store = true
|
||||||
},
|
},
|
||||||
-- This parameter uses the IsSpellInRange API function, but it does not check spell range at all
|
-- This parameter uses the IsSpellInRange API function, but it does not check spell range at all
|
||||||
@@ -5660,6 +5662,10 @@ WeakAuras.event_prototypes = {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
WeakAuras.event_prototypes["DBM Announce"] = nil
|
||||||
|
WeakAuras.event_prototypes["DBM Timer"] = nil
|
||||||
|
WeakAuras.event_prototypes["BigWigs Message"] = nil
|
||||||
|
WeakAuras.event_prototypes["BigWigs Timer"] = nil
|
||||||
WeakAuras.event_prototypes["Item Set"] = nil
|
WeakAuras.event_prototypes["Item Set"] = nil
|
||||||
WeakAuras.event_prototypes["Equipment Set"] = nil
|
WeakAuras.event_prototypes["Equipment Set"] = nil
|
||||||
|
|
||||||
|
|||||||
@@ -458,7 +458,6 @@ WeakAuras.power_types = {
|
|||||||
[2] = FOCUS,
|
[2] = FOCUS,
|
||||||
[3] = ENERGY,
|
[3] = ENERGY,
|
||||||
[4] = HAPPINESS,
|
[4] = HAPPINESS,
|
||||||
[5] = RUNES,
|
|
||||||
[6] = RUNIC_POWER,
|
[6] = RUNIC_POWER,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user