Le quête est bien supprimée lorsque l'on l'accepte.
This commit is contained in:
parent
3dbddc57ae
commit
b1051f30b2
1 changed files with 10 additions and 1 deletions
|
|
@ -91,8 +91,17 @@ namespace GameUI.Runtime
|
||||||
{
|
{
|
||||||
GameObject GO = Instantiate(_questCardPrefab, _panel.transform);
|
GameObject GO = Instantiate(_questCardPrefab, _panel.transform);
|
||||||
QuestCardUI card = GO.GetComponent<QuestCardUI>();
|
QuestCardUI card = GO.GetComponent<QuestCardUI>();
|
||||||
|
// Use the template's asset GUID as the quest ID so we can track acceptance/completion by template
|
||||||
|
if (System.Guid.TryParse(quest.m_assetGuid, out var templateGuid))
|
||||||
|
{
|
||||||
|
card.Setup(quest.ToQuestClass(QuestStateEnum.Disponible, templateGuid));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Fallback: generate a new quest with a random ID
|
||||||
card.Setup(quest.ToQuestClass(QuestStateEnum.Disponible));
|
card.Setup(quest.ToQuestClass(QuestStateEnum.Disponible));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue