Jump to content
  • Add optional IsMine to UnitBuff wotlk+


    Ordush
    • Version: All Product: WRobot General Type: Suggestion Status: Not Added

    It would be awesome to have IsMine as optional for checking buffs in wotlk

    name, rank, icon, count, debuffType, duration, expirationTime, isMine, isStealable = UnitAura("unit", index or ["name", "rank"][, "filter"])

    Example:
    If (ObjectManager.Target.BuffTimeLeft("Vampiric Touch", true) < 1000)
    Where the true is isMine

    I know I can manually just make a lua function to check it myself, but it would be nice to have built into the api. ?



    User Feedback

    Recommended Comments

    Wow, i am glad to see others working on Wrath of the lich king content. Good job!

     

    Ps : IsMine was changed to UnitCaster in patch 3.1.0

    Edited by Smokie
    added a PS
    Link to comment
    Share on other sites

    4 hours ago, Smokie said:

    Wow, i am glad to see others working on Wrath of the lich king content. Good job!

     

    Ps : IsMine was changed to UnitCaster in patch 3.1.0

    It was just an example, I'm  pretty sure that Droidz reads from memory instead of using the lua function. Was just to explain what I meant. ?

    Link to comment
    Share on other sites

    Hey,

    In Wotlk you have Aura.Owner.

    You can use it like:

    if (ObjectManager.Target.GetBuffs("Vampiric Touch").Any(a => a.Owner == ObjectManager.Me.Guid && a.TimeLeft < 1000))

     

    Link to comment
    Share on other sites

    9 minutes ago, Droidz said:

    Hey,

    In Wotlk you have Aura.Owner.

    You can use it like:

    
    if (ObjectManager.Target.GetBuffs("Vampiric Touch").Any(a => a.Owner == ObjectManager.Me.Guid && a.TimeLeft < 1000))

     

    Very nice!

    Link to comment
    Share on other sites

    On 5/8/2020 at 2:39 PM, Droidz said:

    Hey,

    In Wotlk you have Aura.Owner.

    You can use it like:

    
    if (ObjectManager.Target.GetBuffs("Vampiric Touch").Any(a => a.Owner == ObjectManager.Me.Guid && a.TimeLeft < 1000))

     

    This returns false if the target doesn't have Vampiric Touch
    Have been trying to make a workaround without luck.
    if ((ObjectManager.Target.GetBuffs(_VampiricTouch.Name).Any(a => a.Owner == ObjectManager.Me.Guid && a.TimeLeft < (1000 + ObjectManager.Me.GlobalCooldownTimeLeft + 1500)) || ObjectManager.Me.Guid != ObjectManager.Target.BuffCastedBy(_VampiricTouch.Name)))

    Nevermind lol the last code line i wrote just here works.

    Edited by Ordush
    Link to comment
    Share on other sites



    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 account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...