QuestCondition bug report
Posted: Thu Jun 03, 2021 7:47 am
Hi again, I have created the previous post where I described my problem.
In this post, I want to report the bug.
Steps to reproduce the bug:
Code blocks related to the issue:
In this post, I want to report the bug.
Steps to reproduce the bug:
- Using an empty Unity project with only QuestMachine imported
Locate "Pesky Rabbits" quest
Set the "rabbits" counter value to 1
In Autostart, add a CounterQuestCondition
Set "Required Counter Value" to 1
Code blocks related to the issue:
Code: Select all
[b]Quest.cs[/b]
public void BecomeUnofferable()
{
try
{
if (GetState() != QuestState.Disabled) SetState(QuestState.Disabled);
SetQuestIndicatorState(questGiverID, QuestIndicatorState.None);
}
catch (Exception e) // Don't let exceptions in user-added events break our code.
{
if (Debug.isDebugBuild) Debug.LogException(e);
}
}
Code: Select all
[b]Quest.cs[/b]
public void SetState(QuestState newState, bool informListeners = true)
{
if (QuestMachine.debug) Debug.Log("Quest Machine: " + GetEditorName() + ".SetState(" + newState + ", informListeners=" + informListeners + ")", this);
m_state = newState;
SetStartChecking(newState == QuestState.WaitingToStart);
SetCounterListeners(newState == QuestState.Active || (newState == QuestState.WaitingToStart && (hasAutostartConditions || hasOfferConditions)));
....
}