mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 13:28:25 +00:00
[Quest API] Add HasBotSpellEntry() to Perl/Lua. (#2563)
* [Bots] Quest API Check Spell in Bot_Spell_Entries * Add to luabind and packages * Change Method to be HasBotSpellEntry, change SpellID to uint16 * Ordering, and removed unused logging
This commit is contained in:
@@ -3185,4 +3185,22 @@ void Bot::AI_Bot_Event_SpellCastFinished(bool iCastSucceeded, uint16 slot) {
|
||||
}
|
||||
}
|
||||
|
||||
bool Bot::HasBotSpellEntry(uint16 spellid) {
|
||||
|
||||
auto* spell_list = content_db.GetBotSpells(GetBotSpellID());
|
||||
|
||||
if (!spell_list) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check if Spell ID is found in Bot Spell Entries
|
||||
for (auto& e : spell_list->entries) {
|
||||
if (spellid == e.spellid) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user