Hashira
-
Posts
8 -
Joined
-
Last visited
Content Type
Forums
Articles
Bug Tracker
Downloads
Store
Bug Report Comments posted by Hashira
-
-
Super cool. Is there a list of pre-registered events for `robotManager.Events.Events.CustomEventCancelable` or does it apply to any library function by default ?
[Cataclysm] Visit trainer only if there are spells to be trained
in Bug Tracker
Posted · Edited by Hashira
This can be retrieved if you are at a trainer via https://wowwiki-archive.fandom.com/wiki/API_GetTrainerServiceInfo but ideally we won't travel there at all first.
Before visiting the trainer, this is available via the spell book API:
https://wowpedia.fandom.com/wiki/API_GetSpellBookItemInfo - this requires one to walk the whole book, the link contains information about this. `FUTURESPELL` spells are the ones that may be trained in the future.
Then the API GetSpellAvailableLevel can retrieve from which level that particular spell can be used. This one can then be used to decide if the spell can be trained.
See https://www.townlong-yak.com/framexml/4.3.4/SpellBookFrame.lua#640 for the client side logic.