mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 07:18:37 +00:00
[Tasks] Make Task Selector Cooldown Optional (#2420)
Some live npcs ignore the request cooldown timer (tutorialb) A separate function had to be used for perl because the apis use an array instead of array reference which won't allow a bool overload This also replaces the fixed array and count args with a vector
This commit is contained in:
+4
-4
@@ -2294,10 +2294,10 @@ bool QuestManager::createBot(const char *name, const char *lastname, uint8 level
|
||||
|
||||
#endif //BOTS
|
||||
|
||||
void QuestManager::taskselector(int taskcount, int *tasks) {
|
||||
void QuestManager::taskselector(const std::vector<int>& tasks, bool ignore_cooldown) {
|
||||
QuestManagerCurrentQuestVars();
|
||||
if(RuleB(TaskSystem, EnableTaskSystem) && initiator && owner && task_manager)
|
||||
initiator->TaskQuestSetSelector(owner, taskcount, tasks);
|
||||
initiator->TaskQuestSetSelector(owner, tasks, ignore_cooldown);
|
||||
}
|
||||
void QuestManager::enabletask(int taskcount, int *tasks) {
|
||||
QuestManagerCurrentQuestVars();
|
||||
@@ -2322,11 +2322,11 @@ bool QuestManager::istaskenabled(int taskid) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void QuestManager::tasksetselector(int tasksetid) {
|
||||
void QuestManager::tasksetselector(int tasksetid, bool ignore_cooldown) {
|
||||
QuestManagerCurrentQuestVars();
|
||||
Log(Logs::General, Logs::Tasks, "[UPDATE] TaskSetSelector called for task set %i", tasksetid);
|
||||
if(RuleB(TaskSystem, EnableTaskSystem) && initiator && owner && task_manager)
|
||||
initiator->TaskSetSelector(owner, tasksetid);
|
||||
initiator->TaskSetSelector(owner, tasksetid, ignore_cooldown);
|
||||
}
|
||||
|
||||
bool QuestManager::istaskactive(int task) {
|
||||
|
||||
Reference in New Issue
Block a user