Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions Assets/Scripts/Game/Questing/Item.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Source Code: https://github.com/Interkarma/daggerfall-unity
// Original Author: Lypyl (lypyldf@gmail.com), Gavin Clayton (interkarma@dfworkshop.net)
// Contributors: Hazelnut
//
//
// Notes:
//

Expand All @@ -19,7 +19,7 @@
using DaggerfallWorkshop.Game.Guilds;

/*Example patterns:
*
*
* Item _gold_ gold
* Item _gold1_ gold range 5 to 25
* Item talisman talisman
Expand Down Expand Up @@ -281,8 +281,19 @@ public void MakePermanent()
madePermanent = true;

// Set current DaggerfallUnityItem instance as permanent
if (DaggerfallUnityItem != null)
DaggerfallUnityItem.MakePermanent();
if (item != null)
item.MakePermanent();

// Make sure permanency is synced for items in player item collections
Entity.PlayerEntity playerEntity = GameManager.Instance.PlayerEntity;
DaggerfallUnityItem[] items = playerEntity.Items.ExportQuestItems(ParentQuest.UID, Symbol);
if (items == null || items.Length == 0)
return;

foreach (DaggerfallUnityItem dfitem in items)
{
dfitem.MakePermanent();
}
}

#endregion
Expand Down