2341 Commits

Author SHA1 Message Date
ThePenguinMan96
7d7edbd961 Warlock Soul Shard/Soulstone ID conversion
Hello everyone,

I'm still working on fixing issue #1439 , and I have a theory - it could be because the clients that are having the issue are not english, and the code currently checks for strings "soul shard" and "soulstone". This PR converts the check over to the item IDs, so it should work regardless of what client is being used. I tested it myself with the english client and there is functionally no difference than before - but I hope it solves the issue #1439 for the non-english clients and community.
2025-07-23 11:26:55 -07:00
Yunfan Li
4a00c954ed RPG update travel flight status (#1445) 2025-07-23 23:37:41 +08:00
kadeshar
e150b8281b - Replaced custom protection of soul shard by trigger check interval (#1453) 2025-07-23 00:15:22 +02:00
crow
0b03b277c2 Make world buff strategy conditions configurable 2025-07-20 21:37:54 -05:00
ThePenguinMan96
d6b7693b8b Warlock Soulstone/Soulshard hotfix (#1452)
Hello everybody,

This PR is to address issues #1439 and #1451.

I added a 1 second cooldown to the createsoulshard action, as the warlock wouldn't ever use more than 1 soul shard per second.

I also added a cooldown check to the soulstone trigger, so it doesn't simply try to use the ss healer, ss self, ss tank, or ss master if the soulstone is present in the inventory.  I checked the logs, and was able to recreate the issue of #1451 - the bot was shifting targets over and over again, and that was because previously the trigger was just checking to see if a soulstone was present at all. Now it won't fire if it's on cooldown.
2025-07-19 18:25:56 +02:00
ThePenguinMan96
551c698e37 Hunter Pet Chat Command (#1448)
Hello everyone,

I was working with hunter bots and I feel like I didn't have enough control over their pets. So I started working on a chat command for the hunter pets, and it's been a blast. Below is a description of what the commands do:

pet name <name>
Summons a tameable pet by its creature name (case-insensitive).
The bot checks if the pet is exotic and requires the Beast Mastery talent if so.
If successful, the bot announces the pet's new name and creature ID.
If not found or not tameable, an error message is given.

pet id <id>
Summons a tameable pet by its database creature ID.
The same exotic pet checks apply.
Success is announced with the pet's name and ID.
Errors are given for invalid IDs or untameable pets.

pet family <family>
Randomly selects and summons a tameable pet from the specified family (e.g., "cat", "wolf").
Only families with tameable pets are considered.
Exotic pet checks and talent requirements apply.
Success is announced with the pet's name and ID.
Errors are given if no suitable pet is found.

pet rename <new name>
Renames the hunter's current summoned pet to a new name.
The name must be 1-12 alphabetic characters (A-Z, a-z) and is automatically formatted (first letter capitalized, rest lowercased).
Forbidden or reserved names are disallowed.
After renaming, the bot sets the new name, saves the pet, and updates the client.
The bot dismisses and attempts to recall the pet using "Call Pet" (if the hunter knows it) to update the UI.
If the new name isn't visible immediately, the bot instructs the player to dismiss and recall the pet manually.
Confirmation and guidance messages are provided.

Additional Details:
All commands display errors if requirements are not met (wrong name/id/family, forbidden name, lack of Beast Mastery, or hunter below level 10).
After changing or summoning a pet (except renaming), the bot initializes the pet and its talents, then announces the result.

TLDR:
pet name <name>	Summon a tameable pet by name
pet id <id>	Summon a tameable pet by database creature ID
pet family <family>	Randomly summon a tameable pet of the given family
pet rename <new name>	Rename the current pet and refresh its name in the client UI

Description of files changed:

src\strategy\actions\ChatActionContext.h: Added the "pet" action for the whisper command.

src\strategy\actions\PetAction.cpp: New chat actions for all things related to hunter pets.

src\strategy\actions\PetAction.h: New header for the PetAction.cpp.

src\strategy\generic\ChatCommandHandlerStrategy.cpp: Linked the trigger and action in the chatcommandhandlerstrategy, for the bot to take action when whispered "pet" (trigger).

src\strategy\triggers\ChatTriggerContext.h: Added the "pet" trigger.
2025-07-17 13:51:06 +02:00
ThePenguinMan96
45694ad6e6 Warlock Soul Shard Hotfix (#1442)
Hello everyone,

This PR is to address an issue that was posted recently - a player has shown that soul shards are being created in excess, spamming the player's chat log. I am adding an isuseful() check to the createsoulshard action, so it will never be executed if they have more than 5 soul shards.

Also, out of an abundance of caution, I am lowering the cap for CastDrainSoulAction::isUseful() to 20 from 32. That way, if for some reason the warlock has 20+ shards, it won't attempt to collect any more / use drain soul.
2025-07-15 15:54:04 +02:00
kadeshar
761ef634da - Fixed loot trigger to respect stay strategy (#1437) 2025-07-14 19:27:16 +02:00
ThePenguinMan96
96cc0daea6 Hunter/Warlock AoE Fix (#1440)
Hello everyone,

This fixes these two classes so they respond to the command "co -aoe" and "co +aoe". This also fixes the survival hunter so that trap weave is not a default strategy - they will not walk into melee anymore.
2025-07-14 10:15:11 +02:00
kadeshar
5202ac8db3 Merge pull request #1435 from ThePenguinMan96/Hunter-Overhaul
Hunter Overhaul
2025-07-13 21:56:51 +02:00
kadeshar
fa79fff4f4 Merge pull request #1436 from ThePenguinMan96/Firestone-Error-Fix/Excess-Soul-Shard-Fix
Firestone Error Fix/Excess Soul Shard Fix
2025-07-13 21:56:36 +02:00
ThePenguinMan96
6d07d6febe Firestone Error Fix/Excess Soul Shard Fix
Hello everyone,

This PR addresses two errors that players have been getting with the new warlock changes:

Firestone - Fel Firestone, which is rank 6 of create firestone, learned at level 74, is creating an error in the worldserver that is quite annoying. That is because the database has an incorrect enchant effect of a chance on hit for that rank. This PR changes the CreateFirestoneAction to skip that spell rank entirely, thus never having that error. Note: You might need to wait a little while after the new change for the errors to go away - that is because there still be pre-existing fel firestones  on the warlocks, as well as enchanted on their weapons. Once those disappear, the error will not be there anymore.

Excess soul shards - There is an error that currently exists where if a Warlock uses Drain Soul while they have 32 soul shards, it will spam in the chat log "I can't carry anymore of those". This PR will automatically delete soul shards if they have 6 or more. This PR also will reduce the number of soul shards the warlock receives from maintenance to 5. I figured 5 is a good maximum so their inventory doesn't get clogged with 32 shards. Between "DestroySoulShard" and "CreateSoulShard" actions, they will always have between 1-5 soul shards.
2025-07-12 11:45:33 -07:00
ThePenguinMan96
8ca4ab1344 Hunter Overhaul
Hello everybody,

I saw that the hunter class had one strategy for all 3 specs, and decided to create specialized strategies for each one. Here is a list of the changes:

conf\playerbots.conf.dist: Redid the talent trees and glyphs slightly, for more consistent dps

src\AiFactory.cpp: Changed the default strategies assigned for each spec.

src\strategy\hunter\BeastMasteryHunterStrategy.cpp and src\strategy\hunter\BeastMasteryHunterStrategy.h: Strategy for BM hunters. Includes all of the original logic from DpsHunterStrategy, with the addition of kill command, bestial wrath, and intimidation.

src\strategy\hunter\DpsHunterStrategy.cpp and src\strategy\hunter\DpsHunterStrategy.h: Old Dps strategy used for all 3 specs - removed.

src\strategy\hunter\GenericHunterStrategy.cpp and src\strategy\hunter\GenericHunterStrategy.h: Tidied up code, added Dragonhawk passthrough to hawk, moved rapid fire to inittriggers for generichunterstrategy and increased its priority (it is still a boost trigger, so it will function the same).

src\strategy\hunter\HunterActions.cpp:
Added isuseful check for aspect of the hawk, to ensure it is never cast if the bot knows aspect of the dragonhawk.
Added isuseful check for arcane shot to never use it after explosive shot is learned (so the hunter can use it as it levels survival, but drops it after that). Also added a check for arcane shot, so it won't use it above 435 armor pen rating (steady shot is superior after this arp).
Added isuseful check for immolation trap so it won't use it after explosive shot is learned.

src\strategy\hunter\HunterActions.h:
General cleanup/alignment of actions based on type.
Added TTL checks to all DoTs and debuffs - hunters weren't using hunter's mark, serpent sting, black arrow, explosive shot on enemies that it thought would die too soon.
Black Arrow - added a strategy check here as well so the bot won't use it at all if trap weave is enabled. There was already a check in the trigger, but it was still getting cast, so I added this check.
Explosive Shot Rank 4, 3, 2, 1 actions- Added these so the hunter can downrank explosive shot dynamically based on the level when lock and load procs. So if the hunter is level 70, and a lock and load proc happens, it will fire rank 2 - rank 1 - rank 2, similar to how the level 80 version will fire 4-3-4.

src\strategy\hunter\HunterAiObjectContext.cpp:
Added strategy support for bm, mm, and surv (and their aoes)
Added trigger support for kill command, explosive shot, lock and load, silencing shot (as an spellcasting interrupt), and intimidation
Added action support for the 4 ranks of explosive shot and intimidation.

src\strategy\hunter\HunterTriggers.cpp: Kill command was completely non-functional because there was no buff trigger associated with it. Adding this will correct that, and the hunter will use kill command.

src\strategy\hunter\HunterTriggers.h: Added Kill command, silencing shot, intimidation, lock and load, and explosive shot triggers.

src\strategy\hunter\MarksmanshipHunterStrategy.cpp and src\strategy\hunter\MarksmanshipHunterStrategy.h: Strategy for MM hunters. Includes all of the original logic from DpsHunterStrategy, with the addition of kill command, silencing shot, chimera shot, and aimed shot.

src\strategy\hunter\SurvivalHunterStrategy.cpp and src\strategy\hunter\SurvivalHunterStrategy.h: Strategy for Survival hunters. Includes all of the original logic from DpsHunterStrategy, with the addition of kill command, explosive shot, black arrow, aimed shot, lock and load triggers + downranking explosive shot.
2025-07-11 17:10:03 -07:00
kadeshar
bc5d602326 Merge pull request #1430 from ThePenguinMan96/Warlock-Curse/Spellstone-and-Firestone-Strategies,-Soul-Shard-Replenish
Warlock Curse strategies, Spellstone and Firestone strategies, Soul Shard Replenish
2025-07-08 18:57:50 +02:00
Boxhead78
3611cfbdd3 Minor Battleground tactics improvements (#1431)
* Fix bots ignoring contested Nodes in Arathi Basin

* Use VMAP_INVALID_HEIGHT_VALUE instead of -200000.0f for valid height check
2025-07-08 18:31:08 +02:00
ThePenguinMan96
0400c1c8b3 Modified code to allow the build to complete on mac
Modified code to allow the build to complete on mac
2025-07-07 19:08:01 -07:00
ThePenguinMan96
393a65a15b Warlock Curse/Spellstone and Firestone Strategies, Soul Shard Replenish
This PR aims to achieve 4 main things:

1. Manual Curse Strategies - Each curse has it's own toggleable combat strategy, with curse of agony being the default for affliction and demonology, and curse of the elements being default for destro. The other curses that are available are curse of exhaustion (if specced for it), curse of doom, curse of weakness, and curse of tongues (6 total). You can add these by typing "co +curse of weakness", or similar. Note: Curses are part of the WarlockCurseStrategyFactoryInternal(), so there can only be one active.

2. Firestone/Spellstone Non-Combat Strategies - Players requested to me that they can decide if they want to use a spellstone or firestone for their weapon enchant, so I added them as non-combat strategies. Spellstone is the default for affliction and demonology, firestone is the default for destro. To add these, type "nc +firestone" or similar.

3. Soul Shard Replenishment - I noticed after hours of running a server (15+ hours) that altbots and rndbots would only cast imp and not use their soul shards. This is because they were actually running out of soul shards, without the ability to maintain themselves accordingly. I added a trigger (no soul shard) and action (create soul shard) that triggers if they are out of soul shards, creating only 1 soul shard (to not clog up the inventory). This way, you should never have a warlock using the wrong pet, or failing to cast shadowburn, failing to create soulstone/spellstone/firestone/healthstone, or failing to cast soul shatter.

4. Tidying up the code -

I removed the built-in curse code from the DPS strategies, and migrated it to the manual curse strategies.

I clumped the curse triggers and actions together in the associated files.

I added logic for Curse of Weakness to check for conflicting debuffs.

I moved the summoning strategies and curse strategies to their own strategy factories - WarlockPetStrategyFactoryInternal, and WarlockCurseStrategyFactoryInternal. This way they can only have one curse and one pet strategy active at once. I also renamed the "NonCombatBuffStrategyFactoryInternal" to "WarlockSoulstoneStrategyFactoryInternal", which was more accurate.

I changed a single talent point in the Affliction Warlock PVE spec, taking one from destructive reach and adding it into nightfall for those sweet, sweet free shadowbolts.

I added "ss self" as the default non-combat soulstone strategy, as before, they didn't have one assigned. The player can still of course remove that NC strategy and apply another, such as "ss master", "ss tank", or "ss healer".
2025-07-07 18:51:33 -07:00
kadeshar
8b9bcce3bc Merge pull request #1418 from Boxhead78/bg-tactics-rewrite
Bots Bg Tactics rewrite (WSG, AB, AV, EYE)
2025-07-07 21:45:35 +02:00
Yunfan Li
8ed053ca01 fix warnings (#1428) 2025-07-07 19:43:24 +02:00
Yunfan Li
51ed9c4649 fix trinket (#1429) 2025-07-07 19:41:47 +02:00
kadeshar
86390f90fd - Fixed bug with not respecting InstantFlightPaths config (#1410) 2025-07-06 19:38:15 +08:00
kadeshar
3f39a57fe2 Merge pull request #1426 from NoxMax/delete-all-the-orphans
Fix: DeleteRandomBotAccounts sometimes leaves orphans. Also fix accumulating orphan pet data in DB
2025-07-06 09:51:31 +02:00
kadeshar
102aa24bb8 Merge pull request #1425 from liyunfan1223/rpg_gear_incremental
Added config to make rndbots only get gear from looting/quests
2025-07-06 09:50:48 +02:00
kadeshar
50792e5646 Merge pull request #1422 from ThePenguinMan96/Warlock-Ranged-Designation/DPS-Strat-cleanup
Warlock Ranged Designation/DPS Strategy Cleanup
2025-07-06 09:50:24 +02:00
NoxMax
78f4bd6d29 Ensuring data orphans are deleted 2025-07-05 18:59:30 -06:00
Yunfan Li
b558e86df0 correct typo in conf 2025-07-05 22:03:31 +08:00
Yunfan Li
f0c6aaff0b Random bots gear related enhancements 2025-07-05 20:29:34 +08:00
ThePenguinMan96
1a20d549fe Eureka!
I re-implemented the pet strategies into the "general" strategy area of the WarlockAiObjectContext, and it worked!!! Finally! The issue before was they were under the "Buff" area of the aiobjectcontext, which can only have 1 active at any given time - this is why the soulstone strategy and the pet strategy were cancelling out each other. Now, pets are summoned via a non-combat strategy that is assigned with aifactory by spec!
2025-07-04 22:44:17 -07:00
kadeshar
64df7439d8 Merge pull request #1424 from Raz0r1337/master
Update playerbots.conf.dist
2025-07-04 22:06:13 +02:00
kadeshar
05a3c318d6 Merge pull request #1420 from Wishmaster117/Correction-Code
Revert GetEquipGearScore to Blizzard’s fixed‐slot average item level formula
2025-07-04 22:05:38 +02:00
ThePenguinMan96
1c69490290 Added range checks for running away if too close
Added range checks for running away if too close - The warlocks were happily standing in cleave range and dieing. Now, they will backpedal if too close to an enemy. I also added custom logic to check if in demonology form before backpedaling. I also removed shadow cleave, as the dps increase with negligible (0.1%) and it was causing errors in the actions, resulting in the warlock standing idle in combat.
2025-07-04 11:33:46 -07:00
Alex Dcnh
8fd188ff3b Update PlayerbotAI.cpp 2025-07-04 19:19:29 +02:00
St0ny
7fa6e5833a Update playerbots.conf.dist
Added more GameObject ID's for Bots to ignore
2025-07-04 17:49:05 +02:00
kadeshar
305f769a84 - Added chat command to wipe group (#1408) 2025-07-04 23:14:07 +08:00
kadeshar
c0aa55416b Added configuration on excluded prefixes for trade action (#1401)
* - Added configuration on excluded prefixes for trade action

* - LoadListString usage reference specified

* - Code refactoring
2025-07-04 23:13:19 +08:00
ThePenguinMan96
59af34809c Warlock Ranged Designation/DPS Strategy Cleanup
Hello community,

This PR focuses on 4 things:

Recognizing the Warlock as a "ranged" bot, so they will follow ranged commands and strategies, in GenericWarlockStrategy.h:
uint32 GetType() const override { return CombatStrategy::GetType() | STRATEGY_TYPE_RANGED | STRATEGY_TYPE_DPS; }

Cleanup/deletion of the DpsWarlockStrategy.cpp and .h (no longer used or referenced anywhere)

Fixes soulstone logic so multiple Warlocks don't soulstone the same target, and don't try to soulstone a target that is too far away or out of line of sight (WarlockActions.cpp)

Moved summoning of pets to the main non-combat strategy inittriggers:

// Pet-summoning triggers based on spec
    if (tab == 0)  // Affliction
    {
        triggers.push_back(new TriggerNode("no pet", NextAction::array(0, new NextAction("summon felhunter", 29.0f), nullptr)));
    }
    else if (tab == 1)  // Demonology
    {
        triggers.push_back(new TriggerNode("no pet", NextAction::array(0, new NextAction("summon felguard", 29.0f), nullptr)));
    }
    else if (tab == 2)  // Destruction
    {
        triggers.push_back(new TriggerNode("no pet", NextAction::array(0, new NextAction("summon imp", 29.0f), nullptr)));
    }
2025-07-04 03:32:29 -07:00
Alex Dcnh
326783ed4f PlayerbotAI – Fix GetEquipGearScore to mirror Blizzard’s average-ilvl rules 2025-07-04 10:23:37 +02:00
Alex Dcnh
9503d32d46 Merge branch 'liyunfan1223:master' into Correction-Code 2025-07-03 22:27:54 +02:00
Alex Dcnh
edc9241fa3 Update PlayerbotAI.cpp 2025-07-03 22:21:54 +02:00
kadeshar
40535f6e55 Merge pull request #1419 from Raz0r1337/master
Added GameObject IDs that bots ignore
2025-07-03 19:48:41 +02:00
St0ny
9a980c171e Update playerbots.conf.dist
Added some GameObject IDs to stop Bots from stealing it.
2025-07-03 17:59:33 +02:00
Boxhead78
ce91c335b3 Fix missing BotStrategy enums 2025-07-03 12:30:09 +02:00
Boxhead78
605fa223ce Move GetBotStrategyForTeam from core 2025-07-03 09:39:54 +02:00
Boxhead78
309d177dd8 Battleground Rewrite
- Refactored BattleGroundTactics.cpp
- Bots choose strategies to determine if they are more aggressive or defensive in objectives
- Largely improved bots tactics in WSG, AB, AV and EY
- Improved how bots chase flag carriers
- Fixed some bots stuck in action loops - especially in WSG and AV
- Fixed several other Bugs
2025-07-03 08:25:55 +02:00
kadeshar
36fd5b8f15 Merge pull request #1411 from ThePenguinMan96/PVP-Talents-&-InitGlyph-expansion
PVP Talents and InitGlyph changes, "maintenance" command changes, "talents spec" changes
2025-07-02 21:56:00 +02:00
bash
720c063716 Update PlayerbotMgr.cpp (#1414) 2025-07-02 21:54:52 +02:00
Alex Dcnh
57a2c9a742 Update PlayerbotMgr.cpp (#1412)
Remove double #include "ChannelMngr.h"
2025-07-02 20:27:04 +02:00
ThePenguinMan96
3f7814abb4 PVP Talents and InitGlyph changes
PVP Talents and InitGlyph changes

This PR adds 3 pvp specs for each class, as well as their glyphs. It also adds exceptions to the Initglyph function, based on pvp-based talents for each class.

conf\playerbots.conf.dist - Adds 3 pvp specs/glyphs for each class.

src\factory\PlayerbotFactory.cpp - InitGlyph in its current form is unable to correctly assign glyphs on specindexes (or tab) over 2 without an exception. That is why this exception already exists in the code:

if (bot->getClass() == CLASS_DRUID && tab == DRUID_TAB_FERAL && bot->GetLevel() >= 20 && !bot->HasAura(16931))
        tab = 3;

This checks if the class is a Druid, if the tab is feral, if they are equal to or above level 20, and they don't have the Thick Hide talent. If all of these are true, then it manually sets the tab = 3. I first discovered this when I noticed that my frostfire mage would never be assigned the correct glyphs in the config - aka glyph of frosfire. It is because the frostfire spec is tab = 3, and no such logic exists. When I started adding the additional pvp specs, I noticed that they never would assign the correct glyphs. I had to add an exception to all pvp specs, and have them check for certain pvp related talents to correlate the tab manually. This is because tab is derived from the AiFactory::GetPlayerSpecTab(bot); function. The only possible tab values from this function are 0, 1, and 2.
**TLDR: Added code to support Frostfire Mage, dual-aura Blood DK, and all the PvP specs for correct glyph assignment.**

src\strategy\actions\ChangeTalentsAction.cpp: When you pick a spec with "talents spec" function, such as "talents spec arms pve", it will now correctly assign glyphs without the player having to execute the maintenance command. Setting the InitGlyphs to false removes prior glyphs.

src\strategy\actions\TrainerAction.cpp - Changed factory.InitGlyphs(true); to factory.InitGlyphs(false);. This makes it so all prior glyphs that were assigned are correctly deleted. I first noticed this when switching between specs and using the maintenance command - I had to login to the bot and manually delete the old glyphs, in order for the maintenance command to assign the new, correct glyphs.
2025-07-01 14:35:16 -07:00
brighton-chi
3dd0f11453 Corrections to Vanilla max iLevels (#1409)
* Corrections to Vanilla max iLevels

This reverts commit 681ec5c5b583dc935d60172f1790c6635eaef9ab, reversing
changes made to f4e6b1644ff2c3fa4b5f97a5b4d7cea14e352263.

* Corrections to Vanilla max iLevels
2025-07-01 18:39:12 +02:00
ThePenguinMan96
00cc2468f1 Warlock overhaul (#1397)
This is a complete overhaul of the warlock class, making 3 new strategies (affliction, demonology, and destruction), as well as finishing the warlock tank strategy (shadow ward and searing pain). It also includes a soulstone fix, where the bots can change who they soulstone based on the non-combat strategies you set for them. It also includes a self-resurrect action and trigger that allows the bots to resurrect using a soulstone or reincarnation. Many other skills were added to finish out the warlock skillset.
2025-06-27 20:00:38 +02:00