Esempio n. 1
0
        /// <summary>Defines a set of Auras that are mutually exclusive</summary>
        public static uint AddAuraGroup(SpellLineId auraLine, SpellLineId auraLine2, params SpellId[] auras)
        {
            uint      nextAuraUid = AuraHandler.GetNextAuraUID();
            SpellLine line1       = auraLine.GetLine();

            line1.AuraUID = nextAuraUid;
            foreach (Spell spell in line1)
            {
                spell.AuraUID = nextAuraUid;
            }
            SpellLine line2 = auraLine2.GetLine();

            line2.AuraUID = nextAuraUid;
            foreach (Spell spell in line2)
            {
                spell.AuraUID = nextAuraUid;
            }
            foreach (SpellId aura in auras)
            {
                Spell spell = SpellHandler.Get(aura);
                if (spell == null)
                {
                    throw new ArgumentException("Invalid SpellId: " + (object)aura);
                }
                spell.AuraUID = nextAuraUid;
            }

            return(nextAuraUid);
        }
Esempio n. 2
0
        /// <summary>Defines a set of Auras that are mutually exclusive</summary>
        public static uint AddAuraGroup(IEnumerable <Spell> auras)
        {
            uint nextAuraUid = AuraHandler.GetNextAuraUID();

            foreach (Spell aura in auras)
            {
                aura.AuraUID = nextAuraUid;
            }
            return(nextAuraUid);
        }
Esempio n. 3
0
        /// <summary>Defines a set of Auras that are mutually exclusive</summary>
        public static uint AddAuraGroup(params SpellLineId[] auraLines)
        {
            uint nextAuraUid = AuraHandler.GetNextAuraUID();

            foreach (SpellLineId auraLine in auraLines)
            {
                SpellLine line = auraLine.GetLine();
                line.AuraUID = nextAuraUid;
                foreach (Spell spell in line)
                {
                    spell.AuraUID = nextAuraUid;
                }
            }

            return(nextAuraUid);
        }
Esempio n. 4
0
        /// <summary>Defines a set of Auras that are mutually exclusive</summary>
        public static uint AddAuraGroup(params SpellId[] auras)
        {
            uint nextAuraUid = AuraHandler.GetNextAuraUID();

            foreach (SpellId aura in auras)
            {
                Spell spell = SpellHandler.Get(aura);
                if (spell == null)
                {
                    throw new ArgumentException("Invalid SpellId: " + (object)aura);
                }
                spell.AuraUID = nextAuraUid;
            }

            return(nextAuraUid);
        }