Thread Tools Display Modes
07-31-21, 09:09 AM   #1
fullmoon_sulfuras
A Fallenroot Satyr
Join Date: Dec 2019
Posts: 21
I came up with the following function:

Lua Code:
  1. function Lunar.Items:BCCIsFlyingMount(mount)
  2.     local items = { "Windrider", "Gryphon", "Cenarion War Hippogryph", "Netherwing Drake", "Nether Ray", "Ashes of Al'ar", "Flying Machine" }
  3.  
  4.     for _,v in pairs(items) do
  5.         if string.find(mount, v) then
  6.             return true
  7.         end
  8.     end
  9.     return false
  10. end

Where mount is the item's name.
  Reply With Quote
08-01-21, 12:55 PM   #2
Zax
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 147
tContains do the same thing:

Lua Code:
  1. function Lunar.Items:BCCIsFlyingMount(mount)
  2.     local items = { "Windrider", "Gryphon", "Cenarion War Hippogryph", "Netherwing Drake", "Nether Ray", "Ashes of Al'ar", "Flying Machine" }
  3.         return tContains(items, mount)
  4. end
__________________
Zax - Addons List, not all maintained.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » BCC: Any good way to tell if a mount can fly?


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off