Skip to content

Commit

Permalink
Update for 8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nebularg committed Jul 17, 2018
1 parent 6e61492 commit e1e9f1d
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 31 deletions.
2 changes: 1 addition & 1 deletion Code/CombatEvents.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2310,7 +2310,7 @@ local function checkForRelevance(sourceFlags, destFlags)
bit_band(destFlags, FLAGS_RELEVANT) == FLAGS_RELEVANT
end

function module:HandleCombatlogEvent(uid, _, timestamp, eventType, _, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags, ...)
function module:HandleCombatlogEvent(uid, timestamp, eventType, _, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags, ...)
if not self:IsEnabled() then return end -- TODO remove

if checkForRelevance(sourceFlags, destFlags) then
Expand Down
4 changes: 2 additions & 2 deletions Code/Parrot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -375,10 +375,10 @@ end
do
local combatLogHandlers = {}

local function OnCombatLogEvent(...)
local function OnCombatLogEvent()
local uid = nextUID()
for mod in next, combatLogHandlers do
mod:HandleCombatlogEvent(uid, ...)
mod:HandleCombatlogEvent(uid, CombatLogGetCurrentEventInfo())
end
end

Expand Down
2 changes: 1 addition & 1 deletion Code/TriggerConditions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ function module:DoesSecondaryTriggerConditionPass(name, arg)
end
end

function module:HandleCombatlogEvent(uid, _, timestamp, eventType, _, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags, ...)
function module:HandleCombatlogEvent(uid, timestamp, eventType, _, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags, ...)
local registeredHandlers = self.combatLogEvents[eventType]
if registeredHandlers then
for _,v in ipairs(registeredHandlers) do
Expand Down
17 changes: 0 additions & 17 deletions Code/Triggers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -288,23 +288,6 @@ local defaultTriggers = {
sticky = true,
color = "9b00b3",
}]],
[1042] = [[{
-- Arcane Missiles!
name = GetSpellInfo(79683),
icon = 79683,
spec = { MAGE = "62" },
conditions = {
["Aura gain"] = {
{
spell = GetSpellInfo(79683),
unit = "player",
auraType = "BUFF",
},
},
},
sticky = true,
color = "59006c",
}]],
[1043] = [[{
-- Hot Streak!
name = GetSpellInfo(48108),
Expand Down
9 changes: 4 additions & 5 deletions Data/Auras.lua
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ Parrot:RegisterSecondaryTriggerCondition {
if not param.unit or not param.spell then
return false
end
local name, _, _, _, _, _, _, unitCaster = UnitAura(param.unit, param.spell)
local name, _, _, _, _, _, unitCaster = AuraUtil.FindAuraByName(param.spell, param.unit)
if name then
-- aura present, but condition is false if the aura has not been cast by
-- the player?
Expand Down Expand Up @@ -901,7 +901,7 @@ Parrot:RegisterSecondaryTriggerCondition {
if not param.unit or not param.spell then
return false
end
local name, _, _, count, _, _, _, unitCaster = UnitAura(param.unit, param.spell)
local name, _, count, _, _, _, unitCaster = AuraUtil.FindAuraByName(param.spell, param.unit)
if name and count == param.stackcount then
if param.byplayer == true then
return unitCaster == "player"
Expand Down Expand Up @@ -949,7 +949,7 @@ Parrot:RegisterSecondaryTriggerCondition {
if not param.unit or not param.spell then
return false
end
local name, _, _, _, _, _, _, unitCaster = UnitDebuff(param.unit, param.spell)
local name, _, _, _, _, _, unitCaster = AuraUtil.FindAuraByName(param.spell, param.unit)
if name then
-- aura present, but condition is false if the aura has not been cast by
-- the player?
Expand Down Expand Up @@ -1000,7 +1000,7 @@ Parrot:RegisterSecondaryTriggerCondition {
if not param.unit or not param.spell then
return false
end
local name, _, _, _, _, _, _, unitCaster = UnitDebuff(param.unit, param.spell)
local name, _, _, _, _, _, unitCaster = AuraUtil.FindAuraByName(param.spell, param.unit)
if name then
if param.byplayer == true then
return unitCaster == "player"
Expand All @@ -1010,7 +1010,6 @@ Parrot:RegisterSecondaryTriggerCondition {
else
return false
end
-- return not UnitAura(param.unit, param.spell or "")
end,
}

Expand Down
4 changes: 2 additions & 2 deletions Data/CombatEvents.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1960,7 +1960,7 @@ do
localName = L["Combo point gain"],
defaultTag = L["[Num] CP"],
events = {
UNIT_POWER = {
UNIT_POWER_UPDATE = {
check = checkPower,
parse = parseCPGain
},
Expand All @@ -1981,7 +1981,7 @@ do
localName = L["Combo points full"],
defaultTag = L["[Num] CP Finish It!"],
events = {
UNIT_POWER = {
UNIT_POWER_UPDATE = {
check = checkPower,
parse = parseCPFull
},
Expand Down
4 changes: 2 additions & 2 deletions Data/TriggerConditions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,8 @@ Parrot:RegisterPrimaryTriggerCondition {
},
},
events = {
UNIT_POWER = ret,
UNIT_MAX_POWER = ret,
UNIT_POWER_UPDATE = ret,
UNIT_MAXPOWER = ret,
},
check = function(ref, info)
-- check if ref is complete
Expand Down
2 changes: 1 addition & 1 deletion Parrot.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 70300
## Interface: 80000
## Title: Parrot 2
## Notes: Floating Combat Text of awesomeness. Caw. It'll eat your crackers.
## Notes-deDE: Scrollender Kampftext der Ungeheuerlichkeit. Kraaaah!
Expand Down

0 comments on commit e1e9f1d

Please sign in to comment.