mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-22 16:28:28 +00:00
[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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user