mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 07:18:37 +00:00
[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user