Code: Select all
public void OnQuestAccepted(int index)
{
DialogueLua.SetQuestField("DOG HELP Quest", "questcode", AllQuests[index].hashcode);
if (!string.IsNullOrEmpty(AllQuests[index].target1))
{
DialogueLua.SetQuestField("DOG HELP Quest", "target1", AllQuests[index].target1);
DialogueLua.SetQuestField("DOG HELP Quest", "target1num", AllQuests[index].targetNum1);
}
if (!string.IsNullOrEmpty(AllQuests[index].target2))
{
DialogueLua.SetQuestField("DOG HELP Quest", "target2", AllQuests[index].target2);
DialogueLua.SetQuestField("DOG HELP Quest", "target2num", AllQuests[index].targetNum2);
}
}
Code: Select all
private void SetQuestStateInCode(double hashcode, double state)
{
AllQuests[(int)hashcode].questState = (int)state;
}