Commit Graph

2198 Commits

Author SHA1 Message Date
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
bash
e042e3b12b Added shapeshift 2025-09-27 22:55:52 +02:00
bash
3228667121 Merge branch 'master' into patch-2 2025-09-27 22:40:39 +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
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
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
kadeshar
21de08baab Fixed cross faction guilds not allowed by config (#1631)
* - Fixed cross faction guilds not allowed by config

* - Fixed doubled method bug

* - Restored deleted method
2025-09-14 10:51:18 +02:00
kadeshar
20025b7dfa - Added quests ending death knight questline to by default enable LFG for them (#1633) 2025-09-14 10:48:47 +02:00
kadeshar
92f1dbd3f1 Merge pull request #1626 from liyunfan1223/opcode-crash
Sell item opcode crash fix
2025-09-11 15:04:25 +02:00
Yunfan Li
f5f4f32799 Sell item packet opcode 2025-09-11 20:43:57 +08:00
Yunfan Li
11b96b51b7 Core update item packets (#1624) 2025-09-11 13:43:13 +08:00
kadeshar
a41c1912ac Merge pull request #1611 from brighton-chi/fix-expansion-limits-for-enchants
Fix thresholds for LimitEnchantExpansion
2025-09-06 17:33:23 +02:00
Vanna White
21d8f32d24 Fix bots in Oculus not using Drake Mount (#1613)
* Fix bots sometimes not using drake mount

* change bot check

---------

Co-authored-by: wetbrownsauce <you@example.com>
2025-09-06 16:14:52 +02:00
zeb139
bf56154eee Add weighted bot to banker teleport logic and config (#1615)
* add weighted bot to banker teleport logic and config

* moved banker location lookup tables to top of file
2025-09-06 16:10:56 +02:00
kadeshar
e46269920a - Fixed update sql script name (#1619) 2025-09-05 21:38:26 +02:00
crow
3717c6133e clean-ups and fixes
simplified code
fixed bug where neutral creatures were not captured by the aggroby filter
trim white spaces so space between filter and message is permitted but not required
2025-09-05 12:27:58 -05:00
crow
1881ef1fe0 fix thresholds for LimitEnchantExpansion
And disallow Naxx40 shoulder enchants
2025-09-05 10:21:20 -05:00
crow
876455baca Merge remote-tracking branch 'upstream/master' into more-chat-filters 2025-09-02 17:10:42 -05:00
kadeshar
3c442a6b71 - Excluded additional Legendary Arcane Amalgamation from obtainable for bot enchantments (#1600) 2025-09-02 19:24:55 +02:00
kadeshar
750d557e6a Merge pull request #1604 from kadeshar/koralon-strategy
Added automatic resistance switch on Emalon and Koralon
2025-09-02 17:02:59 +02:00
kadeshar
8057a5d7ac Merge pull request #1593 from kadeshar/rtsc-despawn-bugfix
Fixed bug with RTSC despawning objects
2025-09-02 17:01:46 +02:00
Spargel
c218dbe653 Fix uses of restrictHealerDPS and randomBotCombatStrategies. (#1570) 2025-09-01 19:05:07 +02:00
kadeshar
6588ca5878 - Added automatic resistance switch on Emalon and Koralon 2025-08-30 15:25:47 +02:00
crow
f5aa484e8d Merge remote-tracking branch 'upstream/master' into more-chat-filters 2025-08-28 13:54:22 -05:00
crow
fbf8ed9256 Add chat filters for aura, aggro, and spec and make all filters case insensitive 2025-08-28 13:53:49 -05:00
kadeshar
df6b1490b1 - Fixed world sql scripts naming 2025-08-28 18:41:08 +02:00
kadeshar
179c34e3a9 Food cheat fixes (#1594)
* - Fixed bug with InitFood and food cheat
- Fixed food cheat description in config

* - Fixed bug with initself command
2025-08-28 18:25:13 +02:00
kadeshar
45d046f427 - Fixed bug where bot looting gameobject which is on respawn time (#1596) 2025-08-28 18:24:40 +02:00
kadeshar
31f2c6a20d - Fixed sql structure 2025-08-27 19:09:51 +02:00