April 9, 20179 yr Hi! I've created a fightclass for my paladin while leveling, I want him to cleanse nasty debuffs... (the one I am trying to cleanse now is Toxic Saliva, spell ID 7125 he doesn't do nothing about it when I have Return value research: 1 Return value var: result but if I delete both those lines he just spams cleanse (it works but that's just cuz I've got it in the last spots in my priority list) my question is, what have I done wrong? :( prot pala TBC dubbel wisdom.xml
April 9, 20179 yr UnitBuff looks like this in TBC local name, rank, iconTexture, count, duration, timeLeft = UnitBuff(unit, buffIndex[, castable]); UnitDebuff looked like this: local name, rank, iconTexture, count, debuffType, duration, timeLeft = UnitDebuff(unitID, debuffIndex [, removable]); local buffNames = { ["Toxic Saliva"] = true, }; for i=1,40 do local name, rank, iconTexture, count, debuffType, duration, timeLeft = UnitDebuff("player", i) if (buffNames[name]) then result=1 return; end end
April 9, 20179 yr Author 2 hours ago, Schaka said: UnitBuff looks like this in TBC local name, rank, iconTexture, count, duration, timeLeft = UnitBuff(unit, buffIndex[, castable]); UnitDebuff looked like this: local name, rank, iconTexture, count, debuffType, duration, timeLeft = UnitDebuff(unitID, debuffIndex [, removable]); local buffNames = { ["Toxic Saliva"] = true, }; for i=1,40 do local name, rank, iconTexture, count, debuffType, duration, timeLeft = UnitDebuff("player", i) if (buffNames[name]) then result=1 return; end end you sir is a god among men. worked perfect, so if I want more debuffs cleansed, do I have to do a new cleanse for every debuff? or could I add so it cleanses all poison/disease/magic?
April 9, 20179 yr You just add the debuffname, like such: local buffNames = { ["Toxic Saliva"] = true, ["Shadow Word: Pain"] = true, };
April 9, 20179 yr Author 1 minute ago, Schaka said: You just add the debuffname, like such: local buffNames = { ["Toxic Saliva"] = true, ["Shadow Word: Pain"] = true, }; will be a long list... would it be able to do it with debuffType?
April 9, 20179 yr If you changed the code to not check for name but debuffType, sure. But your table has to contain the debuffTypes then. You can use the History function on WoWWiki to read the old TBC API.
April 9, 20179 yr Author yeah this is a little over the top for my knowledge, I will just add all the debuffs :) thanks for your help!
Create an account or sign in to comment