vanilla-wow-addons – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 --Immunity Code - Thanks to Astryl - http://www.curse-gaming.com/en/wow/addons-3321-1-feralskills.html
2  
3 function lazyr.WatchForImmunes(text)
4 if (lrLocale.IMMUNE) then
5 if (not lrLocale.ImmunityProblemCreatures) then
6 lazyr.d("Immune tracking is not 100% supported for your locale.")
7 end
8 for spell, creature in string.gfind(text, lrLocale.IMMUNE) do
9 --Ignore non-targets (or at least, try, based on name), banished targets,
10 -- or known problematic targets (targets that have temporary immunities)
11 if (UnitName('target') ~= creature or lazyr.masks.HasBuffOrDebuff("target", "debuff", nil, "Cripple", nil)) then
12 return
13 end
14 for _, problemCreature in lrLocale.ImmunityProblemCreatures do
15 if string.find(creature, problemCreature) then
16 return
17 end
18 end
19 if UnitIsPlayer("target") then
20 return
21 end
22 lazyr.d("IMMUNITY DETECTED! Spell: "..spell.." Creature: "..creature)
23 if not lazyr.perPlayerConf.Immunities[spell] then
24 lazyr.perPlayerConf.Immunities[spell] = {};
25 end
26 lazyr.perPlayerConf.Immunities[spell][creature] = true;
27 end
28 end
29 end
30