Inheritance: MemoryObject
Exemple #1
0
        public static async Task AttackAcdAsync(ActorCommonData acd)
        {

            var minHitsReached = acd.x188_Hitpoints;
            var dtHitReached = DateTime.Now;

            DateTime dtTimeout = DateTime.Now;
            while (acd.x188_Hitpoints > 00000.1)
            {
                if (DateTime.Now > dtTimeout.AddSeconds(30) || DateTime.Now > dtHitReached.AddSeconds(5))
                    return;

                var acdVector3 = new SharpDX.Vector3() { X = acd.x0D0_WorldPosX, Y = acd.x0D4_WorldPosY, Z = acd.x0D8_WorldPosZ };
                await MoveTo.MoveToPosAsync(acdVector3);

                var screenPos = D3ToScreen.FromD3toScreenCoords(acdVector3);

                MouseEvents.LeftClick(screenPos.X, screenPos.Y);
                await Task.Delay(new Random().Next(100, 250));

                if (acd.x188_Hitpoints < minHitsReached)
                {
                    minHitsReached = acd.x188_Hitpoints;
                    dtHitReached = DateTime.Now;
                }
            }
        }
Exemple #2
0
        public static bool IsCubeNearby(out ActorCommonData CubeStand)
        {
            CubeStand = new ActorCommonData();

            try
            {
                List<ACD> AllActors;
                lock (A_Collection.Environment.Actors.AllActors) AllActors = A_Collection.Environment.Actors.AllActors;

                var acd = AllActors.FirstOrDefault(x => x._ACD.x090_ActorSnoId == KanaiCube_Stand)._ACD;

                if (acd != null)
                {
                    CubeStand = acd;

                    return true;
                }

                return false;
            }
            catch (Exception)
            {
                return false;
            }
        }
Exemple #3
0
        public static bool HasValidTarget(ActorCommonData acd)
        {
            if (acd == null || acd.x188_Hitpoints < 00001)
                return false;

            return true;

        }
Exemple #4
0
 public ACD(ActorCommonData _acd, bool isMonster, bool isPlayer, double distance, double progress)
 {
     this._ACD = _acd;
     this.IsMonster = isMonster;
     this.IsPlayer = isPlayer;
     this.Distance = distance;
     this.Progress = progress;
 }
Exemple #5
0
        //private static bool IsValidMonster(ActorCommonData acd)
        //{
        //    return acd.x188_Hitpoints > 0.00001 && // seems to be lower limit for what D3 considers dead
        //        (acd.x194_Flags_Is_Trail_Proxy_Etc & 1) == 0 && // this removes most weird actors
        //        acd.x190_TeamId == 10; // = hostile
        //}

        public void GetAllMonsters()
        {
            var engine = Engine.Create();
            var acds = new ActorCommonData[0];
            var pt = System.Diagnostics.Stopwatch.StartNew();
            for (int i = 0; i < 1000; i++)
            {
                acds = ActorCommonDataHelper.EnumerateMonsters().ToArray();
            }
            pt.Stop();
            Console.WriteLine("Getting all monster ACDs 1000 times took " + pt.Elapsed.TotalMilliseconds.ToString("0.00") + "ms");
            Console.WriteLine("Max update frequency: " + (1000d / (pt.Elapsed.TotalMilliseconds / 1000)).ToString("0") + "Hz");
            Console.WriteLine("Number of ACDs: " + ActorCommonDataHelper.Enumerate(a => true).Count());
            Console.ReadLine();
        }
Exemple #6
0
        public static double get_RiftProgress(ActorCommonData monster)
        {
            try
            {
                if (A_Collection.Presets.Monsters.Monsters_RiftProgress.Count > 0)
                {
                   
                    return A_Collection.Presets.Monsters.Monsters_RiftProgress[monster.x090_ActorSnoId];
                }
                return 0;
            }
            catch (Exception)
            {

                return 0;
            }
        }
 public static bool IsWhite(ActorCommonData acd)
 {
     return (int)acd.GetAttributeValue(AttributeId.ItemQualityLevel) == (int)ItemQuality.Inferior ||
         (int)acd.GetAttributeValue(AttributeId.ItemQualityLevel) == (int)ItemQuality.Normal ||
         (int)acd.GetAttributeValue(AttributeId.ItemQualityLevel) == (int)ItemQuality.Superior;
 }
 public static bool IsMagic(ActorCommonData acd)
 {
     return (int)acd.GetAttributeValue(AttributeId.ItemQualityLevel) == (int)ItemQuality.Magic1 ||
         (int)acd.GetAttributeValue(AttributeId.ItemQualityLevel) == (int)ItemQuality.Magic2 ||
         (int)acd.GetAttributeValue(AttributeId.ItemQualityLevel) == (int)ItemQuality.Magic3;
 }
        public static ItemSlotSize GetSlotSize(ActorCommonData ItemAcd)
        {
            string ItemName = ItemAcd.x004_Name.ToLower();

            if (ItemName.Contains("ring") ||
                ItemName.Contains("amulet") ||
                ItemName.Contains("belt")
                )
            {
                return ItemSlotSize._1x1;
            }

            return ItemSlotSize._2x1;
        }
