Jump to content

UnitDebuff/UnitBuff for TBC 2.4.3


chickengod
 Share

Recommended Posts

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

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

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

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

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...