[Quest API] Add Despawn Events to Perl/Lua. (#2707)

# Perl
- Add `$bot->GetBotID()`.
- Add `EVENT_DESPAWN`.
- Add `EVENT_DESPAWN_ZONE`.

# Lua
- Add `bot:GetBotID()`.
- Add `event_despawn`.
- Add `event_despawn_zone`.

# Notes
- Allows operators to determine when a Bot or an NPC has been despawned via Depop.
- Bots call NPC::Depop on ^camp so we just put the code there.
- Adds the ability to get a bot's ID using their reference in case you're looping a list and need that value.
- Moves `DispatchZoneControllerEvent` from NPC to Mob so it can be used by any type.
This commit is contained in:
Alex King
2023-01-07 12:04:33 -05:00
committed by GitHub
parent 143c4fe6aa
commit c1ad086eaf
12 changed files with 120 additions and 37 deletions
+1
View File
@@ -55,6 +55,7 @@ public:
bool HasBotSpellEntry(uint16 spellid);
void SendPayload(int payload_id);
void SendPayload(int payload_id, std::string payload_value);
uint32 GetBotID();
void ApplySpell(int spell_id);
void ApplySpell(int spell_id, int duration);