mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +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:
+9
-7
@@ -10173,17 +10173,19 @@ int32 Bot::GetRawItemAC()
|
||||
return Total;
|
||||
}
|
||||
|
||||
void Bot::SendSpellAnim(uint16 targetid, uint16 spell_id)
|
||||
void Bot::SendSpellAnim(uint16 target_id, uint16 spell_id)
|
||||
{
|
||||
if (!targetid || !IsValidSpell(spell_id))
|
||||
if (!target_id || !IsValidSpell(spell_id)) {
|
||||
return;
|
||||
}
|
||||
|
||||
EQApplicationPacket app(OP_Action, sizeof(Action_Struct));
|
||||
Action_Struct* a = (Action_Struct*)app.pBuffer;
|
||||
a->target = targetid;
|
||||
a->source = GetID();
|
||||
a->type = 231;
|
||||
a->spell = spell_id;
|
||||
auto* a = (Action_Struct*) app.pBuffer;
|
||||
|
||||
a->target = target_id;
|
||||
a->source = GetID();
|
||||
a->type = 231;
|
||||
a->spell = spell_id;
|
||||
a->hit_heading = GetHeading();
|
||||
|
||||
app.priority = 1;
|
||||
|
||||
Reference in New Issue
Block a user