chickengod 0 Posted June 10, 2020 Share Posted June 10, 2020 Is it possible to set a caster check in these functions? UnitDebuff("target","spellname",nil,"player") dont work in TBC. Link to comment Share on other sites More sharing options...
Matenia 627 Posted June 11, 2020 Share Posted June 11, 2020 You just iterate all buffs on the unit and check if the one you're looking for is there Link to comment Share on other sites More sharing options...
Zer0 148 Posted June 11, 2020 Share Posted June 11, 2020 11 hours ago, chickengod said: Is it possible to set a caster check in these functions? UnitDebuff("target","spellname",nil,"player") dont work in TBC. What do you mean by "caster check" exactly? Link to comment Share on other sites More sharing options...
chickengod 0 Posted June 11, 2020 Author Share Posted June 11, 2020 I want the function to determine whether my debaf is on the target and cast it even if there is such a debaf on the target but from another player. Link to comment Share on other sites More sharing options...
TheSmokie 242 Posted June 11, 2020 Share Posted June 11, 2020 (edited) You mean "unitCaster "? https://wowwiki.fandom.com/wiki/API_UnitDebuff this should work its C# if (ObjectManager.Target.GetBuffs("Spell name").Any(a => a.Owner == ObjectManager.Me.Guid)) Edited June 11, 2020 by Smokie Link to comment Share on other sites More sharing options...
Matenia 627 Posted June 11, 2020 Share Posted June 11, 2020 unitCaster doesn't exist in TBC and owner doesn't work either In TBC, if there's a timer it's yours. Zer0 1 Link to comment Share on other sites More sharing options...
chickengod 0 Posted June 11, 2020 Author Share Posted June 11, 2020 1 hour ago, Matenia said: unitCaster doesn't exist in TBC and owner doesn't work either In TBC, if there's a timer it's yours. Please show an example of a simple check for the presence of a timer for debuff/buff. Link to comment Share on other sites More sharing options...
chickengod 0 Posted June 11, 2020 Author Share Posted June 11, 2020 3 hours ago, Smokie said: You mean "unitCaster "? https://wowwiki.fandom.com/wiki/API_UnitDebuff this should work its C# if (ObjectManager.Target.GetBuffs("Spell name").Any(a => a.Owner == ObjectManager.Me.Guid)) Its API for tbc https://web.archive.org/web/20100105220335/http://wowprogramming.com/docs/api/UnitDebuff Link to comment Share on other sites More sharing options...
Matenia 627 Posted June 12, 2020 Share Posted June 12, 2020 for i=1,40 do local name, rank, iconTexture, count, debuffType, duration, timeLeft = UnitDebuff("target", i); if name == "Frostbolt" and duration ~=nil then -- is mine end end Link to comment Share on other sites More sharing options...
chickengod 0 Posted June 12, 2020 Author Share Posted June 12, 2020 5 hours ago, Matenia said: for i=1,40 do local name, rank, iconTexture, count, debuffType, duration, timeLeft = UnitDebuff("target", i); if name == "Frostbolt" and duration ~=nil then -- is mine end end Thank you, this argument works fine. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now