public void OnStructureCreated(QuestStructureType type) { bool needTryComplete = false; foreach (QuestInfo startedQuest in startedQuests) { CreateStructureQuestCondition condition = null; if (startedQuest.Data.TryGetCompleteCondition <CreateStructureQuestCondition>(PlayerRace, out condition)) { CreatedStructure = new CreatedStructure(type); needTryComplete = true; } } if (needTryComplete) { TryCompleteQuest(sendUpdate: true); } logger.Info($"{LOG_TAG}: created structure {type}"); }
public CreateStructureQuestCondition(UniXMLElement element) { Structure = element.GetEnum <QuestStructureType>("value"); //Count = element.GetInt("count"); }
public CreatedStructure(QuestStructureType type) { Type = type; }