Commit Graph

61 Commits

Author SHA1 Message Date
Type1Error
95c572bf48 feat(playerbots): staggered taxi take-off for bots (#1281)
* feat(playerbots): staggered taxi take-off for bots

Adds four new configurable settings to playerbots.conf:

- AiPlayerbot.BotTaxiDelayMinMs:   Min random delay before the 1st follower bot clicks the flight-master
- AiPlayerbot.BotTaxiDelayMaxMs:   Upper bound for the overall taxi delay window – larger spreads big raids
- AiPlayerbot.BotTaxiGapMs:        Fixed gap added per group-slot so bots never take off together
- AiPlayerbot.BotTaxiGapJitterMs:  Extra small randomness added to each gap so launches don’t look robotic

These options allow server owners to fine-tune how bots queue up and take off from flight masters, making their behavior appear more natural.

Closes #1017 : Bots use Flight master nearly the same time.

* fixed build errors

Was missing a header and variable declarations.
2025-05-10 13:45:15 +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
kadeshar
3d6d454337 Stay strategy improvement (#1072)
* - Stay Strategy work in combat and with RTSC

* - Fixed summon with stay strategy

* - Added new stay strategy support for chat commands
2025-03-20 10:53:16 +01:00
avirar
c4a4d3a9e6 Rogue bots can unlock items in their bags and in the trade window (#1055) 2025-03-17 15:10:33 +01: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
SaW
9fbf60d812 Resolve most warnings - PlayerbotAI (#1025)
Resolve most warnings - PlayerbotAI

---------

Co-authored-by: blinkysc <37940565+blinkysc@users.noreply.github.com>
2025-03-01 14:19:07 +01:00
avirar
a0278f1efb Hunter ammo equip bug and other issues with BuyAction.cpp (#986)
Resolves #947

Equip logic was failing as projectiles were never returning ITEM_USAGE_EQUIP in ItemUsageValue.cpp, added two cases where equip is returned:

If no ammo is currently set
If new ammo has higher DPS than old/currently equipped ammo
While testing this using "b [itemlink]" and "b vendor" to purchase arrows I noticed some issues with BuyAction.cpp and have resolved them:

Bots will now perform the "equip upgrades" action for any bought item that has an equip usage
When using "b vendor" to buy all useful items from vendors within interaction distance, it now sorts the list of available items by calculated item score and buys the highest scoring item (if it is higher than the currently equipped item) for each slot. It should not buy multiple items for the same slot anymore, saving gold/emblems/etc.
"b vendor" will now only attempt to buy 1 of each item. Consumable and projectile item types can be bought up to 10 times per execution as long as it is still useful to buy the item in each iteration of the for loop. All items were following this behaviour previously and since the equip command was only given after the for loop it would buy 10 of an item before triggering it wasn't useful to buy more.
And finally, resolved issues where a bot runs out of ammo mid-fight:

Re-enabled combat and non-combat "no ammo" strategies to perform "equip upgrades" action.
Modified GenericTriggers.cpp; AmmoCountTrigger::IsActive to return true when the bot has ammo but it is not equipped yet.
2025-02-21 18:32:10 +01:00
Yunfan Li
49b046f36c Allow addclass bots that are not in a real guild (#970) 2025-02-14 18:45:17 +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
SaW
89590860fb Performance: Refactored a bunch of functions in Playerbot ai (#865)
* Update PlayerbotAI.h

* Refactored a number of functions in PlayerbotAI.cpp

* Update PlayerbotAI.cpp

* Update PlayerbotAI.cpp - update for commit done

Take
568592f188
into account.

* Missing check for aurEff

* Update PlayerbotAI.cpp

nvm...

* Update PlayerbotAI.cpp

GetAura

* Update PlayerbotAI.cpp

Simplified/Optimized sPlayerbotAIConfig->dynamicReactDelay logic for in-combat.

* Update PlayerbotAI.cpp

Dubass fix

* Update PlayerbotAI.cpp

Fix bots leaving dungeon group,. again.

* Update PlayerbotAI.cpp

* Update PlayerbotAI.cpp - order correction

...Required for proper pet behavior.

* Update PlayerbotAI.cpp - UpdateAIGroupMembership()

Final refactor of helper function as all now works as required.

* Update PlayerbotAI.cpp

FindItemInInventory

* Update PlayerbotAI.h

Added helper functions, correct public -> private
2025-01-15 22:49:41 +01:00
Yunfan Li
a5d1d7579d EnableNewRpgStrategy switch for initialization 2024-12-14 21:46:33 +08:00
Yunfan Li
0fd894176b [New Rpg] New rpg start up (add GO_GRIND and NEAR_RANDOM status) 2024-11-30 23:48:29 +08:00
bash
a7bcdad65c [performance] bots scale idle fix (#678)
* [performance] bots scale idle fix

* [performance] featureset
2024-11-05 16:05:05 +01:00
bash
e66475c3e0 [performance] Added additional circle of life, 600 yards (#655) 2024-10-29 23:32:16 +01:00
bash
3cd68c6dec [performance] new baseline (#644) 2024-10-29 01:15:26 +01:00
bash
12be2c9971 Revert "Rewrote scaling, moving away from cmangos solutions"
This reverts commit 62aef235d1.
2024-10-17 17:52:05 +00:00
bash
62aef235d1 Rewrote scaling, moving away from cmangos solutions 2024-10-13 22:05:39 +00:00
bash
c7197f0911 [performance] BotActiveAlone SmartScale toggle 2024-10-09 22:34:37 +00:00
bash
e8c8401b4a Ported cmangos of allowAcitity and prority, removed autoscaled based on latency 2024-10-07 20:57:19 +00:00
bash
20f6d1563b added acitivty autoscale and related config property 2024-10-03 07:58:09 +00:00
Yunfan Li
8d524cdaf0 [Combat formation] Compatible with naxx and avoid aoe 2024-09-26 20:01:10 +08:00
Yunfan Li
b87ca9da4c Icecrown gunship strategy 2024-09-23 14:00:24 +08:00
Yunfan Li
4de02481be Avoid aoe max radius and whitelist 2024-09-08 12:53:08 +08:00
Yunfan Li
aab8cf04d3 Improve estimated group dps 2024-09-01 23:28:22 +08:00
Yunfan Li
0281fe73ad Estimated group dps calculation 2024-09-01 00:05:31 +08:00
Yunfan Li
5a576cd9a5 Config option ApplyInstanceStrategies 2024-08-19 23:55:37 +08:00
Yunfan Li
2a5b7dcb61 Aggresive water elemental 2024-08-14 18:37:21 +08:00
Yunfan Li
2ddaae9ef0 Dynamic delay 2024-08-14 18:37:21 +08:00
Atidot3
078ba4aba1 fix merge master conflict 2024-08-12 09:35:31 +02:00
Yunfan Li
03487f8314 More spell to stats calculation 2024-08-11 22:22:16 +08:00
Atidot3
34901d96fe Fix code indentation 2024-08-04 15:17:03 +02:00
Atidot3
25b010dd1e Merge code line 2024-08-04 12:04:06 +02:00
Yunfan Li
53611c9040 Run clang-format 2024-08-04 10:23:36 +08:00
antony
234460e298 optimization loop 2024-08-02 16:41:50 +02:00
antony
142f2ad212 Chat refactor quests and generic + suggest 2024-08-01 14:13:00 +02:00
Atidot3
79d0f3fd28 Refactoring bot chat and sayaction caused by group crash <NOT FINISHED> 2024-07-31 22:39:59 +02:00
antony
f96f909b6e Rework in progress crash chat botgroup 2024-07-31 17:25:07 +02:00
antony
274101c000 Fix crash:
PlayerbotAI::FindOilFor was making the server randomly crashing
ChooseTravelTargetAction::getNewTarget: when active bot groupping was making the server crash as looking for unexisting params

Several bug fixes and tweak to Quest and Group

New fucntionnality:
Bots will now share quests randomly to their party
Bots will try to accomplish group member quest before moving on to new target
Bots will try to sells items only after few levels ( 5 ) when in group
When dropping a quest bots will try to select a new one they are on instead of idling for few time
Bots will no longuer try to invite themselfs to group or if group is full
Bots are now allowed to leave party by themself
Bots in groupe if not leader are forbbiden to tag in bgs
Bots in bot-groups no have a more limited range to look for grind target

Polish logs
2024-07-31 12:26:48 +02:00
Yunfan Li
2b11f791f2 Score calculation for item spell 2024-04-13 14:42:07 +08:00
Yunfan Li
4047fe4301 Fix occasionally unequip offhand 2024-03-27 19:20:11 +08:00
Yunfan Li
930f9fbf1e Fix macos compile (HUGE identifier) 2024-03-18 15:40:14 +08:00
Yunfan Li
1ba3eae0d0 Fix macos compilation 2024-03-18 14:25:56 +08:00
Yunfan Li
3d5f3082a4 Re-write Enchantment (work in progress) 2024-03-18 00:48:26 +08:00
Yunfan Li
fdf1e2ec1c Rogue poison 2024-03-05 17:52:30 +08:00
Yunfan Li
f09d8d72f4 Rogue stealth spell & Target selection for combo class 2024-02-10 22:03:33 +08:00
Yunfan Li
bc43e922a7 Dps target 2024-01-07 00:43:21 +08:00
Yunfan Li
a63c6b6709 smarter dps target and tank target 2023-10-22 01:27:37 +08:00
Yunfan Li
e75a824a85 topN GetMixedGearScore 2023-10-05 01:37:47 +08:00
Yunfan Li
ac6f7a1e98 init=auto 2023-10-05 00:59:08 +08:00
Yunfan Li
bb1ea0c395 naxxramas gluth 2023-09-03 17:52:44 +08:00