[Shared Tasks] Enforce task reqs on player removal (#2342)

This verifies a shared task's minimum players requirement is still met
when a member is removed and schedules it for termination if not
This commit is contained in:
hg
2022-07-30 21:49:57 -04:00
committed by GitHub
parent d243cbf8a3
commit 1351f147f4
6 changed files with 71 additions and 1 deletions
+1
View File
@@ -555,6 +555,7 @@ RULE_BOOL(TaskSystem, RecordCompletedOptionalActivities, false, "Record complete
RULE_BOOL(TaskSystem, KeepOneRecordPerCompletedTask, true, "Keep only one record per completed task")
RULE_BOOL(TaskSystem, EnableTaskProximity, true, "Enable task proximity system")
RULE_INT(TaskSystem, RequestCooldownTimerSeconds, 15, "Seconds between allowing characters to request tasks (live-like default: 15 seconds)")
RULE_INT(TaskSystem, SharedTasksWorldProcessRate, 6000, "Timer interval (milliseconds) that shared tasks are processed in world")
RULE_CATEGORY_END()
RULE_CATEGORY(Range)
+3
View File
@@ -2,6 +2,7 @@
#define EQEMU_SHARED_TASKS_H
#include "database.h"
#include "timer.h"
#include "types.h"
#include "repositories/character_data_repository.h"
#include "repositories/tasks_repository.h"
@@ -203,6 +204,8 @@ public:
std::vector<uint32_t> member_id_history; // past and present members for replay timers
std::vector<uint32_t> dynamic_zone_ids;
Timer terminate_timer;
protected:
SharedTasksRepository::SharedTasks m_db_shared_task;
+1 -1
View File
@@ -389,7 +389,7 @@ namespace TaskStr {
constexpr uint16 NO_LONGER_MEMBER = 8942; // You are no longer a member of the shared task.
constexpr uint16 YOU_MAY_NOT_REQUEST_EXPANSION = 8943; // You may not request this shared task because you do not have the required expansion.
constexpr uint16 PLAYER_MAY_NOT_REQUEST_EXPANSION = 8944; // You may not request this shared task because %1 does not have the required expansion.
constexpr uint16 TWO_MIN_REQ_TASK_TERMINATED = 8945; // If your party does not meet the requirements in two minutes, the shared task will be terminated.
constexpr uint16 REQS_TWO_MIN = 8945; // If your party does not meet the requirements in two minutes, the shared task will be terminated.
constexpr uint16 YOU_REPLAY_TIMER = 8946; // You may not request this shared task because you must wait %1d:%2h:%3m before you can do another task of this type.
constexpr uint16 PLAYER_REPLAY_TIMER = 8947; // You may not request this shared task because %1 must wait %2d:%3h:%4m before they can do another task of this type.
constexpr uint16 PLAYER_NOW_LEADER = 8948; // %1 is now the leader of your shared task, '%2'.