New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scripts/VoA: Archavon Only leap on players far away #22414
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ps move stuff to chrono types while you're touching the script
30000
-> 30s
etc
@@ -107,15 +107,17 @@ class boss_archavon : public CreatureScript | |||
events.ScheduleEvent(EVENT_ROCK_SHARDS, 15000); | |||
break; | |||
case EVENT_CHOKING_CLOUD: | |||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) | |||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, [&](Unit* u) { return u && !(u->GetDistance(me->GetPosition()) < 10.0f); })) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
read UnitAI.h
159-166
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SELECT_TARGET_FARTHEST would make the script to always target the one, truly, farthest away instead of randomly selecting someone.
Atleast that's the results after trying it with the enum
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Who said you should use SELECT_TARGET_FARTHEST
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SELECT_TARGET_FARTHEST implies the farthest target will be selected, no? That's not the intended behavior, it should just select a random ranged target
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Who said you should use
SELECT_TARGET_FARTHEST
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, -10.0f))
If I understood it correctly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup (assuming he can't jump on MT, idk if that's correct)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MT is always melee range so yes.
I guess he should be possible to do it if MT runs away but yeah.
Thanks for showing this by the way, made it simpler.
don't need to bother with |
-- & Leap only on Players -- & Possible to leap on Tank
(cherry picked from commit 3c5b1f0)
Changes proposed:
Adding mid-Range requirement to ensure Leap only occurs on players that aren't in melee range.
Values is educational guess, taking his model size into consideration to get the ingame view perspective fitting Retail encounter.
Contains correction of #17588
Target branch(es): 3.3.5/master
3.3.5
Tests performed: