Beispiel #1
0
 /// <summary>
 /// check a WoWUnit for a particular PartyBuff enum
 /// </summary>
 /// <param name="unit">unit to check for buff</param>
 /// <param name="cat">buff to check for.  may be a mask of multiple buffs if any will do, such as PartyBuff.Stats + PartyBuff.Mastery</param>
 /// <returns>true if any buff matching the mask in 'cat' is found, otherwise false</returns>
 public static bool HasPartyBuff(this WoWUnit unit, PartyBuffType cat)
 {
     foreach (var a in unit.CachedGetAllAuras())
     {
         PartyBuffType bc = GetPartyBuffForSpell(a.Name);
         if ((bc & cat) != PartyBuffType.None)
         {
             return(true);
         }
     }
     return(false);
 }