[Quest API] Add SignalAllBotsByOwnerName() to Perl/Lua. (#2730)

# Perl
- Add `$entity_list->SignalAllBotsByOwnerName(owner_name)`.

# Lua
- Add `eq.get_entity_list():SignalAllBotsByOwnerName(owner_name)`.

# Notes
- Adds a way to signal all bots by owner name instead of only character ID.
This commit is contained in:
Alex King authored and GitHub committed 2023-01-13 04:54:20 -06:00
1 parent f8afadf0a9
commit 095f4fb56c
5 files changed
+26

No files matched your search

+12
View File
@@ -5250,6 +5250,18 @@ void EntityList::SignalAllBotsByOwnerCharacterID(uint32 character_id, int signal
}
}
void EntityList::SignalAllBotsByOwnerName(std::string owner_name, int signal_id)
{
auto client_bot_list = GetBotListByClientName(owner_name);
if (client_bot_list.empty()) {
return;
}
for (const auto& b : client_bot_list) {
b->Signal(signal_id);
}
}
void EntityList::SignalBotByBotID(uint32 bot_id, int signal_id)
{
auto b = GetBotByBotID(bot_id);