示例#1
0
        public List <AURA> getAuras(uint unit)
        {
            List <AURA> result    = new List <AURA>();
            AURA        A         = new AURA();
            uint        auraTable = unit + AURA_TABLE_1; //aura list & count has 2 possible locations
            uint        auraCount = wow.ReadUInt(unit + AURA_COUNT_1);

            if (auraCount > 80)
            {
                auraTable = wow.ReadUInt(unit + AURA_TABLE_2); //and the second one
                auraCount = wow.ReadUInt(unit + AURA_COUNT_2);
            }
            for (uint i = 0; i < auraCount; i++)
            {
                uint spellId = wow.ReadUInt(auraTable + AURA_SIZE * i + AURA_SPELL_ID);
                if (spellId > 0)
                {
                    UInt64 creatorGUID = wow.ReadUInt64(auraTable + AURA_SIZE * i);
                    A.auraId      = spellId;
                    A.creatorGuid = creatorGUID;
                    result.Add(A);
                }
            }
            return(result);
        }
示例#2
0
 public int AuraStacks(AURA which)
 {
     return(myAura[(int)which].stacks);
 }
示例#3
0
 public bool AuraActive(AURA which)
 {
     return(myAura[(int)which].isActive);
 }
示例#4
0
文件: Memory.cs 项目: Bia10/clrn
 public List<AURA> getAuras(uint unit)
 {
     List<AURA> result = new List<AURA>();
     AURA A = new AURA();
     uint auraTable = unit + AURA_TABLE_1; //aura list & count has 2 possible locations
     uint auraCount = wow.ReadUInt(unit + AURA_COUNT_1);
     if (auraCount > 80)
     {
         auraTable = wow.ReadUInt(unit + AURA_TABLE_2); //and the second one
         auraCount = wow.ReadUInt(unit + AURA_COUNT_2);
     }
     for (uint i = 0; i < auraCount; i++)
     {
         uint spellId = wow.ReadUInt(auraTable + AURA_SIZE * i + AURA_SPELL_ID);
         if (spellId > 0)
         {
             UInt64 creatorGUID = wow.ReadUInt64(auraTable + AURA_SIZE * i);
             A.auraId = spellId;
             A.creatorGuid = creatorGUID;
             result.Add(A);
         }
     }
     return result;
 }