Hey devs, if you can give me a lead on how to access the current Enemy list while in combat, I could have a very interesting change for all the monks around here.
I need to be able to see what monsters are around me and to get on of their id's based on their current / max hp.
If you can point me in the right direction it would be nice
thx
Magi is right - you want to look in Weighting.cs
Weighting.cs is where several things happen:
1) We pick a target that we want to 'focus' on - keep in mind Trinity can only have
ONE (1!) "CurrentTarget" - this is by design
2) We setup counters for the number of various things such as:
- Number of units/monsters in X range (5/10/15/.../50)... etc)
- Number of elites in X range ^^
3) Prioritize goblins based on user settings
4) Weight targets based on how far away, if they're in avoidance, their health, and a number of other factors
In order to do what you want - e.g. apply Exploding Palm - I would approach it this way:
1) Check if you're a monk (Weights.cs)
2) Check if we have the ability in our hotbar, and if we can cast it (Weights.cs)
3) Setup AbilitySelector and/or behaviors to track and manage a list of RActorGUID's that have already had exploding palm applied and when, so we don't re-apply within 3 seconds (Behaviors.cs and/or Monk.cs)
4) Set Weighting so that if we have a potential target that has less than Y% health, make that have the highest weight (20k usually over-weights everything) (Weights.cs)
5) If we have identified a target that is below Y% health we pick that and set it to CurrentTarget
5) Monk.cs has all the know-how to apply exploding palm, based on perhaps user configuration (add a GUI option maybe?), and track that RActorGUID via some sort of "internal static Dictionary<int, Datetime> explodingPalmTimer" perhaps...
6) On the next loop of the Weighting system, re-read explodingPalmTimer and don't prioritize the unit if it already has exploding palm
I would NOT suggest doing any of the following:
1) Building your own target list
2) Applying exploding palm anywhere outside of Monk.cs, being called by Behaviors.cs
And, for the love of my sanity and ease of integration with everyone else working on this project, please always work off the Developer fork
https://www.assembla.com/code/unifiedtrinity/git/nodes/DeveloperOnly
Thanks!
rrrix