LUA Question with reading buff name 1.12.1 menu

User Tag List

Results 1 to 4 of 4
  1. #1
    pinny's Avatar Active Member
    Reputation
    29
    Join Date
    Jan 2010
    Posts
    211
    Thanks G/R
    7/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    LUA Question with reading buff name 1.12.1

    So on the vanilla wow api wiki
    API UnitBuff | Vanilla WoW Wiki | Fandom powered by Wikia

    It states that UnitBuff can be used such as

    name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable,
    shouldConsolidate, spellId = UnitBuff("unit", index or ["name", "rank"][, "filter"])
    However it looks like it is different in 1.12.1

    When targeting a player with Devotion Aura for the first buff slot, and using the following code
    Code:
    a1, a2 = UnitBuff("target",1)
    DEFAULT_CHAT_FRAME:AddMessage(a1);
    DEFAULT_CHAT_FRAME:AddMessage(a2);
    I get the following result


    Also, I tried changing the index which is 1 in my code to the buff name to check for a buff that way. It looks like the 1.12.1 API only accepts indexes and not actual buff names.
    Is there any way using the 1.12.1 LUA API to check if a player has a buff/debuff other than comparing the icon to guess what it is?

    LUA Question with reading buff name 1.12.1
  2. #2
    Glusk's Avatar Contributor
    Reputation
    105
    Join Date
    Apr 2015
    Posts
    33
    Thanks G/R
    7/32
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Looking at your output (and having never tested it before myself) it would seem that the wiki is correct.

    See History on your link:
    Patch 2.0 added name and rank return values.
    Originally Posted by pinny
    It looks like the 1.12.1 API only accepts indexes and not actual buff names.
    Unless you made a typo, that is probably true then.

    See if you can print out spellId and fetch the name via GetSpellInfo(spellId)

  3. #3
    pinny's Avatar Active Member
    Reputation
    29
    Join Date
    Jan 2010
    Posts
    211
    Thanks G/R
    7/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Glusk View Post
    Looking at your output (and having never tested it before myself) it would seem that the wiki is correct.

    See History on your link:
    Unless you made a typo, that is probably true then.

    See if you can print out spellId and fetch the name via GetSpellInfo(spellId)
    GetSpellInfo is not part of the 1.12.1 Lua API. Thanks anyways though.

  4. #4

  5. Thanks pinny (1 members gave Thanks to ev0 for this useful post)

Similar Threads

  1. lua problem with item nub question
    By Flake0207 in forum WoW EMU Questions & Requests
    Replies: 3
    Last Post: 06-23-2009, 10:09 AM
  2. Replies: 9
    Last Post: 04-27-2009, 10:55 AM
  3. Lua question!!Please Read!!
    By xpxd in forum WoW EMU Questions & Requests
    Replies: 3
    Last Post: 04-09-2009, 08:57 PM
  4. Replies: 14
    Last Post: 06-02-2008, 09:25 PM
  5. [Question] Help with Changing Spell Names
    By chaggy7 in forum WoW ME Questions and Requests
    Replies: 4
    Last Post: 10-05-2007, 01:54 PM
All times are GMT -5. The time now is 10:58 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search