Commit Graph

2287 Commits

Author SHA1 Message Date
kadeshar
873767db7c Merge pull request #1670 from icemansparks/fix-mount-state-logic
FIX: Allow following master's mount state regardless of group leader
2025-09-28 20:06:53 +02:00
kadeshar
03a56405f5 Merge pull request #1681 from IainD92/GuildSizeConfig
Config option to set max number of guild members in random bot guilds
2025-09-28 19:45:29 +02:00
Iain Donnelly
6f79193d7a Config option to set max number of guild members in random bot guilds 2025-09-28 14:04:09 +01:00
privatecore
b0f3de65f5 Fix warning: delete called on non-final that has virtual functions but non-virtual destructor (#1671) 2025-09-28 13:53:11 +02:00
privatecore
30bd58be67 Fix wrong PlayerbotAI parameter name passed to the constructor (#1672) 2025-09-28 13:42:03 +02:00
kadeshar
c20fb34470 - Added method to get translation bot text or default (#1678) 2025-09-28 13:39:59 +02:00
privatecore
34ce17fb3a Fix wrong cast spell action passed to the PullPowerSparkAction constructor 2025-09-28 09:13:36 +02:00
crow
e525c22d85 Fix SPEC_TAB names 2025-09-27 23:11:47 -05:00
crow
ec8e9db1ed Merge remote-tracking branch 'upstream/master' into karazhan 2025-09-27 23:03:18 -05:00
crow
59555b2248 Moved yells to database 2025-09-27 23:03:15 -05:00
bash
c8f32569a8 Merge branch 'master' into login-range 2025-09-28 00:27:05 +02:00
avirar
23d9931f65 Resolved crash in BGStatusAction (#1656)
* Prevent race condition and server crash

* Updated other direct packet handling lines to queue packets instead
2025-09-28 00:01:24 +02:00
bash
ec4ab34f94 Update NonCombatActions.cpp
Expensive checks last.
2025-09-27 23:31:16 +02:00
bash
62e2ca247a formatting 2025-09-27 23:28:48 +02:00
bash
d9b57fcfd4 Updated the locations of the checks, also added the checks as additional gatekeeper of the execute. 2025-09-27 23:26:29 +02:00
kadeshar
05d3a44481 Merge pull request #1651 from Tierisch/shaman_fix
Fix SetTotemAction - add `isUseful` and get array size instead of pointer size
2025-09-27 23:08:18 +02:00
bash
662e7f1b0b Update ShamanActions.cpp 2025-09-27 23:00:24 +02:00
bash
e042e3b12b Added shapeshift 2025-09-27 22:55:52 +02:00
Tecc
b9dbfe9646 fix: Allow following master's mount state regardless of group leader in CheckMountStateAction 2025-09-27 22:50:14 +02:00
bash
3228667121 Merge branch 'master' into patch-2 2025-09-27 22:40:39 +02:00
kadeshar
0547ce5cf7 - Code optimalizations 2025-09-27 20:57:10 +02:00
Crow
f5a6194808 Fixed some comments in the config (#1668) 2025-09-27 20:31:06 +02:00
Gonzalo
f23b2ea2f6 fix: Optimize DrinkAction to check mana in isUseful instead of Execute (#1666)
* fix: Optimize DrinkAction to check mana in isUseful instead of Execute

- Move HasManaValue check from Execute to isUseful for better performance
- Prevents non-mana classes from executing drink actions unnecessarily
- Improves AI efficiency by early filtering in isUseful method

Addresses reviewer feedback about HasManaValue usage optimization

* Update NonCombatActions.cpp

---------

Co-authored-by: bash <31279994+hermensbas@users.noreply.github.com>
2025-09-27 13:06:16 +02:00
crow
bdfd45c9a0 Merge remote-tracking branch 'upstream/master' into karazhan 2025-09-27 03:22:50 -05:00
crow
e8954f6cba resolve some comments + more
Formatting edits and improved Malchezaar
2025-09-27 03:22:28 -05:00
Gonzalo
dff4934dd1 Fix: Prevent priests in Spirit of Redemption form from using mana
This change modifies the `HasManaValue::Calculate()` function in `src/strategy/values/StatsValues.cpp`.

Previously, priests in Spirit of Redemption form (angel form when dead) could still attempt to use mana-restoring actions like drinking water, which is illogical since they cannot use mana in that form.

This fix adds a check for the Spirit of Redemption aura (spell ID 20711) to prevent mana usage:
- If the target has the Spirit of Redemption aura, the function returns false
- This prevents priests in angel form from attempting to drink water or use other mana-restoring actions
- Improves bot behavior realism by respecting the limitations of the Spirit of Redemption form

This change works in conjunction with the previous fix that prevents non-mana-using classes from attempting to restore mana, creating a more comprehensive solution for mana management.
2025-09-25 18:35:18 -03:00
Gonzalo
f26c4e99f6 Fix: Prevent bots from eating and drinking while mounted
This change modifies the `DrinkAction::Execute()` and `EatAction::Execute()` functions in `src/strategy/actions/NonCombatActions.cpp`.

Previously, playerbots could attempt to eat food or drink water while mounted, which is not possible in the game and creates unrealistic behavior.

This fix adds mount state checks to both actions:
1. `DrinkAction::Execute()` now checks `bot->IsMounted()` and returns false if mounted
2. `EatAction::Execute()` now checks `bot->IsMounted()` and returns false if mounted

This prevents bots from attempting to consume food or drinks while mounted, improving bot behavior realism and preventing unnecessary action attempts that would fail anyway.
2025-09-25 18:26:28 -03:00
Alex Dcnh
fc69dd5ddd FIX Random Bot Guilds not initialising random emblem, colors, etc #1636 (#1650)
* FIX Random Bot Guilds not initialising random emblem, colors, etc #1636

FIX Random Bot Guilds not initialising random emblem, colors, etc #1636

* Update RandomPlayerbotFactory.cpp

* Add sql patch an remove FixEmptyGuildEmblems() function
2025-09-25 21:42:34 +02:00
kadeshar
01f0b71a17 - Code refactoring 2025-09-25 20:31:42 +02:00
Spargel
f35e39e19c Removing unnecessary variable 2025-09-22 03:00:29 -05:00
Spargel
ca0dafd67b Fix SetTotemAction
Add isUseful and check array size instead of pointer size
2025-09-21 21:21:09 -05:00
crow
22d1cc9d57 BBW and other edits 2025-09-21 15:42:55 -05:00
Alex Dcnh
0b74820f80 Create 2025_09_18_00_ai_playerbot_french_texts.sql (#1641)
* Create 2025_09_18_00_ai_playerbot_french_texts.sql

* Update 2025_09_18_00_ai_playerbot_french_texts.sql

1:1 translation

* Update 2025_09_18_00_ai_playerbot_french_texts.sql
2025-09-21 20:32:01 +02:00
kadeshar
c9fb2e35cb - Possible loop fix for Call of the Elements (#1649) 2025-09-21 20:31:16 +02:00
kadeshar
7f9eb9f1a0 Merge pull request #1643 from noisiver/tabs-to-spaces
Replaced tabs with spaces
2025-09-20 11:16:15 +02:00
Revision
fcb956ec1b Removed unnecessary spaces 2025-09-19 22:43:50 +02:00
kadeshar
90518a59ae Merge pull request #1644 from Wishmaster117/Fix-for-2025_09_17_00_paladin_buff_reagent_texts
Fix for 2025_09_17_00_paladin_buff_reagent_texts
2025-09-19 22:32:21 +02:00
Wishmaster117
5c1e9576b7 Fix for 2025_09_17_00_paladin_buff_reagent_texts 2025-09-19 22:03:33 +02:00
Revision
ace813516d Replaced tabs with spaces 2025-09-19 21:00:09 +02:00
Alex Dcnh
e175eb1178 Paladin buff logic: Sanctuary+Kings synergy, role-aware targeting, safer Greater buffs (#1603)
* Paladin buff logic: Sanctuary+Kings synergy, role-aware targeting, safer Greater buffs

* Update PaladinActions.cpp

* Update PaladinActions.cpp

* All configs should be implement into PlayerbotAIConfig and sPlayerbotAIConfig used in code

* added: prayer of fortitude

* Magic number removed

* Update PaladinActions.cpp

* Update PaladinActions.cpp

* Update PaladinActions.cpp

* Update PaladinActions.cpp

* Update PaladinActions.cpp

* Add patch for solo paladin in group

* Correction review

* Update PaladinActions.cpp

* Add harcoded text to DB
2025-09-18 19:52:26 +02:00
privatecore
17f50f780d Update the Playerbots localized texts to include the Russian language (#1638) 2025-09-18 19:46:23 +02:00
kadeshar
4f69b7bb48 Merge pull request #1601 from brighton-chi/more-chat-filters
Add chat filters for aura, aggro, and spec and make all filters case insensitive
2025-09-17 22:46:45 +02:00
kadeshar
782bbc9d0e Merge pull request #1639 from brighton-chi/fix-debug-typo
Fix typo in RandomPlayerbotMgr.cpp
2025-09-17 18:53:18 +02:00
Crow
0362db94ad Exclude Log.h
Not needed
2025-09-17 11:09:59 -05:00
Crow
a41abb54cb Corrected inaccuracy in config comment 2025-09-16 14:51:23 -05:00
crow
8586796cec Fix typo in RandomPlayerbotMgr.cpp 2025-09-16 13:54:02 -05:00
Spargel
907f1aff61 Refactor GossipHelloAction with overload (#1628)
* Add overload for GossipHelloAction

* Refactor GossipHelloAction
2025-09-16 20:20:48 +02:00
ThePenguinMan96
b388657bf6 Shaman Overhaul (#1566)
* Shaman Overhaul

Hello everyone,

I bring to you the Shaman Overhaul. This was the most fun project I've had so far.
Here is a simplified list of the changes this brings:

1. Added Call of the Elements - making the shaman able to set 4 totems down simultaneously! This saves them multiple global cooldowns in combat.

2. Totems are now selected based on their combat strategies. These strategies set totems on the Call of the Elements bar, as well as change what totem is summoned if a single totem is missing. NOTE: Only one strategy of each elemental type (earth, fire, water, air) can be active at a time.
Earth - strength of earth, stoneskin, tremor, earthbind
Fire - searing, magma, flametongue, wrath, frost resistance
Water - healing stream, mana spring, cleansing, fire resistance
Air - wrath of air, windfury, nature resistance, grounding

There are a few exceptions to totems without strategies: Stoneclaw Totem, Fire Elemental Totem, and Mana Tide Totem. These each have triggers that fire under certain conditions:
Stoneclaw Totem: Resto/Ele shaman has low health and isn't in a group
Fire Elemental Totem: Boost trigger for Ele/Enhance
Mana Tide Totem: Resto Shaman medium mana

3. Added Totemic Recall - a spell that picks up the totems outside of combat to regain 25% of the mana spent. Useful to avoid patrols.

4. Changed the config slightly - Enhance uses Fire Nova Glyph for crazy AoE damage, and enhance pve spec uses both clearcasting and improved shock talent now.

5. Enhancement Shamans will use their Spirit Wolves' Spirit Walk ability - this helps them close the gap and improves their DPS on fights that require movement.

6. Boost Strategy - Moved Bloodlust/Heroism/Fire Elemental Totem from the generic strategy triggers to a new Boost strategy. Now you can control their uses with Boost! (co +boost or co -boost. Enabled by default.)

7. AoE Strategy - Unified both of the AoE strategies for Ele/Enhance to "aoe", rather than "caster aoe" and "melee aoe". NOTE: Healers will still aoe under "healer dps". (co +aoe or co -aoe. Enabled by default.)

8. Moved the weapon imbue strategies from combat to non-combat. I noticed that they were only casting their weapon imbues during combat - this fixes that.

9. Added logic for only using Lava Burst on targets with Flame Shock active, ensuring that it's as close to 100% crit chance as possible. I did notice on a sample size of 112 lava bursts in testing that it still fails to crit around 3 percent of the time - that is because the lava burst starts to cast while flame shock is on the target, but by the time the projectile lands, flame shock has worn off.

10. Added Earth Shock as an execute ability for elemental shamans only. This helps their DPS tremendously at low levels, as well as in PVP. There is logic in place to prevent the use of Earth Shock as elemental entirely on bosses (it's garbage on bosses), as it will only be used as an execute if the target has less than 1500 hp and it's at 25% hp or less.

10. Added chain lightning as an AoE option for enhancement shamans while maelstrom weapon is at 4 or 5 stacks. This continues to push the AoE dps on enhance higher!

Here is a file-by-file list of the changes:

conf\playerbots.conf.dist - Enhancement shamans use Fire Nova Glyph as early as level 15, they also use the clearcasting talent in elemental and improved shocks in enhance. It really helps their mana usage. Also swapped the position of two glyphs in resto.

src\AiFactory.cpp - Set the default spec that new altbot shamans start as to Elemental. Put Arcane, Fire, and Frost comments on the mage specs. Set the strategies of the shaman specs to "ele, resto, and enh", as well as added the default totem strategies for each spec. Also added in the aoe strategy. Removed bmana/bdps, as those were set for lightning/mana sheld - those have been moved to both the non-combat strategy, as well as to each spec combat strategy. Enhancement will use Lightning Shield, and Elemental and Resto will use Water Shield both in and out of combat.

src\strategy\shaman\CasterShamanStrategy.cpp/CasterShamanStrategy.h - Renamed to Elemental.

src\strategy\shaman\ElementalShamanStrategy.cpp/ElementalShamanStrategy.h - Renamed from CasterShamanStrategy, most logic is the same. Moved the totem of wrath passthrough to the GenericShamanStrategy. Moved the Weapon Imbue to the NonCombatShamanStrategy. Moved the AoE spells to GenericShamanStrategy, under the AoE strategy there. Added the use of Stoneclaw totem, as well as Earth Shock Execute. Changed the use of Thunderstorm from medium mana to high mana, so it can be used more often in longer fights. Moved the individual casting of totems to the totem strategies. Added the use of Call of the Elements.

src\strategy\shaman\EnhancementShamanStrategy.cpp/EnhancementShamanStrategy.h - Renamed from MeleeShamanStrategy. Moved the totem passthroughs to GenericShamanStrategy. Refined the priorities in the default actions and triggers to closer match guides online. Moved the weapon imbues to the non-combat strategy. Moved the individual casting of totems to the totem strategies. Moved the AoE spells to the AoE strategy in GenericShamanStrategy. Added the use of Call of the Elements (while in melee range) and Spirit Walk.

src\strategy\shaman\GenericShamanStrategy.cpp/GenericShamanStrategy.h - Moved weapon imbue passthroughs to non-combat. Set up all totem passthroughs here so lower level shamans could function well. Set up a boost strategy for heroism/bloodlust/fire elemental totem. Set up an AoE strategy for Elemental/Enhancement. Cleaned up tablature of the code. Moved the Healer DPS strategy to the RestoShamanStrategy. Added a medium mana trigger so they can use more mana potions in longer fights.

src\strategy\shaman\HealShamanStrategy.cpp/HealShamanStrategy.h - Renamed to RestoShamanStrategy.

src\strategy\shaman\MeleeShamanStrategy.cpp/MeleeShamanStrategy.h - Renamed to EnhancementShamanStrategy.

src\strategy\shaman\RestoShamanStrategy.cpp/RestoShamanStrategy.h - Renamed from  HealShamanStrategy. Moved weapon imbue to non-combat strategy. Moved the individual casting of totems to the totem strategies (except mana tide totem). Added in Healer DPS from genericshamanstrategy. Added in use of Stoneclaw totem and Call of the Elements.

src\strategy\shaman\ShamanActions.cpp/ShamanActions.h - Organized the actions by type. Removed the TTL check in the totem action and Flame Shock. Added logic in the Stoneclaw totem to only be used when not in a group. Added logic on LavaBurst Action to only be used when the target has flame shock debuff from the caster. Added custom logic for casting Spirit Walk (no code exists in AC/Playerbots to make a guardian cast a spell). Added in the "SetXTotemAction"s, which set a totem to the highest rank of the spell in the totem bar.

src\strategy\shaman\ShamanAiObjectContext.cpp/ShamanAiObjectContext.h - Cleaned up strategies, triggers, and actions as a whole. Renamed melee, heal, and caster to ele, enh, and resto. Changed the "totems" strategy to individualized elemental totem strategies.

src\strategy\shaman\ShamanNonCombatStrategy.cpp/ShamanNonCombatStrategy.cpp - Moved weapon imbues here. Cleaned up tablature. Added the Totemic Recall spell.

src\strategy\shaman\ShamanTriggers.cpp/ShamanTriggers.h - Removed the commented out section. Added triggers + logic for:
EarthShockExecute
Call of the Elements
Totemic Recall
"SetXTotemTrigger"
Spirit Walk
Elemental Mastery
No Earth/Fire/Water/Air Totem

src\strategy\shaman\TotemsShamanStrategy.h - Master hub for all defined constants and arrays used in other files, as well as names all of the totem strategy types.

src\strategy\shaman\TotemsShamanStrategy.cpp - Each strategy has a "set x totem" to change the bar totem, as well as a "no x totem" trigger with a corresponding "cast x totem". NOTE: some totems aren't learned by level 30 when a shaman learns call of the elements, so I had to set an alternative for those (Totem of Wrath, Wrath of Air, Cleansing Totem, and Windfury). Testing showed me that this is necessary - without this, the trigger would just fire over and over, and the shaman would recast the same totem over and over.

Scope of Testing:

8/5/25 (2 hours): Began work on the Shaman class. Cleaned up actions and triggers.
8/6/25 (3.5 hours): Tried what felt like everything to get the totem bar changed. Seems impossible to change a client-side thing with cpp.

8/9/25(3 hours): Initial totem strategies created. Through the help of Revision, I was able make a functioning action that would change the totem bar's spell. The spells are stored in the database! I was able to get a strategy of each type working, and Call of the Elements was casting the correct totems.

8/10/25 (3.5 hours): Testing on Noth the Plaguebringer. The elemental shaman's dps was low - I noticed that the shaman was casting lava burst regardless of if the target had flame shock. I fixed this. I also noticed that the enhancement shaman was casting call of the elements at max range, resulting in the magma totem never doing damage. Changed so enhance would only cast  Call of the Elements in melee range. Also, had to add "cast x totem" spells to each strategy, so magma totem would recast once expired (as well as other totems).

8/11/25 - (2.5 hours)Did a full run of Naxxramas. Enhancement did crazy dps for the gear it had. Elemental was consistently placing between 14-18th place of 18 dps. I noticed that totemic recall was messing up with the KT encounter, and had to look in the AC repo for logic to check if a boss encounter is active. Fixed it, and shamans weren't spamming totemic recall between packs. I wonder what I can do to fix elemental?

8/12/25 (1.5 hours) - Added a check in lava burst's isuseful to ensure flame shock was on the target. DPS went up a little bit. Also, made chain lightning the highest spell priority - DPS went up quite a bit after that. It is quite costly, but it is worth it - even on one target, but especially 3. Added spirit walk for enhancement.

8/13/25 - (5 hours) Tested on level 1-10 level, 15, 25, 35, 45, and 55 instances: I had a ton of bugs at level 35. Essentially, the shaman was standing there casting the totems it didn't know (wrath, cleansing, wrath of air). I had to add some checks and passthroughs for it to run smoothly again. Elemental was still doing just okay dps at lower levels, while enhancement was CRUSHING it. The fact that enhancement has the fire glyph from 15 on now is crazy.

8/14/2025 (2 hours) - Tested in 65/75 instances, as well as little bit of ulduar. I am pretty happy with the state of shamans now, they are consistently performing highly (enhance top 5, elemental top 8 in ulduar). Tweaked elemental mastery to cause lava burst to be instant cast, not chain lightning. This improved the DPS of elemental shamans right out of the gate.

Total testing - 23 hours

If y'all have any questions or comments, please let me know either here or on discord!

* Fixed the Bracket so the code will compile

Fixed the Bracket so the code will compile

* - Code refactoring

* - Non windows compilation error fixes

---------

Co-authored-by: kadeshar <kadeshar@gmail.com>
2025-09-16 20:09:00 +02:00
St0ny
2c383339d8 Update playerbots.conf.dist (#1635)
* Update playerbots.conf.dist

Added Half-Burried Bottle to the list of dissallowed GO's

* Update PlayerbotAIConfig.cpp

Added Half-Burried Bottle to the list of disallowed GO's in the standard values of the source to complete this PR
2025-09-15 20:26:36 +02:00
kadeshar
0eb7cdba64 - Fixed not applying xprate when bot is in group with real player (#1629) 2025-09-14 10:52:15 +02:00