Commit Graph

2122 Commits

Author SHA1 Message Date
SaW
28be2b13c3 Optimize Mountaction: Movement Logic with Early Return for Matching F… (#1099)
* Optimize Mountaction: Movement Logic with Early Return for Matching Forms or Speed

Added a missing check, so if both master and bot are in matching forms or master is mounted with corresponding speed, early return as there is nothing to do.

This improves logic, actions, and prevents some strange movement behavior when both master and bot already are in travel form.
2025-03-20 19:53:56 +01: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
Yunfan Li
f039e88393 Fix faction count calculation error (#1085)
* Fix faction count on add randombots

Co-authored-by: kadeshar <kadeshar@gmail.com>

* Fix class balance issue with periodic login and logout

---------

Co-authored-by: kadeshar <kadeshar@gmail.com>
2025-03-17 19:40:03 +01:00
Yunfan Li
015d6605a6 Fix move npc action (#1087) 2025-03-17 23:52:41 +08: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
kadeshar
c93bf38463 - Fixed checking MaxAddedBots (#1083) 2025-03-17 15:47:48 +08:00
xSparky911x
54c8909ddb add ability to add or remove character with same name as account (#1070)
* add ability to add or remove character with same name as account

* seperate bot add and bot addacount so that characters with same name as an account doesn't add all toons from that account but adds the character instead if so desired
2025-03-16 12:45:42 +08:00
Yunfan Li
0fabf174c0 Fix rpg game objects quest accept and reward (#1080) 2025-03-15 17:50:00 +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
88356bb507 Prevent crash on update SQL (#1076)
Delete entries before adding to avoid duplicates.
2025-03-14 08:40:55 +01:00
kadeshar
e1f11fa2f2 - Code refactoring in RaidUlduarActions (#1065) 2025-03-08 12:42:08 +01: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
Revision
7dff970e37 Merge pull request #1063 from kadeshar/freya-strategies
Freya strategies
2025-03-06 22:36:43 +01:00
kadeshar
7c49a7b681 - Added tactic for Freya Nature bomb
- Added tactic for Freya Eonar's gift
2025-03-06 19:06:27 +01:00
SaW
4f43600e7a Silence error if preferred mounts SQL table playerbots_preferred_mounts does not exist (#1062)
* Fix error spam if DB does not exist
2025-03-06 15:03:23 +01:00
avirar
f7f949eda4 Item Usage and Loot Roll (#1059)
* Better Disenchant and final AH usage

* CalculateRollVote instead of just needing on items allowed by StoreLootAction::IsLootAllowed
2025-03-06 13:39:33 +01:00
xSparky911x
92d63c7cbc fix classbots autogear not working when altbots autogear turned off (#1060)
* fix classbots autogear not working when altbots autogear turned off
2025-03-06 13:31:46 +01:00
SaW
b9747fdd69 Reinstate cached preferred mounts (#1058) 2025-03-05 17:24:54 +01:00
valsan-azerty-boi
a4fe45afbb Fix server crash when bots apply strategies on a custom naxx raid (#1052) 2025-03-04 20:35:36 +01:00
SaW
bf22f20997 Fix: Bots not mounting in BG's anymore (#1056)
Bots didn't stop as they were supposed to, leading to some issues.
2025-03-04 13:42:41 +01:00
SaW
13a4dde643 Avoids the possible incorrect swimming state when bots coming ashore (#1051)
Improves the check for when in/under water, avoiding the possible incorrect swimming state when bots coming ashore (shortly swimming in air).
2025-03-03 15:10:47 +01:00
SaW
fe21dfe48e Fix/Feature: Bots can use travel/flight Shapeshift where appropriate (#1042) 2025-03-03 15:10:35 +01:00
avirar
9edddc5b26 Hunter equip bug (#1050) 2025-03-03 15:09:47 +01:00
Yunfan Li
d8cb75d376 Fix m_CastItem in CastSpell (#1047)
Fixed issues where some items and spells bypass item level requirement or use incorrect item level.
2025-03-02 20:20:51 +01:00
SaW
098950ceea Fix SpecialSpells to be correctly applied (#1044) 2025-03-01 22:42:58 +01: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
Yunfan Li
fbfcbbcddc EnablePeriodicOnlineOffline config and modify CalculateTotalAccountCount (#1043)
* EnablePeriodicOnlineOffline config

* Add Comments on PeriodicOnlineOfflineRatio
2025-03-01 21:05:43 +08:00
Yunfan Li
9ff0e8e94d ChatHelper link localization (#1036) 2025-03-01 11:18:05 +08:00
Dennis
e540875b9c dynamically load database names for cleanup queries (#1040)
* dynamically load database names for cleanup queries
2025-02-28 18:39:28 +01:00
Yunfan Li
a3e305fbed Improve XP rate config (#1035) 2025-02-28 01:05:08 +01:00
blinkysc
67d805f700 Cleanup Database More (#1032)
* Resolve conflicts

* format
2025-02-27 14:34:26 +08:00
blinkysc
17672bd5b5 Properly cleanup database with playerbot delete (#1027)
Properly cleanup appropriate databases when AiPlayerbot.DeleteRandomBotAccounts is set to 1
2025-02-26 19:19:11 +01:00
SaW
20a69db45a Githubactions - Cancel workflow fix (#1029)
Fix: Cancels the obsolete tasks as desired.
2025-02-26 18:57:31 +01:00
SaW
c697b81404 Githubactions - Cancel workflow on new commits in the same PR (#1028) 2025-02-26 16:44:44 +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
SaW
2766d553c7 Maintenance command to retain defined special spells (#1024)
fixes a bug that caused the maintenance command to have bots lose the special spells
2025-02-26 13:32:26 +01:00
kadeshar
4968245471 - Fixed Hodir strategy bugs (#1015) 2025-02-24 20:11:29 +01:00
Yunfan Li
95c2ba9105 Permission check and readability improvements (#997)
* AiFactory check by spell instead of level

* Ignore group security for guild invitation
2025-02-23 20:09:59 +01:00
SaW
114eeb3b37 Fix chat and beautify server promo box (#1008)
* Fix chat and beautify server promo box
* Remove all unnecessary hooks

---------

Co-authored-by: sudlud <sudlud@users.noreply.github.com>
2025-02-23 13:29:19 +01:00
sudlud
326637c93b add enabled hook lists for performance improvement (#1004) 2025-02-22 23:38:26 +01:00
SaW
a28e2bbb4b Disable Hire command (#1003)
Not correctly implemented at this time, will cause crash and other issues, as it would change the bot to the requester's account.
2025-02-22 23:37:53 +01:00
Yunfan Li
62e0235e73 Scripts and sessions update to align with acore (#987) 2025-02-22 12:08:53 +08:00
SaW
a44650c7f6 Include pvp as default non-combat strat for alt/class bots (#1001) 2025-02-22 10:59:18 +08: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
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
e33c61e90a Fixes on naxxramas heigan and thaddius (#994)
* Fix naxx thaddius

* Fix naxx heigan strats
2025-02-21 17:53:07 +01:00
Yunfan Li
0a76fc1d5f Better tank target selection (#996) 2025-02-21 16:20:33 +01:00
SaW
419e96e5aa Revert expireActionTime (#991)
* Revert expireActionTime

* Revert expireActionTime

* Revert RemoveExpired

* Revert RemoveExpired

* Revert RemoveExpired

* Revert Action expiration
2025-02-21 11:32:00 +08:00
SaW
61333a02bf Avoid creating accounts if both maxRandom & ClassBots are set to zero (#984)
Fix for https://github.com/liyunfan1223/mod-playerbots/issues/978
2025-02-19 09:46:28 +01:00
Yunfan Li
bb729e35b9 Fix stuck on knockback, enhance movement & flee and trap weave strats (#980)
* Hunter trap weave strats

* Do not allow actions to stack

* Remove trap weave by default

* Refactor on Engine

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

* Remove unused funcs in Queue

* Remove ExpireActionTime config

---------

Co-authored-by: SaW <swerkhoven@outlook.com>
2025-02-18 22:55:44 +08:00