Exemple #10
0
        public static bool hasAffix_Shielding(ActorCommonData monster)
        {
            try
            {
                List<int> AffixPowers = new List<int>()
                {
                    226437,
                    226438
                };

                return isBuff(AffixPowers, monster);
            }
            catch { return false; }
        }
Exemple #11
0
            public static bool IsMaterial(ActorCommonData acd)
            {
                switch (acd.x090_ActorSnoId)
                {
                    case 361988:    //Crafting_Legendary_05
                    case 361989:    //Crafting_Looted_Reagent_05
                    case 361986:    //Crafting_Rare_05
                    case 361985:    //Crafting_Magic_05
                    case 361984:    //Crafting_AssortedParts_05
                    case 137958:    //CraftingMaterials_Flippy_Global
                    case 365020:    //CraftingReagent_Legendary_Set_Borns_X1
                    case 364281:    //CraftingReagent_Legendary_Set_Cains_X1
                    case 364290:    //CraftingReagent_Legendary_Set_Demon_X1
                    case 364305:    //CraftingReagent_Legendary_Set_Hallowed_X1
                    case 364975:    //CraftingReagent_Legendary_Set_CaptainCrimsons_X1
                    case 364725:    //DemonOrgan_Diablo_x1
                    case 364723:    //DemonOrgan_Ghom_x1
                    case 364724:    //DemonOrgan_SiegeBreaker_x1
                    case 364722:    //DemonOrgan_SkeletonKing_x1
                    case 366949:    //InfernalMachine_Diablo_x1
                    case 366947:    //InfernalMachine_Ghom_x1
                    case 366948:    //InfernalMachine_SiegeBreaker_x1
                    case 366946:    //InfernalMachine_SkeletonKing_x1
                    case 359504:    //HoradricRelic

                        return true;

                    default:
                        return false;
                }
            }
Exemple #12
0
        private static Enigma.D3.Enums.ItemLocation GetHeroLocationByItemAcd(ActorCommonData ItemAcd)
        {
            lock (A_Collection.Me.HeroDetails.EquippedItems)
            {
                var Container = A_Collection.Me.HeroDetails.EquippedItems.ToList();

                return Container.FirstOrDefault(x => x.x000_Id == ItemAcd.x000_Id).x114_ItemLocation;
            }
        }
Exemple #13
0
            public static double getConventionTicksLeft(A_Enums.DamageType CurrentElement, ActorCommonData acd)
            {
                acd.TakeSnapshot();

                int currentIndex = Array.FindIndex(A_Collection.Presets.ConventionElements.Convention_ElementRotation, x => x == CurrentElement);

                if (currentIndex < 0)
                    return 0;

                int AttribId_BuffEndTick = A_Collection.Presets.ConventionElements.Convention_BuffEndtickAttribIdRotation[currentIndex];

                double ticksleft = getBuffCount(A_Enums.Powers.Convention_PowerSno, AttribId_BuffEndTick, acd) - A_Collection.Environment.Scene.GameTick;

                acd.FreeSnapshot();

                return ticksleft;
            }
Exemple #14
0
 public static bool IsGroundItem(ActorCommonData acd)
 {
     return (int) acd.x114_ItemLocation == -1;
 }
Exemple #15
0
        public static bool hasAffix_Waller(ActorCommonData monster)
        {
            try
            {
                List<int> AffixPowers = new List<int>()
                {
                    226293,
                    226294,
                    231117,
                    231118
                };

                return isBuff(AffixPowers, monster);
            }
            catch { return false; }
        }
Exemple #16
0
            public static A_Enums.DamageType getConventionElement(ActorCommonData acd)
            {
               acd.TakeSnapshot();

                int index = Array.FindIndex(A_Collection.Presets.ConventionElements.Convention_BuffcountAttribIdRotation,
                    a => a == A_Collection.Presets.ConventionElements.Convention_BuffcountAttribIdRotation.FirstOrDefault(
                        x => isBuff(A_Enums.Powers.Convention_PowerSno, x, acd)));

                if(index < 0)
                    return DamageType.none;

                A_Enums.DamageType element = A_Collection.Presets.ConventionElements.Convention_ElementRotation[index];
                acd.FreeSnapshot();

                return element;
            }
