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
[3.3.5][6.x] Core/Pets: Pet Attack Distance #16492
Conversation
6ba664d
to
93d72f7
Compare
|
When I use one spell (pet spell) on a target and he's out of line of sight, the pet should pursue the target to be able to use the spell? |
@Keader Indeed, the pet should go find the target to use the spell. Something like this: https://www.youtube.com/watch?v=IIxiusAehl0 Not my video btw. |
@Keader yes, the pet should follow target if there is path available. By the way, what is has to do with this PR lol? |
thats a complete unrelated issue to this PR. |
could you please fix merge issues with this pr ? |
Any reason to don't merge this PR? |
If there is no reason to don't merge this, i will merge it on 24h. |
@@ -65,6 +67,8 @@ class TC_GAME_API PetAI : public CreatureAI | |||
void DoAttack(Unit* target, bool chase); | |||
bool CanAttack(Unit* target); | |||
void ClearCharmInfoFlags(); | |||
|
|||
TargetSpellList targetSpellStore; |
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.
why is this a member of PetAI now?
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.
its declared right now on PetAI update, I simply moved it to the header.
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 it's used only in a function body scope then it shouldn't be moved to class field
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.
its used on update, so its declared on each tick :P
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.
so ? what's wrong with that (and what's good with moving it as class member) ?
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.
ping
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.
still pinging
if (spellInfo->GetRecoveryTime() == 0 && // No cooldown | ||
spellInfo->RangeEntry->ID != 1 /*Self*/ && spellInfo->RangeEntry->ID != 2 /*Combat Range*/ && // Range bigger than melee | ||
range < spellInfo->GetMaxRange(true)) // Bigger than previous | ||
range = spellInfo->RangeEntry->minRangeHostile; |
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.
Why min range here?
Issue with this:
|
be40d22
to
f464988
Compare
done the other comments are not related to the PR, but to movement generators. |
There is anything left to do here? if no opositions i will merge this on monday. |
Search in active AutoCast spells for the correct chase distance.