WoWInterface SVN CCBreaker

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /branches
    from Rev 9 to Rev 8
    Reverse comparison

Rev 9 → Rev 8

rewrite/filter.lua
1,109 → 1,9
local L = CCBreaker.Locale
CCBreaker.filter={}
 
CCBreaker.filters = {}
CCBreaker.filters.effects = {
["type"] = "orset",
["default"] = "false",
["name"] = "effects",
["desc"] = L["Filter by effects"],
["displayname"] = L["effect filters"],
["subfilters"] = {}
}
local filter = CCBreaker.filter
 
-- yes, that long
local effects = CCBreaker.filters.effects.subfilters
 
effects.FreezingTrap = {
["type"]="bool",
["name"]="freezingtrap",
["desc"]=L["Was it a freezing trap?"],
["displayname"]=L["freezing trap"],
["spellids"]={
[3355] = true, -- Rank 1
[14308] = true, -- Rank 2
[14309] = true, -- Rank 3
},
["bool"]=function(self,info)
local spellid = info["recipientAbilityId"]
return self.spellids[spellid]
end
}
 
effects.Hibernate = {
["type"]="bool",
["name"]="hibernate",
["desc"]=L["Was it hibernate?"],
["displayname"]=L["hibernate"],
["spellids"]={
[2637] = true, -- Rank 1
[18657] = true, -- Rank 2
[18658] = true, -- Rank 3
},
["bool"]=function(self,info)
local spellid = info["recipientAbilityId"]
return self.spellids[spellid]
end
}
 
effects.Polymorph = {
["type"]="bool",
["name"]="polymorph",
["desc"]=L["Was it polymorph?"],
["displayname"]=L["polymorph"],
["spellids"]={
[118] = true, -- Rank 1
[12824] = true, -- Rank 2
[12825] = true, -- Rank 3
[12826] = true, -- Rank 4
[28271] = true, -- Turtle
[28272] = true, -- Pig
[61025] = true, -- Serpent
[61305] = true, -- Black Cat
},
["bool"]=function(self,info)
local spellid = info["recipientAbilityId"]
return self.spellids[spellid]
end
}
 
effects.Sap = {
["type"]="bool",
["name"]="sap",
["desc"]=L["Was it sap"],
["displayname"]=L["sap"],
["spellids"]={
[6770] = true, -- Rank 1
[2070] = true, -- Rank 2
[11297] = true, -- Rank 3
},
["bool"]=function(self,info)
local spellid = info["recipientAbilityId"]
return self.spellids[spellid]
end
}
 
effects.Seduction = {
["type"]="bool",
["name"]="seduction",
["desc"] = L["Was it seduction?"],
["displayname"] = L["seduction"],
["bool"]=function(self,info)
return info["recipientAbilityId"]==6358 -- only one rank of seduction
end
}
 
effects.Shackle = {
["type"]="bool",
["name"]="shackle",
["desc"]=L["Was it shackle undead?"],
["displayname"]=L["shackle undead"],
["spellids"]={
[9484] = true, -- Rank 1
[9485] = true, -- Rank 2
[10955] = true, -- Rank 3
},
["bool"]=function(self,info)
local spellid = info["recipientAbilityId"]
return self.spellids[spellid]
end
}
local spellbyname = {
 
 
 
}
\ No newline at end of file
rewrite/CCBreaker.lua
63,8 → 63,9
-- run all filters in the filter on info
function CCBreaker.Filter(info,filters)
local name
for name,filter in pairs(filters) do
if not filter.Filter(info) then
local filterfunc
for name,filterfunc in pairs(filters) do
if not filterfunc(info) then
return false
end
end
76,7 → 77,7
if filter.Enable then
filter:Enable()
end
filter[subfilter.name]=subfilter
filter[subfilter.name]=subfilter.filterfunc
end
 
-- delete a subfilter from the usable filterlist