Skip to content

Commit

Permalink
HaveItem should not clear target when item is gone
Browse files Browse the repository at this point in the history
  • Loading branch information
JorisVanEijden committed Aug 17, 2019
1 parent da4eaa5 commit c2f4151
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Assets/Scripts/Game/Questing/Actions/HaveItem.cs
Expand Up @@ -17,7 +17,7 @@ namespace DaggerfallWorkshop.Game.Questing
{
/// <summary>
/// Starts a task when player has a particular item resource in their inventory.
/// This task continues to run and will start/clear task when item present/not present
/// This task continues to run and will start task when item present
/// </summary>
public class HaveItem : ActionTemplate
{
Expand Down Expand Up @@ -59,11 +59,9 @@ public override void Update(Task caller)
throw new Exception(string.Format("Could not find Item resource symbol {0}", targetItem));
}

// Start/Clear target task based on player carrying item
// Start target task based on player carrying item
if (GameManager.Instance.PlayerEntity.Items.Contains(item.DaggerfallUnityItem))

This comment has been minimized.

Copy link
@petchema

petchema Mar 2, 2020

Collaborator

Some performance issue has been reported in the forums:
https://forums.dfworkshop.net/viewtopic.php?f=5&t=3466

I guess this code is triggered over and over

ParentQuest.StartTask(targetTask);
else
ParentQuest.ClearTask(targetTask);
}

#region Serialization
Expand Down

0 comments on commit c2f4151

Please sign in to comment.