[Quest API] Add Bot Methods to Lua. (#2731)

# Perl
- Minor cleanup of variable types.

 # Lua
- Add `bot:GetAugmentAt(slot_id, augment_index)`.
- Add `bot:GetItemAt(slot_id)`.
- Add `bot:SendSpellAnim(target_id, spell_id)`.
- Properly implemented `bot:GetItemIDAt(slot_id)`.

# Notes
- `bot:GetItemIDAt` existed in Lua, but didn't have a bind definition, so was non-functional.
- This makes Perl/Lua bot methods 1:1 as Perl had 75 and Lua had 72, they now both have 75.
This commit is contained in:
Alex King
2023-01-14 10:16:11 -05:00
committed by GitHub
parent f5523b40d2
commit bd3e8b2afc
7 changed files with 81 additions and 45 deletions
+8 -6
View File
@@ -534,10 +534,11 @@ bool EQ::ItemInstance::IsNoneEmptyContainer()
}
// Retrieve augment inside item
EQ::ItemInstance* EQ::ItemInstance::GetAugment(uint8 slot) const
EQ::ItemInstance* EQ::ItemInstance::GetAugment(uint8 augment_index) const
{
if (m_item && m_item->IsClassCommon())
return GetItem(slot);
if (m_item && m_item->IsClassCommon()) {
return GetItem(augment_index);
}
return nullptr;
}
@@ -663,12 +664,13 @@ bool EQ::ItemInstance::CanTransform(const ItemData *ItemToTry, const ItemData *C
return false;
}
uint32 EQ::ItemInstance::GetAugmentItemID(uint8 slot) const
uint32 EQ::ItemInstance::GetAugmentItemID(uint8 augment_index) const
{
if (!m_item || !m_item->IsClassCommon())
if (!m_item || !m_item->IsClassCommon()) {
return 0;
}
return GetItemID(slot);
return GetItemID(augment_index);
}
// Add an augment to the item