diff --git a/plugins/daily_tasks/DailyTasks.cpp b/plugins/daily_tasks/DailyTasks.cpp index 550550b7..444032df 100644 --- a/plugins/daily_tasks/DailyTasks.cpp +++ b/plugins/daily_tasks/DailyTasks.cpp @@ -529,10 +529,13 @@ namespace Plugins::DailyTasks /** @ingroup DailyTasks * @brief Hook on PlayerLaunch to display the task list when the player undocks. */ - void DisplayTasksOnLaunch([[maybe_unused]] const uint& ship, ClientId& client) + void DisplayTasksOnLaunch([[maybe_unused]] const std::string_view& charFilename, ClientId& client) { - PrintTasks(client); - PrintUserCmdText(client, L"To view this list again, type /showtasks in chat."); + if (global->config->displayMessage) + { + PrintTasks(client); + PrintUserCmdText(client, L"To view this list again, type /showtasks in chat."); + } } /** @ingroup DailyTasks @@ -677,7 +680,7 @@ using namespace Plugins::DailyTasks; REFL_AUTO(type(Config), field(taskQuantity), field(minCreditsReward), field(maxCreditsReward), field(itemRewardPool), field(taskTradeBaseTargets), field(taskTradeItemTargets), field(taskItemAcquisitionTargets), field(taskNpcKillTargets), field(taskPlayerKillTargets), field(taskDuration), - field(resetTime)); + field(resetTime), field(displayMessage)); REFL_AUTO(type(Tasks), field(tasks)); @@ -703,5 +706,5 @@ extern "C" EXPORT void ExportPluginInfo(PluginInfo* pi) pi->emplaceHook(HookedCall::IEngine__ShipDestroyed, &ShipDestroyed); pi->emplaceHook(HookedCall::IServerImpl__GFGoodSell, &ItemSold, HookStep::After); pi->emplaceHook(HookedCall::IServerImpl__BaseEnter, &SaveTaskStatusOnBaseEnter, HookStep::After); - pi->emplaceHook(HookedCall::IServerImpl__PlayerLaunch, &DisplayTasksOnLaunch); + pi->emplaceHook(HookedCall::IServerImpl__CharacterSelect, &DisplayTasksOnLaunch); } \ No newline at end of file diff --git a/plugins/daily_tasks/DailyTasks.hpp b/plugins/daily_tasks/DailyTasks.hpp index 4c2192bd..84b03a9c 100644 --- a/plugins/daily_tasks/DailyTasks.hpp +++ b/plugins/daily_tasks/DailyTasks.hpp @@ -36,6 +36,8 @@ namespace Plugins::DailyTasks int resetTime = 12; //! The amount of time in seconds a player has to complete a set of assigned tasks before they get cleaned up during the hourly check or at login. int taskDuration = 86400; + //! Whether or not to display a message with daily task data when a player logs in. + bool displayMessage = true; }; enum class TaskType