From 22a157787e01e456c81cb54e7d2f2ead61309e21 Mon Sep 17 00:00:00 2001 From: Drajor Date: Sat, 25 Jul 2015 16:14:33 +1000 Subject: [PATCH] Fix for ClientTaskState::UpdateTasksOnDeliver Fix for issue introduced in changes to allow stacked items to be handed in. Calling GetCharges on an item that can not be stacked will return 0 so this mean't that task credit was not awarded for single items. --- zone/tasks.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/tasks.cpp b/zone/tasks.cpp index cc84cc9de..d52ae842b 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -1749,7 +1749,7 @@ bool ClientTaskState::UpdateTasksOnDeliver(Client *c, std::list& Item } // We found an active task related to this item, so increment the done count Log.Out(Logs::General, Logs::Tasks, "[UPDATE] Increment on GiveItem"); - IncrementDoneCount(c, Task, i, j, k->GetCharges()); + IncrementDoneCount(c, Task, i, j, k->GetCharges() <= 0 ? 1 : k->GetCharges()); Ret = true; } }