Exemple #17
0
        public static bool hasAffix_Vortex(ActorCommonData monster)
        {
            try
            {
                List<int> AffixPowers = new List<int>()
                {
                    81615,
                    120306,
                    221132,
                    120305
                };

                return isBuff(AffixPowers, monster);
            }
            catch { return false; }
        }
Exemple #18
0
        public static bool hasAffix_Thunderstorm(ActorCommonData monster)
        {
            try
            {
                List<int> AffixPowers = new List<int>()
                {
                    336177,
                    336178,
                    336179
                };

                return isBuff(AffixPowers, monster);
            }
            catch { return false; }
        }
Exemple #19
0
        public static bool hasAffix_Teleporter(ActorCommonData monster)
        {
            try
            {
                List<int> AffixPowers = new List<int>()
                {
                    155958,
                    155959

                };

                return isBuff(AffixPowers, monster);
            }
            catch { return false; }
        }
Exemple #20
0
 public static bool IsRare(ActorCommonData acd)
 {
     return (int)acd.GetAttributeValue(AttributeId.ItemQualityLevel) == (int)ItemQuality.Rare4 ||
         (int)acd.GetAttributeValue(AttributeId.ItemQualityLevel) == (int)ItemQuality.Rare5 ||
         (int)acd.GetAttributeValue(AttributeId.ItemQualityLevel) == (int)ItemQuality.Rare6;
 }
Exemple #21
0
 public Item(Enigma.D3.ActorCommonData Item)
 {
     this.ItemActor   = Item;
     this.AncientItem = Item.GetAttribute(AttributeId.AncientRank) == 1;
     ItemQuality      = Quality();
 }
Exemple #22
0
 public static bool IsGreaterRiftKeystone(ActorCommonData acd)
 {
     return acd.x090_ActorSnoId == 408416;
 }
Exemple #23
0
        public static bool hasAffix_Plagued(ActorCommonData monster)
        {
            try
            {
                List<int> AffixPowers = new List<int>()
                {
                 90566,
                 231115
                };

                return isBuff(AffixPowers, monster);
            }
            catch { return false; }
        }
Exemple #24
0
            public static bool IsGem(ActorCommonData acd)
            {
                switch (acd.x090_ActorSnoId)
                {
                    case 437414: //Amethyst_15 Marquise Amethyst
                    case 437415: //Amethyst_16 Imperial Amethyst
                    case 437459: //Ruby_15 Marquise Ruby
                    case 437460: //Ruby_16 Imperial Ruby
                    case 437481: //x1_Diamond_06 Marquise Diamond
                    case 437482: //x1_Diamond_07 Imperial Diamond
                    case 437448: //x1_Emerald_06 Marquise Emerald
                    case 437449: //x1_Emerald_07 Imperial Emerald
                    case 437469: //x1_Topaz_06 Marquise Topaz
                    case 437470: //x1_Topaz_07 Imperial Topaz
                        return true;

                    default:
                        return false;
                }
            }
Exemple #25
0
        public static bool hasAffix_Mortar(ActorCommonData monster)
        {
            try
            {
                List<int> AffixPowers = new List<int>()
                {
                  215756,
                  215757
                };

                return isBuff(AffixPowers, monster);
            }
            catch { return false; }
        }
Exemple #26
0
        public static bool hasAffix_Nightmarish(ActorCommonData monster)
        {
            try
            {
                List<int> AffixPowers = new List<int>()
                {
                 247258
                };

                return isBuff(AffixPowers, monster);
            }
            catch { return false; }
        }
Exemple #27
0
 public static bool IsAncient(ActorCommonData acd)
 {
     return (int) acd.GetAttributeValue(AttributeId.AncientRank) == 1;
 }
Exemple #28
0
 private static double GetItemSeed(ActorCommonData ItemAcd)
 {
     return ItemAcd.GetAttributeValue(Enigma.D3.Enums.AttributeId.Seed);
 }
Exemple #29
0
 public static bool IsLegendary(ActorCommonData acd)
 {
     return (int) acd.GetAttributeValue(AttributeId.ItemQualityLevel) == (int) ItemQuality.Legendary;
 }
Exemple #30
0
 public static bool IsValid(ActorCommonData acd)
 {
     return acd.x000_Id != -1;
 }
Exemple #31
0
        public static bool hasAffix_ReflectsDamage(ActorCommonData monster)
        {
            try
            {
                List<int> AffixPowers = new List<int>()
                {
                    230877,
                    285770
                };

                return isBuff(AffixPowers, monster);
            }
            catch { return false; }
        }