mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
[Quest API] Add CampAllBots() to Perl/Lua. (#2732)
# Perl - Add `$client->CampAllBots()`. - Add `$client->CampAllBots(class_id)`. # Lua - Add `client:CampAllBots()`. - Add `client:CampAllBots(class_id)`. # Notes - Adds constants for `NO_CLASS` which is class `0` and uses `RACE_DOUG_0` for any spots that use race ID `0`. - Cleans up magic number usage of race/class of `0`.
This commit is contained in:
+8
-5
@@ -6220,11 +6220,14 @@ void Bot::EquipBot(std::string* error_message) {
|
||||
UpdateEquipmentLight();
|
||||
}
|
||||
|
||||
void Bot::BotOrderCampAll(Client* c) {
|
||||
if(c) {
|
||||
std::list<Bot*> BotList = entity_list.GetBotsByBotOwnerCharacterID(c->CharacterID());
|
||||
for(std::list<Bot*>::iterator botListItr = BotList.begin(); botListItr != BotList.end(); ++botListItr)
|
||||
(*botListItr)->Camp();
|
||||
void Bot::BotOrderCampAll(Client* c, uint8 class_id) {
|
||||
if (c) {
|
||||
const auto& l = entity_list.GetBotsByBotOwnerCharacterID(c->CharacterID());
|
||||
for (const auto& b : l) {
|
||||
if (!class_id || b->GetClass() == class_id) {
|
||||
b->Camp();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user