Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added stealth checking support #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

FeikoWielsma
Copy link

I tested it on my druid; worked fine for me. First time editing Lua, though!

Copy link
Owner

@DanielAdolfsson DanielAdolfsson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! But I'm not sure 16 is the maximum number of buffs. I suspect UnitBuff returns nil if a buff doesn't exist on that index.

@DanielAdolfsson
Copy link
Owner

local i, buff = 1
repeat
    buff = UnitBuff("player", i);
    if buff == textureName then
        return true
    end
    i = i + 1
until not buff
return false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants