Added new Perl/LUA GetSpellIDByBookSlot (#1151)

Added a new questAPI GetSpellIDByBookSlot to allow for sorting spellbooks by various attributes (level, type, etc).  Allows to determine which spell is in what book slot.
This commit is contained in:
neckkola
2020-12-21 19:06:48 -04:00
committed by GitHub
parent c6d4d8f291
commit a1cc68d214
5 changed files with 43 additions and 0 deletions
+1
View File
@@ -988,6 +988,7 @@ public:
void ProcessInspectRequest(Client* requestee, Client* requester);
bool ClientFinishedLoading() { return (conn_state == ClientConnectFinished); }
int FindSpellBookSlotBySpellID(uint16 spellid);
uint32 GetSpellIDByBookSlot(int book_slot);
int GetNextAvailableSpellBookSlot(int starting_slot = 0);
inline uint32 GetSpellByBookSlot(int book_slot) { return m_pp.spell_book[book_slot]; }
inline bool HasSpellScribed(int spellid) { return (FindSpellBookSlotBySpellID(spellid) != -1 ? true : false); }