-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
I think you have a bug in quest_i_main on lines 2959, 2962 and 2965. It is currently:
if (GetQuestAllowPrecollectedItems(sQuestTag) == TRUE)
{
sqlquery sObjectiveData = GetQuestStepObjectiveData(nQuestID, nNextStep);
while (SqlStep(sObjectiveData))
{
int nValueType = SqlGetInt(sObjectiveData, 0);
if (nValueType == QUEST_OBJECTIVE_GATHER)
{
string sItemTag = SqlGetString(sObjectiveData, 1);
//int nQuantity = SqlGetInt(sObjectiveData, 2);
//int nQuantityMax = SqlGetInt(sObjectiveData, 3);
string sData = SqlGetString(sObjectiveData, 4);
int bParty = GetQuestStepPartyCompletion(sQuestTag, nNextStep);
int n, nPCCount = GetPCItemCount(oPC, sItemTag, bParty);
if (nPCCount == 0)
QuestDebug(PCToString(oPC) + " does not have any precollected items that " +
"satisfy requirements for " + QuestToString(nQuestID) + " " + StepToString(nNextStep));
else
QuestDebug("Applying " + IntToString(nPCCount) + " precollected items toward " +
"requirements for " + QuestToString(nQuestID) + " " + StepToString(nNextStep));
for (n = 0; n < nPCCount; n++)
SignalQuestStepProgress(oPC, sItemTag, QUEST_OBJECTIVE_GATHER, sData);
}
}
}
I think it should be:
if (GetQuestAllowPrecollectedItems(sQuestTag) == TRUE)
{
sqlquery sObjectiveData = GetQuestStepObjectiveData(nQuestID, nNextStep);
while (SqlStep(sObjectiveData))
{
int nValueType = SqlGetInt(sObjectiveData, 1); // 0 is ID, not nValueType
if (nValueType == QUEST_OBJECTIVE_GATHER)
{
string sItemTag = SqlGetString(sObjectiveData, 2); // 1 is nValueType , not sKey. Assuming sKey maps to sItemTag
string sData = SqlGetString(sObjectiveData, 5); // 4 is sValueMax, not sData
int bParty = GetQuestStepPartyCompletion(sQuestTag, nNextStep);
int n, nPCCount = GetPCItemCount(oPC, sItemTag, bParty);
if (nPCCount == 0)
QuestDebug(PCToString(oPC) + " does not have any precollected items that " +
"satisfy requirements for " + QuestToString(nQuestID) + " " + StepToString(nNextStep));
else
QuestDebug("Applying " + IntToString(nPCCount) + " precollected items toward " +
"requirements for " + QuestToString(nQuestID) + " " + StepToString(nNextStep));
for (n = 0; n < nPCCount; n++)
SignalQuestStepProgress(oPC, sItemTag, QUEST_OBJECTIVE_GATHER, sData);
}
}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels