Commit Graph

17 Commits

Author SHA1 Message Date
ThePenguinMan96
aa6f8153a1 Tame Chat Action / Pet Chat Action (stances/commands)
Hello everyone,

I am on a quest to make bot's pets completely functional, focuses on solving issues #1351 , #1230 , and #1137 . This PR achieves the following:

1. Changes the current "pet" chat command to "tame", which is more intuitive that only hunters can use it. The modes are "tame name (name)", "tame id (id)", "tame family (family)", "tame rename (new name)", and "tame abandon". Tame abandon is new - it simply abandons the current pet. Also, now, if you type in "tame family" by itself, it will list the available families. See pictures below for examples.
2. Added new "pet" chat command, with the following modes: "pet passive", "pet aggressive", "pet defensive", "pet stance" (shows current pet stance), "pet attack", "pet follow", and "pet stay". Previously, the pet's stance was not changeable, and there were some less than desired effects from summonable pets - see the issues above.
3. New config option: AiPlayerbot.DefaultPetStance, which changes the stance that all bot's pets are summoned as. This makes sure when feral spirits or treants are summoned by shamans and druids, they are immediately set to this configured stance. Set as 1 as default, which is defensive. (0 = Passive, 1 = Defensive, 2 = Aggressive)
4. New config option: AiPlayerbot.PetChatCommandDebug, which enables debug messages for the "pet" chat command. By default it is set to 0, which is disabled, but if you would like to see when pet's stances are changed, or when you tell the pet to attack/follow/stay, and when pet spells are auto-toggled, this is an option. I made this for myself mainly to test the command - if anyone notices any wierd pet behavior, this will be an option to help them report it as well.
5. Modified FollowActions to not constantly execute the petfollow action, overriding any stay or attack commands issued.
6. Modified GenericActions to have TogglePetSpellAutoCastAction optionally log when spells are toggled based on AiPlayerbot.PetChatCommandDebug.
7. Modified PetAttackAction to not attack if the pet is set to passive, and not override the pet's stance to passive every time it was executed.
8. Modified CombatStrategy.cpp to not constantly issue the petattack command, respecting the "pet stay" and "pet follow" commands. Pets will still automatically attack the enemy if set to aggressive or defensive.
9. Warlocks, Priests, Hunters, Shamans, Mages, Druids, and DKs (all classes that have summons): Added a "new pet" trigger that executes the "set pet stance" action. The "new pet" trigger happens only once, upon summoning a pet. It sets the pet's stance from AiPlayerbot.DefaultPetStance's value.
2025-08-01 01:18:16 -07:00
Type1Error
e48c3351d3 fix (#1179): resolve bot stuttering in BGs after player death (#1269)
Fixes #1179

This update fixes several issues related to bot behavior in battlegrounds when the player dies and releases spirit:

- Removed conflicting strategies (+stay / +follow): Bots were being told to follow and stay simultaneously each tick, causing oscillating movement ("stuttering"). The +stay strategy is now skipped in BGs to allow bots to continue objectives normally.

- Disabled follow while in BG: When the player died, bots attempted to return to the player repeatedly, abandoning objective-based movement. PlayerbotAI now sets -follow while in BGs to keep bots engaged with the objectives.

- Prevented dead bots from following ghosts: Previously, dead bots would follow ghost players away from the graveyard and potentially miss Rez. Bots now wait at the spirit healer when dead in BGs.

- Removed redundant strategy changes and messages in ReleaseSpiritAction as they no longer apply in battleground contexts.
2025-05-06 21:09:32 +02:00
Yunfan Li
79a5fdd7c1 Make backwards movement for flee 2024-12-29 23:21:03 +08:00
Fuzz
d29569e9ea added 'move from group' action/strat/shortcut-action 2024-08-26 22:30:36 +10:00
Yunfan Li
7b0bb20078 Movement priority 2024-08-14 18:37:21 +08:00
Yunfan Li
bb67c45e64 Code style 2024-08-05 12:12:00 +08:00
Yunfan Li
f706fa2ba6 Better waypoints for combat reach 2024-08-05 12:08:14 +08:00
Yunfan Li
53611c9040 Run clang-format 2024-08-04 10:23:36 +08:00
Yunfan Li
a1903ad888 Item use check 2024-02-14 01:01:28 +08:00
Yunfan Li
e896168769 movement for fly & swimming 2023-09-17 23:52:06 +08:00
Yunfan Li
1aaa1f8507 better movement 2023-09-05 00:12:48 +08:00
Yunfan Li
0969db4c89 feat: rndbot teleport, grind, stuck problem etc. 2023-08-01 23:21:06 +08:00
Yunfan Li
9c1bb63d10 razuvious strategy 2023-07-18 21:00:49 +08:00
Yunfan Li
d85b562629 pet related 2023-05-30 01:06:23 +08:00
Yunfan Li
2ad567a1a8 Flee action, factory setting 2023-05-29 11:45:18 +08:00
Yunfan Li
c16e587854 fix: bot stuck after drink or food && initialization customized 2023-05-23 23:39:20 +08:00
UltraNix
b952636f0d Big update. 2022-03-12 22:27:09 +01:00