-
Notifications
You must be signed in to change notification settings - Fork 6k
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] [NEEDS TESTING] Core/Movement: expand Movement Slot implementation #21888
Changes from 12 commits
84df7e1
d08a16e
892313c
c816579
2bc2b7d
acb927b
af4a5b5
2ace140
06e8056
30abf25
91e1c75
ffa93ce
b73ce52
ae6ca6b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1594,10 +1594,12 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u | |
float attackAngle = float(e.action.setRangedMovement.angle) / 180.0f * float(M_PI); | ||
|
||
for (WorldObject* target : targets) | ||
{ | ||
if (Creature* creature = target->ToCreature()) | ||
if (IsSmart(creature) && creature->GetVictim()) | ||
if (ENSURE_AI(SmartAI, creature->AI())->CanCombatMove()) | ||
creature->GetMotionMaster()->MoveChase(creature->GetVictim(), attackDistance, attackAngle); | ||
} | ||
|
||
break; | ||
} | ||
|
@@ -2230,16 +2232,16 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u | |
target->ToUnit()->RemoveAllGameObjects(); | ||
break; | ||
} | ||
case SMART_ACTION_STOP_MOTION: | ||
case SMART_ACTION_REMOVE_MOVEMENT: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is the change to this action backwards compatible? If not then you need to update db data to keep behavior the same There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. there is not, currently, any script using the action
I guess so... the old one made 0 sense and hardly ever worked |
||
{ | ||
for (WorldObject* const target : targets) | ||
{ | ||
if (IsUnit(target)) | ||
{ | ||
if (e.action.stopMotion.stopMovement) | ||
if (e.action.removeMovement.movementType && e.action.removeMovement.movementType < MAX_MOTION_TYPE) | ||
target->ToUnit()->GetMotionMaster()->Remove(MovementGeneratorType(e.action.removeMovement.movementType)); | ||
if (e.action.removeMovement.forced) | ||
target->ToUnit()->StopMoving(); | ||
if (e.action.stopMotion.movementExpired) | ||
target->ToUnit()->GetMotionMaster()->MovementExpired(); | ||
} | ||
} | ||
break; | ||
|
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.
are these changes still required or can they be reverted ?
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.
up to you/all to decide, not required indeed
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.
maybe save them somewhere in case we have to upgrade boost but remove these changes from the PR, ty
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.
👍
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.
https://gist.github.com/ccrs/53d049c0dd8b392b3aa3f3c5de91a04b