BCC: Any good way to tell if a mount can fly?
Hi! I'm trying to figure out if a mount, say, the Great While Kodo (ID 18793), can fly. I know it can't, but is there an API function that could tell me if a mount can fly? The best I could come up with is to exhaustively check for the name of the flying mounts:
string.find(mount.name, "Windrider") - Griffon - Windrider - Cenarion War Hippogryph (33999) - Netherwing Drake - Nether Ray - Ashes of Al'ar (32458) - Flying Machine This is for BCC. Thanks! |
Code:
creatureDisplayInfoID, description, source, isSelfMount, mountTypeID, One of the returns is the mountTypeId with for flying should be 248 for most flying mounts. |
Is C_MountJournal available in BCC?
|
It isn't available in BCC. You'll have to build your own database for item and/or spell IDs depending on if you're checking inventory or buffs.
|
It might be better to watch the 2.5.2 PTR and how it progresses.
|
Quote:
Especially when there was no precedent for it in the reference content. Mount Journal didn't exist until WoD. |
I came up with the following function:
Lua Code:
Where mount is the item's name. |
tContains do the same thing:
Lua Code:
|
tContains() doesn't run string pattern matching.
Also, it's better to compare by itemID rather than name, otherwise localization will be a problem. |
Quote:
Quote:
|
There is no mount simply named "Gryphon". For example, if you tried to match with Ebon Gryphon, tContains() will return false while the manual search returns true because tContains() (using tIndexOf()) doesn't do pattern matching. This is what string.find() is doing.
|
OK, I understand.
Thank you for your explanation SDPhantom. |
Quote:
Thanks!! |
All times are GMT -6. The time now is 10:46 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI