mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-02 00:06:36 +00:00
[Tasks] Change zone task data container (#2410)
This allows removal of the task id limit (MAXTASKS) There's some suspect places task data isn't verified but left unchanged If memory use becomes too high once more live data is added tasks can be stored in shared memory instead
This commit is contained in:
@@ -162,7 +162,7 @@ void command_task(Client *c, const Seperator *sep)
|
||||
|
||||
if (is_assign) {
|
||||
auto task_id = std::strtoul(sep->arg[2], nullptr, 10);
|
||||
if (task_id && task_id < MAXTASKS) {
|
||||
if (task_id) {
|
||||
target->AssignTask(task_id, 0, false);
|
||||
c->Message(
|
||||
Chat::Yellow,
|
||||
@@ -203,7 +203,7 @@ void command_task(Client *c, const Seperator *sep)
|
||||
return;
|
||||
} else if (!strcasecmp(sep->arg[2], "task") && arguments == 3) {
|
||||
int task_id = std::strtoul(sep->arg[3], nullptr, 10);
|
||||
if (task_id && task_id < MAXTASKS) {
|
||||
if (task_id) {
|
||||
c->Message(
|
||||
Chat::Yellow,
|
||||
fmt::format(
|
||||
@@ -252,7 +252,7 @@ void command_task(Client *c, const Seperator *sep)
|
||||
} else if (is_uncomplete) {
|
||||
if (sep->IsNumber(2)) {
|
||||
auto task_id = std::stoul(sep->arg[2]);
|
||||
if (!task_id || task_id > MAXTASKS) {
|
||||
if (!task_id) {
|
||||
c->Message(Chat::White, "Invalid task ID specified.");
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user