예제 #1
0
        private uint GetMaxPowerByType(WoWPowerType power)
        {
            switch (power)
            {
            default:
            case WoWPowerType.Mana:
                return(GetDescriptor <uint>(WoWUnitFields.UNIT_FIELD_MAXPOWER1));

            case WoWPowerType.Rage:
                return(GetDescriptor <uint>(WoWUnitFields.UNIT_FIELD_MAXPOWER2));

            case WoWPowerType.Energy:
                return(GetDescriptor <uint>(WoWUnitFields.UNIT_FIELD_MAXPOWER3));

            case WoWPowerType.Focus:
                return(GetDescriptor <uint>(WoWUnitFields.UNIT_FIELD_MAXPOWER4));

            case WoWPowerType.Happiness:
                return(GetDescriptor <uint>(WoWUnitFields.UNIT_FIELD_MAXPOWER5));

            case WoWPowerType.Runes:
            case WoWPowerType.RunicPower:
                return(GetDescriptor <uint>(WoWUnitFields.UNIT_FIELD_MAXPOWER7));
            }
        }
예제 #2
0
 private uint GetPowerByType(WoWPowerType power)
 {
     switch (power)
     {
         default:
         case WoWPowerType.Mana:
             return GetDescriptor<uint>(WoWUnitFields.UNIT_FIELD_POWER1);
         case WoWPowerType.Rage:
             return GetDescriptor<uint>(WoWUnitFields.UNIT_FIELD_POWER2);
         case WoWPowerType.Energy:
             return GetDescriptor<uint>(WoWUnitFields.UNIT_FIELD_POWER3);
         case WoWPowerType.Focus:
             return GetDescriptor<uint>(WoWUnitFields.UNIT_FIELD_POWER4);
         case WoWPowerType.Happiness:
             return GetDescriptor<uint>(WoWUnitFields.UNIT_FIELD_POWER5);
         case WoWPowerType.Runes:
         case WoWPowerType.RunicPower:
             return GetDescriptor<uint>(WoWUnitFields.UNIT_FIELD_POWER7);
     }
 }