private Ticket GetChoiceTagTicket(Ticket ticket, EventStats eventStat)
        {
            ticket.eventStats = eventStat;

            ticket.choiceStats = GetChoiceSet(eventStat.NextStop);

            return(ticket);
        }
示例#2
0
        //Insert a record to dictionary
        public void RecordChoice(ChoiceStats selectedChoice, EventStats choiceEvent)
        {
            ImplementEffect(selectedChoice.Effect);

            if (!IsChoiceSelected(selectedChoice.ChoiceID, selectedChoice.UniqueID))
            {
                ChoiceRecord choiceRecord = new ChoiceRecord();
                choiceRecord.selectedChoice = selectedChoice;
                choiceRecord.choiceEvent    = choiceEvent;

                SelecteChoiceRecord.Add(choiceRecord);
            }
        }
        private Ticket GetTicketFromID(string id)
        {
            int EventStatsIndex = this._rawParseResult.EventStats.FindIndex(x => x._ID == id);
            var ticket          = new Ticket();

            if (EventStatsIndex < 0)
            {
                return(ticket);
            }

            EventStats eventStat = this._rawParseResult.EventStats[EventStatsIndex];

            ticket.eventStats = eventStat;

            if (eventStat.Tag == ParameterFlag.EventTag.Question)
            {
                ticket = GetChoiceTagTicket(ticket, eventStat);
            }

            return(ticket);
        }