Skip to content
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

Merged
merged 3 commits into from Sep 10, 2018
Merged

Scripts/VoA: Archavon Only leap on players far away #22414

merged 3 commits into from Sep 10, 2018

Conversation

PatricNox
Copy link

@PatricNox PatricNox commented Sep 10, 2018

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:

========== Build: 5 succeeded, 0 failed, 11 up-to-date, 2 skipped ==========

Tested ingame, does emote during the leap instead of after it.

Copy link
Member

@Treeston Treeston left a 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); }))
Copy link
Member

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

Copy link
Author

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

Copy link
Member

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?

UnitAI.h L162

Copy link

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

Copy link
Member

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?

Copy link
Author

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

Copy link
Member

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)

Copy link
Author

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.

@Treeston
Copy link
Member

don't need to bother with Scripts/VoA commit naming, will be handled at merge

-- & Leap only on Players
-- & Possible to leap on Tank
@Treeston Treeston merged commit 3c5b1f0 into TrinityCore:3.3.5 Sep 10, 2018
Aokromes pushed a commit to Aokromes/TrinityCore that referenced this pull request Sep 15, 2018
Shauren pushed a commit that referenced this pull request Oct 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants