- if (curItem->iWhere==13)
- {
- for (unsigned int j=0;j<10;j++)
- {
- for (unsigned int k=0;k<5;k++)
- {
- if (client->quest.quests[i].Items[j].itemnum==curItem->uiItemSN)
- {
- if(!pquests->OperateValues(curItem->btOp, &client->quest.quests[i].Items[j].count, curItem->iRequestCnt))
- return QUEST_FAILURE;
- else
- return QUEST_SUCCESS;
- }
- }
- }
- }
If you look at what the if statements are using, you can see that it's using i and j, instead of j and k like you would think it should. This would make the server change the wrong quest items while the client showed the right amounts being updated. I'm also not sure if there should be a "return QUEST_FAILER" after the for loop, before the main iWhere check completes, since 13 should (As far as I'm aware) only check quest items. Here is code to fix the if's though.
- if (curItem->iWhere==13)
- {
- for (unsigned int j=0;j<10;j++)
- {
- for (unsigned int k=0;k<5;k++)
- {
- if (client->quest.quests[j].Items[k].itemnum==curItem->uiItemSN)
- {
- if(!pquests->OperateValues(curItem->btOp, &client->quest.quests[j].Items[k].count, curItem->iRequestCnt))
- return QUEST_FAILURE;
- else
- return QUEST_SUCCESS;
- }
- }
- }
- }