mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 07:18:37 +00:00
[Quest API] Add Bot::Camp() to Perl/Lua. (#2718)
# Perl - Add `$bot->Camp()`. - Add `$bot->Camp(save_to_database)`. # Lua - Add `bot:Camp()`. - Add `bot:Camp(save_to_database)`. # Notes - Saves to database by default, overload is for edge case where a user may not want bot to save to database.
This commit is contained in:
+5
-8
@@ -7728,21 +7728,18 @@ void Bot::DoEnduranceUpkeep() {
|
||||
SetEndurance(GetEndurance() - upkeep_sum);
|
||||
}
|
||||
|
||||
void Bot::Camp(bool databaseSave) {
|
||||
void Bot::Camp(bool save_to_database) {
|
||||
Sit();
|
||||
|
||||
//auto group = GetGroup();
|
||||
if(GetGroup())
|
||||
if (GetGroup()) {
|
||||
RemoveBotFromGroup(this, GetGroup());
|
||||
|
||||
// RemoveBotFromGroup() code is too complicated for this to work as-is (still needs to be addressed to prevent memory leaks)
|
||||
//if (group->GroupCount() < 2)
|
||||
// group->DisbandGroup();
|
||||
}
|
||||
|
||||
LeaveHealRotationMemberPool();
|
||||
|
||||
if(databaseSave)
|
||||
if (save_to_database) {
|
||||
Save();
|
||||
}
|
||||
|
||||
Depop();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user