1. #1

    An API to get the npc type?

    I'm looking for a better way to know which type the npc is.
    For instance, I do click on a npc to select it, and, how do I know if this npc I've selected is a merchant, flight master or an tailor trainer?
    At the moment I'm scanning the tooltip and searching for some keywords which can tell me what the npc does, but I'm wondering/searching if isn't an API or a better way to get this information.

    Thank you.

  2. #2
    I would try something like

    if tooltip contains XXXXXX return true



    http://wowprogramming.com/docs/widgets/GameTooltip

    Here you could find something.

    isUnit = GameTooltip:IsUnit("unit")

    name, unit = GameTooltip:GetUnit()

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •