Commit Graph

68 Commits

Author SHA1 Message Date
crow
1881ef1fe0 fix thresholds for LimitEnchantExpansion
And disallow Naxx40 shoulder enchants
2025-09-05 10:21:20 -05:00
kadeshar
3c442a6b71 - Excluded additional Legendary Arcane Amalgamation from obtainable for bot enchantments (#1600) 2025-09-02 19:24:55 +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
bc737ecc68 - Changed standalone config on cheat (#1585)
- Changed drink condition
2025-08-26 18:28:42 +02:00
bash
4f5f7d286e nullptr fix (#1555) 2025-08-16 15:29:44 +02:00
bash
6cb9f56c4e nullptr fix (#1557)
* nullptr fix

* Update PlayerbotFactory.cpp
2025-08-16 15:29:09 +02:00
bash
8d51092d42 As requested revert for threadfixes last few days (#1552)
* Revert "[Large server fix] #1537 Serialize playerBots/botLoading with a mutex and use snapshot-based loops to fix concurrency crashes (#1540)"

This reverts commit 3fff58df1a.

* Revert "[Fix] teleport to invalid map or invalid coordinates (x , y , z  200000, o ) given when teleporting player (g UI d full type player low , name , map , x , y , z , o )  (#1538)"

This reverts commit ca2e2ef0db.

* Revert "Fix: prevent MoveSplineInitArgs::Validate velocity asserts (velocity > 0.01f) for bots, pets, and charmed units (#1534)"

This reverts commit 4e3ac609bd.

* Revert "[Fix issue #1527] : startup crash in tank target selection — add TOCTOU & null-safety guards (#1532)"

This reverts commit c6b0424c29.

* Revert "[Fix issue #1528] Close small window where the “in a BG/arena” state can change between the check (InBattleground() / InArena()) and grabbing the pointer (GetBattleground()), which leads to a null dereference. (#1530)"

This reverts commit 2e0a161623.

* Revert "Harden playerbot logout & packet dispatch; add null-safety in chat hooks and RPG checks (#1529)"

This reverts commit e4ea8e2694.

* Revert "Dont wait to travel when in combat. (#1524)"

This reverts commit ddfa919154.

* Revert "nullptr fix (#1523)"

This reverts commit 380312ffd2.

* Revert "Playerbots/LFG: fix false not eligible & dungeon 0/type 0, add clear diagnostics (#1521)"

This reverts commit 872e417613.

* Revert "nullptr exception (#1520)"

This reverts commit 3d28a81508.

* Revert "Removed bot freezing at startup and system message, not relevant anymore (#1519)"

This reverts commit bcd6f5bc06.
2025-08-12 22:10:47 +02:00
bash
380312ffd2 nullptr fix (#1523) 2025-08-10 22:59:34 +02:00
bash
3d28a81508 nullptr exception (#1520) 2025-08-10 19:31:10 +02:00
brighton-chi
e950f65a83 Add config to disable hunters from generating specified pet families (#1485)
* Add config to disable hunters from generating specified pet families

* Fixed unrelated typo in config
2025-08-01 19:29:51 +02:00
brighton-chi
938872564a Revise bot logic for initializing and using consumables (#1483)
Bots will now add level- and spec-appropriate oils and stones when maintaining and, with respect to randombots, leveling. All bots (other than those with class-specific temporary weapon enchants) will apply oils and stones to their weapons. General clean-ups to associated code were made.
2025-08-01 19:28:13 +02:00
Yunfan Li
baa1aa9e9d Fix initself crash (#1488) 2025-08-01 19:15:59 +02:00
Wishmaster117
55a37c48eb Add /w botname "glyphs" and "glyph equip" commands 2025-07-26 00:15:46 +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
Yunfan Li
f0c6aaff0b Random bots gear related enhancements 2025-07-05 20:29:34 +08: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
Alex Dcnh
faee49beaa Update PlayerbotFactory.cpp (#1324)
To correcte the build warning in VS

Commented:
// bot->GetPetStable()->CurrentPet.value();

Added:
auto petGuid = bot->GetPetStable()->CurrentPet.value();
2025-05-24 17:11:49 +08:00
Yunfan Li
5910866362 Calculation of the power of items with random properties (#1312)
* Score calculation of item random property

* Equip auto repair on repop

* Item random property calculation

* Random Property calculation
2025-05-20 23:24:33 +08:00
EricksOliveira
4f26a8a09b Fix hunter bot losing dismissed pet during maintenance (#1286)
* Prevents recreating the tamed pet in InitPet() for hunter bots

This update adds a check to prevent the InitPet() method from re-creating a pet for hunter bots that already have a tamed pet (GetPetId() != 0). This prevents pets that have already been trained and have talents set from being lost, especially after login or teleportation. Responsibility for re-summoning an existing pet can be handled separately via LoadPetFromDB.

* Including check at start to avoid creating a new pet if the bot already has one active or saved in the stable (CurrentPet).

Initial check to avoid pet re-creation.

Selection of tamable creatures appropriate to the bot's level.

Creation, configuration and saving of the pet.

Application of visual effects and initialization of talents.

Activation of autocast for non-passive spells.

* Fix

* .
2025-05-14 20:56:50 +08:00
SaW
f17ec36cde Revert "Introduction of the SafeLearn(spellId) lambda that checks if the bot …" (#1289)
This reverts commit 6d24db6999.
2025-05-12 23:46:05 +02:00
Yunfan Li
0d170f5370 Fix inventory clear on init quests (#1266) 2025-05-05 15:07:51 +02:00
EricksOliveira
6d24db6999 Introduction of the SafeLearn(spellId) lambda that checks if the bot … (#1226)
* Introduction of the SafeLearn(spellId) lambda that checks if the bot already knows the spell before learning it.

This PR adds a safety check to the mount skill learning process in PlayerbotFactory::InitSkills, using a SafeLearn lambda to prevent the bot from trying to learn spells it already has. This fixes error messages like Duplicate entry when using the .bot init command.

* Check the bank and avoid error

* .

* fix
2025-04-27 12:50:48 +02:00
Cryo81
07e4dec70d Warning fix + ilvl function fix (#1210)
* 1 variable order warning fixed
70 unused variable warning fixed

* Fixed GetEquipGearScore function

---------

Co-authored-by: Julien MAS <julien.mas81@gmail.com>
2025-04-20 14:26:42 +08:00
SaW
287875c436 Set Lockpicking Skill (#1140)
On init and on maintenance
2025-04-11 19:29:07 +02:00
Yunfan Li
19447c3914 Enable new rpg strategy by default (#1192)
* Add RandomBotMinLevelChance

* Save mana only for healer

* Disable addclass dk for low level player

* Target selection and debuff cast with less players in group

* Change default rpg strategy and bots count in config

* Logs clean up

* Improve init=auto

* Remove login logs after initialization

* Rndbots stats for quest

* Prediction chase in reach combat

* Poor & Normal items ensurence for init=auto
2025-04-11 20:31:38 +08:00
Yunfan Li
cd5b15ddc1 Fix keyring for low level bots (#1177) 2025-04-08 10:11:07 +08:00
Yunfan Li
38912d4a8a Auto do quest feature (new rpg strategy) (#1034)
* New rpg startup speed up and refactor

* New rpg do quest

* Fix invalid height in quest poi

* Add quest accept and reward limitation

* New rpg quest improvement

* Organize quest log, reward quests and fix grind target

* Quest dropped statistic and remove redundant code

* Decrease grind relevance lower than loot

* Fix new rpg drop quest

* Go to reward quest instead of innkeeper when quest completed

* Fix incorrect logic in do quest reward

* Fix reset quests in factory

* Fix crash on grind target value

Co-authored-by: SaW <swerkhoven@outlook.com>

* Fix a minor error in DoCompletedQuest

* Let bots get rid of impossible quests faster

* Increase loot fluency (especially for caster)

* Remove seasonal quests from auto accept

* Enhance quest accept condition check

* Add questgiver check (limit acceptation of quest 7946)

* Questgiver check and localization

* Near npc fix

* Fix quest item report

* Add lowPriorityQuest set for quests can not be done

* Improve gameobjects loot

* Do complete quest

* FIx move far to teleport check

* Accept or reward quest from game objects

* Fix possible crash in rpg game objects

* Fix ChooseNpcOrGameObjectToInteract crash

---------

Co-authored-by: SaW <swerkhoven@outlook.com>
2025-03-14 21:31:33 +08:00
Yunfan Li
24efa7efa2 General improvement on init and strats (#1064)
* Potions strats and potions init

* Druid and shaman spell in low level

* Ammo init improvement

* Rogue low level

* Fix melee attack action (for caster with no mana)

* Disable pet spells that reduce dps

* Talents improvement

* Remove CanFreeMove check

* Reduce penalty for non-dagger weapon for rogue
2025-03-08 12:36:06 +01:00
SaW
098950ceea Fix SpecialSpells to be correctly applied (#1044) 2025-03-01 22:42:58 +01:00
avirar
3a4e8e729b Allow bots to enter all TBC dungeons (rep/keys/quest attunements) (#1014)
Update will allow any adequately leveled bot to queue for all random and specific TBC dungeons. Normal and Heroic modes that require attunement or keys will be accessible by bots.

InitReputation: Level 70+ Bots will receive Honored rank for all the required factions needed for Heroic keys to function. I've placed the calls to InitRep before InitMounts, I feel we can do something with that in the future. Randomised rep values might allow bots to obtain other mounts?
InitKeyring: All bots receive all non-rep required keys (Shattered Halls Key, Shadow Labyrinth Key, Key to the Arcatraz), and bots with the required rep (Honored) get the other keys.
InitAttunementQuests: Level 60+ bots complete the Caverns of Time and Magister's Terrace attunement quests.
Updated acore_playerbots SQL; playerbots_dungeon_suggestion_definition; max_level increased to 73 (from 70) for all TBC Heroics and Magister's Terrace nomal. Allows more level appropriate bots to join.
2025-02-26 15:55:16 +01:00
Yunfan Li
4b1febc62a Minor improvments on logs, stats weights and aoe distance calculation (#995)
* StatsCollector for paladin spell

* Remove error log on MoveFromGroup

* Log and timer for CreateRandomBots

* Improve aoe trigger distance calculation

* Reduce spirit weights for heal priest and paladin
2025-02-22 10:57:33 +08:00
SaW
6353c86b53 Change "Initializing guilds..." from INFO to DEBUG (#982)
To avoid it being needlessly spammed in the console.
2025-02-18 11:59:13 +01:00
SaW
58a596a40e Only invoke InitGuild when randomBotGuildCount > 0 (#975)
* Only invoke InitGuild when randomBotGuildCount > 0

* Moved Random bot guild count/delete to more appropriate section of config.
2025-02-16 13:42:15 +01:00
SaW
c2caf3c564 Re-instate random bots guilds (#969)
I believe this should have been enabled again at some point.
2025-02-14 21:48:10 +08:00
Yunfan Li
2c224d3121 Add LimitTalentsExpansion config (#954) 2025-02-09 21:50:04 +08:00
Yunfan Li
e571694a88 Reset added rndbots on server restart to automatically apply configuration changes (#913)
* Refactor RandomPlayerbotMgr and delete add value on restart server

* Remove reset tips in conf file
2025-01-26 12:06:29 +01:00
Yunfan Li
f0d4273e4a Improve gear initialization (#909)
* Druid and paladin rotation

* Improve spell effect collector for gear init

* Fix mount and hit stat calculator
2025-01-25 14:07:36 +01:00
Yunfan Li
e09b871d94 Increase ammo count for hunter 2025-01-19 23:08:42 +08:00
Yunfan Li
812702ea25 Hunter wolf pet config and modify config file layout for activities 2025-01-19 17:10:11 +08:00
Yunfan Li
568592f188 Minor fixes to spell and mount init (#863)
* Make summon imp non-temporary

* Remove horse mount from troll

* Set facing to during spell casting

* Allow rpg status command

* Init unarmed skill and fix skill clear

* Cast delay after interrupt spell
2025-01-12 18:03:27 +01:00
valsan-azerty-boi
f95e812d26 add bot mount in conf 2025-01-05 21:55:13 +01:00
Yunfan Li
1ed6645119 Fix rpg move far (#822)
* Fix rpg move far

* Don't go innkeeper with diff zone
2024-12-27 18:11:39 +01:00
avirar
a1b4681c58 Resolved issues with rndbots and equipmentPersistence (#778)
* Update PlayerbotFactory.cpp

* Update PlayerbotFactory.cpp

* Added !incremental checks for talent/gear init
2024-12-18 18:32:01 +01:00
Yunfan Li
f26cebb518 Update rpg status probability 2024-12-11 23:00:03 +08:00
Bobblybook
756dcbaa84 Limit JC jeweler's gems to 3
If bot has jewelcrafting, enforce limit of 3 of any type of jeweler's gems when autogearing/gemming
2024-10-29 20:41:22 +11:00
Yunfan Li
68bf09c425 Disable test items 2024-09-18 22:16:18 +08:00
Yunfan Li
d443b48edf Fix crash of prequest 2024-09-17 18:03:41 +08:00
Yunfan Li
d3f380d04b Spellcooldown and instance refresh on randomize 2024-09-07 11:52:29 +08:00
Yunfan Li
927d893945 Improve combat reach and dps target, allowing spell interruption 2024-09-06 12:33:54 +08:00
Yunfan Li
73f699fe89 Fix initself crash 2024-09-05 15:57:32 +08:00