Skip to content
Open
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions Assets/Scripts/Game/Questing/Actions/PlaceFoe.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
// License: MIT License (http://www.opensource.org/licenses/mit-license.php)
// Source Code: https://github.com/Interkarma/daggerfall-unity
// Original Author: Gavin Clayton (interkarma@dfworkshop.net)
// Contributors:
//
// Contributors:
//
// Notes:
//

Expand Down Expand Up @@ -79,7 +79,7 @@ public override void Update(Task caller)
}

// Assign Foe to Place
place.AssignQuestResource(foeSymbol, marker);
place.AssignQuestResource(foe.Symbol, marker);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, is there any way foeSymbol could differ from foe.Symbol?

Copy link
Contributor Author

@TwelveEyes TwelveEyes Jun 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK foe.Symbol would be set in Foe.SetResources(), which parses quest definitions (e.g. Foe _mtraitor_ is Ranger). This would still match PlaceFoe's foeSymbol from parsing a quest action (e.g. place foe _mtraitor_ at _wayrest_ marker 3). _mtraitor_ matches _mtraitor_. If they differed somehow then I think something would be seriously wrong.

Both PlaceNpc and PlaceItem use <QuestResource>.Symbol member variable for AssignQuestResource() as well, leaving PlaceFoe the odd one out.


SetComplete();
}
Expand Down
7 changes: 5 additions & 2 deletions Assets/Scripts/Game/Questing/Actions/PlaceNpc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
// License: MIT License (http://www.opensource.org/licenses/mit-license.php)
// Source Code: https://github.com/Interkarma/daggerfall-unity
// Original Author: Gavin Clayton (interkarma@dfworkshop.net)
// Contributors:
//
// Contributors:
//
// Notes:
//

Expand Down Expand Up @@ -123,13 +123,15 @@ public struct SaveData_v1
{
public Symbol npcSymbol;
public Symbol placeSymbol;
public int marker;
}

public override object GetSaveData()
{
SaveData_v1 data = new SaveData_v1();
data.npcSymbol = npcSymbol;
data.placeSymbol = placeSymbol;
data.marker = marker;

return data;
}
Expand All @@ -142,6 +144,7 @@ public override void RestoreSaveData(object dataIn)
SaveData_v1 data = (SaveData_v1)dataIn;
npcSymbol = data.npcSymbol;
placeSymbol = data.placeSymbol;
marker = data.marker;
}

#endregion
Expand Down