File tree Expand file tree Collapse file tree
Assets/Scripts/Game/Questing Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55// Source Code: https://github.com/Interkarma/daggerfall-unity
66// Original Author: Lypyl (lypyldf@gmail.com), Gavin Clayton (interkarma@dfworkshop.net)
77// Contributors: Hazelnut
8- //
8+ //
99// Notes:
1010//
1111
1919using DaggerfallWorkshop . Game . Guilds ;
2020
2121/*Example patterns:
22- *
22+ *
2323 * Item _gold_ gold
2424 * Item _gold1_ gold range 5 to 25
2525 * Item talisman talisman
@@ -281,8 +281,19 @@ public void MakePermanent()
281281 madePermanent = true ;
282282
283283 // Set current DaggerfallUnityItem instance as permanent
284- if ( DaggerfallUnityItem != null )
285- DaggerfallUnityItem . MakePermanent ( ) ;
284+ if ( item != null )
285+ item . MakePermanent ( ) ;
286+
287+ // Make sure permanency is synced for items in player item collections
288+ Entity . PlayerEntity playerEntity = GameManager . Instance . PlayerEntity ;
289+ DaggerfallUnityItem [ ] items = playerEntity . Items . ExportQuestItems ( ParentQuest . UID , Symbol ) ;
290+ if ( items == null || items . Length == 0 )
291+ return ;
292+
293+ foreach ( DaggerfallUnityItem dfitem in items )
294+ {
295+ dfitem . MakePermanent ( ) ;
296+ }
286297 }
287298
288299 #endregion
You can’t perform that action at this time.
0 commit comments