-
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
Game/AI: Implement option to move a creature back to Homeposition on Evade. #24492
Conversation
…Evade. * If ToHomePosition (action param 1) is 1 > Move to last stored position * If ToHomePosition (action param 1) is 0 > Move to homeposition * Ref: TrinityCore#24226
Can you add an other param walk/run ? |
Why not adding it with the existing Action setwalk/run? Should it run by default? |
Yes it must run by default, but as we will update existing SAI it's easier to just update the current line than adding an extra one for walk. |
okay cool, i will see if it is possible |
@Killyana added, if param walkmode 0 run by default |
I tested this issue #23917 UPDATE `smart_scripts` SET action_param1=0, action_param2=1 WHERE `entryorguid` IN( -102327,-102329,-102326,-102330,-102328,-102341,-102333) AND action_type=24; |
…osition and store point from GetRespawnPosition.
@Killyana okay i think the homeposition was not stored here - and name was wrong. what we want: if paramter is 0 > move creature to the spawnposition. what i changed: if action_param1 (ToRespawnPosition) = 0, store new homeposition from respawnposition and move to it. |
It works fine now, thanks. |
Npcs always run on evade whatever the value of action_param2 |
hm i cannot see the reason why they always run |
TrinityCore/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp Line 79 in dc78566
|
should the walk/run bit be ignored and merge the PR the way it is now ? |
Could be a useful incentive to fix the mentioned walk/run issue if the current functionality becomes available to all. From what we have seen too often, testing does not take place until the code is published. edit: I meant "committed/merged", remembering that "available to all" and "published" usually means "present on GitHub in any form" to most experienced coders. |
hm yeah then let's merge that "remove to home" fix first. i will remove the option with walk/run again. or i must copy the function of GetMotionMaster()->MoveTargetedHome(); and define the what would you suggest? |
In thins case make the npc return to home pos if there's no escort, and evades to the last point if it evades after a combat, no need to add an extra param |
what's the status of this PR ? |
2nd try: what's the status of this PR ? |
Hello, @Rushor . Thanks for the code to the "Force of Neltharaku" PR which is merged now. |
Setting the status of this PR back to Draft as there are still some things left to do. Please mark it as ready for review once they have been handled. |
Thanks for the PR :) |
… Evade. (#24492) * Game/AI: Implement option to move a creature back to Homeposition on Evade. * If ToHomePosition (action param 1) is 1 > Move to last stored position * If ToHomePosition (action param 1) is 0 > Move to homeposition * Ref: #24226 * Add parameter for walkmode * Game/AI: SAI SMART_ACTION_EVADE - Rename ToHomePosition to ToRespawnPosition and store point from GetRespawnPosition. * Game/AI: SAI SMART_ACTION_EVADE - Rename ToHomePosition to ToRespawnPosition * Remove broken bits, simplify the code * Update comments * Code cleanup Co-authored-by: jackpoz <giacomopoz@gmail.com> (cherry picked from commit 02fca03)
…Evade.
Changes proposed:
Target branch(es): 3.3.5/master
Issues addressed: Closes # (insert issue tracker number)
#24226
Tests performed: (Does it build, tested in-game, etc.)
yes
Known issues and TODO list: (add/remove lines as needed)