/// <summary> /// Defines a set of Auras that are mutually exclusive /// </summary> public static uint AddAuraGroup(SpellLineId auraLine, SpellLineId auraLine2, params SpellId[] auras) { var uid = GetNextAuraUID(); var line = auraLine.GetLine(); line.AuraUID = uid; foreach (var spell in line) { spell.AuraUID = uid; } line = auraLine2.GetLine(); line.AuraUID = uid; foreach (var spell in line) { spell.AuraUID = uid; } foreach (var id in auras) { var spell = SpellHandler.Get(id); if (spell == null) { throw new ArgumentException("Invalid SpellId: " + id); } spell.AuraUID = uid; } return(uid); }
/// <summary>Defines a set of Auras that are mutually exclusive</summary> public static uint AddAuraGroup(SpellLineId auraLine, SpellLineId auraLine2, params SpellId[] auras) { uint nextAuraUid = 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: " + aura); } spell.AuraUID = nextAuraUid; } return(nextAuraUid); }
/// <summary>Returns the first visible Aura with the given SpellId</summary> /// <param name="id"></param> /// <returns></returns> public bool Contains(SpellLineId id) { SpellLine line = id.GetLine(); if (line != null) { return(this[line] != null); } return(false); }
/// <summary>Returns the first visible Aura with the given SpellId</summary> /// <param name="id"></param> /// <returns></returns> public Aura this[SpellLineId id] { get { SpellLine line = id.GetLine(); if (line != null) { return(this[line]); } return((Aura)null); } }
public void ClearCooldown(SpellLineId id, bool alsoClearCategory = true) { var line = id.GetLine(); if (line != null) { foreach (var spell in line) { ClearCooldown(spell, alsoClearCategory); } } }
public Aura this[SpellLineId id, bool positive] { get { SpellLine line = id.GetLine(); if (line != null) { return(this[line, positive]); } return(null); } }
public void ClearCooldown(SpellLineId id, bool alsoClearCategory = true) { SpellLine line = id.GetLine(); if (line == null) { return; } foreach (Spell cooldownSpell in line) { this.ClearCooldown(cooldownSpell, alsoClearCategory); } }
/// <summary> /// Gets the highest rank of the line that this SpellCollection contains /// </summary> public Spell GetHighestRankOf(SpellLineId lineId) { return(this.GetHighestRankOf(lineId.GetLine())); }
/// <summary> /// Defines a set of Auras that are mutually exclusive /// </summary> public static uint AddAuraGroup(SpellLineId auraLine, SpellLineId auraLine2, params SpellId[] auras) { var uid = GetNextAuraUID(); var line = auraLine.GetLine(); line.AuraUID = uid; foreach (var spell in line) { spell.AuraUID = uid; } line = auraLine2.GetLine(); line.AuraUID = uid; foreach (var spell in line) { spell.AuraUID = uid; } foreach (var id in auras) { var spell = SpellHandler.Get(id); if (spell == null) { throw new ArgumentException("Invalid SpellId: " + id); } spell.AuraUID = uid; } return uid; }