Alright so we spoke of this bug before, but apparently it doesn’t seem to be properly resolved. When I play the game to a high level, and I try starting the quest I have in my game, the first red flag that leads to the infinity reward glitch begins after trying to close the end of the Quest-giving conversation (i.e: ‘GiveQuest’ is triggered), and this is the stack trace that it leads to (P.S: it usually doesn’t happen if we are just starting the game, at a low level):
MissingReferenceException: The object of type 'QuestItemUI' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
UnityEngine.Object.Instantiate (UnityEngine.Object original, UnityEngine.Transform parent, System.Boolean instantiateInWorldSpace) (at <ba783288ca164d3099898a8819fcec1c>:0)
UnityEngine.Object.Instantiate[T] (T original, UnityEngine.Transform parent, System.Boolean worldPositionStays) (at <ba783288ca164d3099898a8819fcec1c>:0)
UnityEngine.Object.Instantiate[T] (T original, UnityEngine.Transform parent) (at <ba783288ca164d3099898a8819fcec1c>:0)
QuestListUI.Redraw () (at Assets/Project Backup/Scripts/UI/Quests/QuestListUI.cs:37)
RPG.Quests.QuestList.CompleteObjective (RPG.Quests.Quest quest, System.String objective) (at Assets/Project Backup/Scripts/Quests/QuestList.cs:61)
RPG.Quests.QuestCompletion.CompleteObjective () (at Assets/Project Backup/Scripts/Quests/QuestCompletion.cs:16)
UnityEngine.Events.InvokableCall.Invoke () (at <ba783288ca164d3099898a8819fcec1c>:0)
UnityEngine.Events.UnityEvent.Invoke () (at <ba783288ca164d3099898a8819fcec1c>:0)
RPG.Dialogue.DialogueTrigger.Trigger (System.String actionToTrigger) (at Assets/Project Backup/Scripts/Dialogue/DialogueTrigger.cs:19)
RPG.Dialogue.PlayerConversant.TriggerAction (System.String action) (at Assets/Project Backup/Scripts/Dialogue/PlayerConversant.cs:180)
RPG.Dialogue.PlayerConversant.TriggerExitAction () (at Assets/Project Backup/Scripts/Dialogue/PlayerConversant.cs:168)
RPG.Dialogue.PlayerConversant.Quit () (at Assets/Project Backup/Scripts/Dialogue/PlayerConversant.cs:46)
RPG.UI.DialogueUI.<Start>b__8_1 () (at Assets/Project Backup/Scripts/UI/DialogueUI.cs:30)
UnityEngine.Events.InvokableCall.Invoke () (at <ba783288ca164d3099898a8819fcec1c>:0)
UnityEngine.Events.UnityEvent.Invoke () (at <ba783288ca164d3099898a8819fcec1c>:0)
UnityEngine.UI.Button.Press () (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/Button.cs:70)
UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/Button.cs:114)
UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/ExecuteEvents.cs:57)
UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/ExecuteEvents.cs:272)
UnityEngine.EventSystems.EventSystem:Update() (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/EventSystem.cs:514)
Any idea how to resolve this issue? After finishing the quest, if I try closing the reward dialogue at the end, I get the same reward everytime I hit ‘X’, and if I try walk away, the reward gets tripled… The only way out is to re-talk to the quest giver, and then walk away (which is a very obvious bug I don’t want in my game)