March 20, 20179 yr Hey, is there a function that returns the number of skinnable mobs around the player? or sth similar?
March 21, 20179 yr 2 hours ago, burnii said: Hey, is there a function that returns the number of skinnable mobs around the player? or sth similar? int count = ObjectManager.GetWoWUnitHostile().Count(u => u.Type == WoWObjectType.Unit && u.Skinnable && u.GetDistance2D <= 40); This would return the count of all unit around you in range of 40 yards who are skinnable.
March 21, 20179 yr Author 18 hours ago, iMod said: int count = ObjectManager.GetWoWUnitHostile().Count(u => u.Type == WoWObjectType.Unit && u.Skinnable && u.GetDistance2D <= 40); This would return the count of all unit around you in range of 40 yards who are skinnable. Okay, first of all thank you for the answer. To test the function I wrote an infinite loop and if there are no more skinnable mobs near the bot he should write sth into the log. I positioned the bot next to some skinnable corpses and started the bot. Seems like he doesnt find any skinnable mobs since he just writes the message over and over again into the log, doesnt matter how many skinnable corpses are next to him :/
March 21, 20179 yr I might be wrong, but maybe because the units are dead and are corpses and so doesn't count has hostile mobs for this function?
March 21, 20179 yr 32 minutes ago, dragonmase said: I might be wrong, but maybe because the units are dead and are corpses and so doesn't count has hostile mobs for this function? Hm could be a reason. Replace it with ObjectManager.GetObjectWoWUnit().Count(u => u.Skinnable && u.GetDistance2D <= 40); If you just want dead units that are skinnable you need to add "&& u.IsDead" Hope that helps
March 21, 20179 yr Author 20 minutes ago, iMod said: Hm could be a reason. Replace it with ObjectManager.GetObjectWoWUnit().Count(u => u.Skinnable && u.GetDistance2D <= 40); If you just want dead units that are skinnable you need to add "&& u.IsDead" Hope that helps Works now, thank you !
Create an account or sign in to comment