What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

Hi,is there a way or function to count how many npc attack you?

Yes, and if you wonder most Custom Classes have logic to counter more then 1 NPC at a time. However how well its implemented vary from CC to CC.
 
The first line below would return a list of units that are currently targeting the player or his/her pet, the second would just return a count of the same. I don't see a plugin request though so please clarify if you're asking for something specific to be made.

-Alpha

Code:
List<WoWUnit> units = ObjectManager.GetObjectsOfType<WoWUnit>(false, false).Where(x => x.IsTargetingMeOrPet).ToList();

int unitCount = ObjectManager.GetObjectsOfType<WoWUnit>(false, false).Count(x => x.IsTargetingMeOrPet);
 
Back
Top