public IEnumerator AddCompanion(ReserveCompanionStatus companion)
        {
            DequeueCompanionStatusData(companion, andUpdate: false);
            HashSet <EventCategory> hashSet = new HashSet <EventCategory>();

            foreach (EventCategory item in companion.definition.eventsInvalidatingCost)
            {
                hashSet.Add(item);
            }
            foreach (EventCategory item2 in companion.definition.eventsInvalidatingCasting)
            {
                hashSet.Add(item2);
            }
            AddFightEventListeners(companion, hashSet, status: false);
            if (companion.isGiven)
            {
                m_additionalCompanionStatusList.Add(companion);
                m_additionalCompanionList.Insert(m_additionalCompanionStatusList.Count - 1, companion);
            }
            else
            {
                m_companionStatusList.Add(companion);
                m_companionList.Insert(m_companionStatusList.Count - 1, companion);
            }
            yield break;
        }
Exemple #2
0
        public IEnumerator AddSpell(SpellStatus spellStatus)
        {
            DequeueSpellStatusEvent(spellStatus.instanceId, andUpdate: false);
            m_spellStatusList.Add(spellStatus);
            m_spellList.Insert(m_spellStatusList.Count - 1, spellStatus);
            HashSet <EventCategory> hashSet = new HashSet <EventCategory>();

            foreach (EventCategory item in spellStatus.definition.eventsInvalidatingCost)
            {
                hashSet.Add(item);
            }
            foreach (EventCategory item2 in spellStatus.definition.eventsInvalidatingCasting)
            {
                hashSet.Add(item2);
            }
            AddFightEventListeners(spellStatus, hashSet, status: false);
            yield break;
        }