WoWInterface SVN CCBreaker

Compare Revisions

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

Rev 8 → Rev 9

CCBreaker.lua
63,9 → 63,8
-- run all filters in the filter on info
function CCBreaker.Filter(info,filters)
local name
local filterfunc
for name,filterfunc in pairs(filters) do
if not filterfunc(info) then
for name,filter in pairs(filters) do
if not filter.Filter(info) then
return false
end
end
77,7 → 76,7
if filter.Enable then
filter:Enable()
end
filter[subfilter.name]=subfilter.filterfunc
filter[subfilter.name]=subfilter
end
 
-- delete a subfilter from the usable filterlist
filter.lua
1,9 → 1,109
CCBreaker.filter={}
local L = CCBreaker.Locale
 
local filter = CCBreaker.filter
CCBreaker.filters = {}
CCBreaker.filters.effects = {
["type"] = "orset",
["default"] = "false",
["name"] = "effects",
["desc"] = L["Filter by effects"],
["displayname"] = L["effect filters"],
["subfilters"] = {}
}
 
local spellbyname = {
 
 
 
}
\ No newline at end of file +-- 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 +}