Commit Graph

234 Commits

Author SHA1 Message Date
Wishmaster117
55a37c48eb Add /w botname "glyphs" and "glyph equip" commands 2025-07-26 00:15:46 +02:00
Yunfan Li
feda619066 Engine optimization for better performance and mem usage (#1462)
* Optimize loot

* World channel talk

* General improvement

* Engine rebuild for performance and memory usage

* Fix crash with AutoDoQuest = 0
2025-07-25 12:11:03 +02:00
Yunfan Li
4a00c954ed RPG update travel flight status (#1445) 2025-07-23 23:37:41 +08:00
Yunfan Li
f0c6aaff0b Random bots gear related enhancements 2025-07-05 20:29:34 +08:00
Veit F.
290bf50faf fix: added missing checks for PetIsDeadValue (#1376)
* fix:  added missing guildTaskEnabled checks for GuildTaskMgr

Even if guildTaskEnabled was set to 0 in the configuration file, a few queries like PLAYERBOTS_SEL_GUILD_TASKS_BY_VALUE, PLAYERBOTS_SEL_GUILD_TASKS_BY_OWNER were executed, which lead to a massive amount of unnecessary database load

* fix:  added missing checks for PetIsDeadValue

Hunter under level 10, which are not able to summon their pets defined in the database spammed SELECT id FROM character_pet WHERE owner = {}, since the result of the query was true. Bots under level 10 already have pets in their stables. Also the same thing applied to Bots on mounts, because, while mounted, pets get despawned. This should drastically improve server performance.

* fix:  refactored query, pet should only check death state of his current pet

The old query also fetched all pets out of his stable, which is not needed, since we are looking for slot 0 (active pet)

* style: 🎨 and to AND typo

* fix: 🐛 Reverted 5a6182f977

A few hunters with pets in stable, where slot = 100 would not summon their pets
2025-06-12 23:17:43 +02:00
kadeshar
db9bcb97ba - Added Mimiron Strategy (#1358)
- Fixed nearest npc value
2025-06-06 08:51:28 +02: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
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
2f3f8d565c Make battleground join / arena join / loot money session packet (#1178)
* Make battleground / arena join session packet

* Loot money

* Avoid aoe crash
2025-04-08 10:11:03 +08:00
EricksOliveira
8f92fbade3 BG crash fix: Fixed a crash when the bot was marked as being inside a battleground but had no battleground. (#1122) 2025-03-26 20:48:36 +08:00
EricksOliveira
105b16358f BG: Crash fix when bots are trying to determine the eye flagcarrier when the battleground no longer exists (#1119) 2025-03-25 13:27:13 +01:00
avirar
c83cf0706a ItemUsageValue: Handle items that create required items (#1091)
* Updated IsItemUsefulForQuest to handle items that create required quest items

* Debug output

* Removed unneeded botAI->

* Debug output in Calculate

* -> not .

* Comprehensive debug output for quest usage

* Corrected logic for lootable items when sync quest is enabled

* #include "LootObjectStack.h"

* Corrected call to IsItem

* Removed debug statements

* Reimplement ItemCount >= RequiredItemCount

* Modified CanLoot to loot all items when loot source is an item in their bags

* Set loot target when sending Open packet
2025-03-24 21:47:25 +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
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
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
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
0a76fc1d5f Better tank target selection (#996) 2025-02-21 16:20:33 +01:00
SaW
7287d14dc6 Update formation info to reflect chaos as default (#910)
As the default formation was recently switched to chaos.
2025-01-25 20:04:47 +01:00
kadeshar
7563ab0c79 Fixed swimming value calculation (#897) 2025-01-23 23:41:24 +01:00
Yunfan Li
f096975f90 Fix estimated life time with dead group member 2025-01-19 17:10:11 +08:00
Yunfan Li
9293e5b1dd Follow master instead of group master in formation 2025-01-04 23:43:59 +08:00
SaW
2f78db81e3 Change default formation to Chaos
This as it looks more natural than the default near.
2024-12-24 16:46:51 +01:00
SaW
d9f9d980cf Fix various formations - Issue #749 (#807)
* Fix various formations

* Refactor Formation::GetFollowAngle()

* Update Formations.cpp

* Refactored Formation::GetFollowAngle()

Final refactor of Formation::GetFollowAngle()

 - By combining the group member iteration, unnecessary loops are avoided.
- Clearer Structure: The code is more readable, with fewer redundant operations.
- Better Maintainability: Comments and logical grouping make it easier to modify or extend the function in the future.

* Logic order improvement
2024-12-22 23:08:47 +01:00
Yunfan Li
42404ac403 Merge pull request #759 from liyunfan1223/new_rpg_strats
New rpg strategy
2024-12-17 20:43:38 +08:00
avirar
5962dc3d0c Update ItemUsageValue.cpp 2024-12-14 17:23:48 +11:00
Yunfan Li
69fe9a2d81 Reduce near npc range distance 2024-12-10 20:20:19 +08:00
Yunfan Li
6d82b134d1 Merge branch 'master' into new_rpg_strats 2024-12-06 20:39:51 +08:00
Yunfan Li
e7f0ee16f7 Merge pull request #757 from noisiver/support-newer-master
Support newer master
2024-12-05 22:13:54 +08:00
kadeshar
437f816b15 - fixed attack rti target action (#758) 2024-12-03 10:59:11 +01:00
Revision
fe896c1d3d Use another helper and revert one instance HasPlayerFlag 2024-12-02 00:28:08 +01:00
Revision
f0ccb0a371 Fix compiler errors and switch to using available helpers 2024-12-02 00:16:06 +01: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
EricksOliveira
af0a6b73e1 Fix Crashs Formation Arrow (#708)
* Fix crash in formations

* Crash fix: Arrow formation

* Crash fix: Arrow formation looking for member information in different maps/instances.

* Loop fix: arrow formation

* Crash fix: Arrow formation when group isn't all in 1 place.

* Fix Build
2024-11-14 15:23:07 +01:00
avirar
277b065a28 Updated ItemUsageValue to handle unique items that are not equipped (#712)
* Update ItemUsageValue.cpp

Added logic to handle unique/unique-equippable items that are not equipped yet.

Reevaluated dest from dstSlot in cases where dest ==0

* Update ItemUsageValue.cpp

Merged logic for both types of unique items.
2024-11-14 15:19:14 +01:00
Bobblybook
2ce826a8dc Merge branch 'master' into master 2024-11-08 20:53:29 +11:00
Bobblybook
71b7844fef Offhand equip bugfix
Prevent caster bots and others who cannot dual-wield from attempting to equip weapons in their offhand
2024-11-08 20:35:31 +11:00
Bobblybook
2d13373a8d Handle bot gear upgrades for multi-slot items (#695)
* Handle bot gear upgrades for multi-slot items

Switch to using opcode "CMSG_AUTOEQUIP_ITEM_SLOT" to equip items to specific slots, rather than "right clicking" item upgrades.
Fixes an issue with rings, trinkets and offhand weapons where the bot would only ever upgrade their first slot.
Also evaluate the above item types for equipping in both slots rather than just comparing to the first item.

* Update EquipAction.cpp
2024-11-07 17:18:59 +01:00
Bobblybook
2ec5628d95 Handle bot gear upgrades for multi-slot items
Switch to using opcode "CMSG_AUTOEQUIP_ITEM_SLOT" to equip items to specific slots, rather than "right clicking" item upgrades.
Fixes an issue with rings, trinkets and offhand weapons where the bot would only ever upgrade their first slot.
Also evaluate the above item types for equipping in both slots rather than just comparing to the first item.
2024-11-07 22:59:35 +11:00
bash
eed4339ec1 Merge pull request #632 from Bobblybook/master
Utgarde Pinnacle, CoS & additional value entry
2024-10-21 20:35:59 +02:00
Bobblybook
c788e96828 UP and CoS dungeons
- Utgarde Pinnacle implementation
- Culling of Stratholme implementation
- Added additional value ("nearest hostile npcs") needed to expose some hidden trigger-type npc units (eg. frost breath on Skadi fight in UP)
2024-10-21 22:29:03 +11:00
Jelly
be8f529fc2 Update Items Eligible for Professions
Adds several items and cases for Skinning, Mining, Blacksmithing.
2024-10-20 16:24:00 -05:00
Yunfan Li
008d098eda [Assist Dps] Healer assist dps strats 2024-10-04 14:14:16 +08:00
Revision
6303401713 Silence totalDps being uninitialized 2024-10-02 19:58:34 +02:00
Yunfan Li
4df77e6d95 [Attack target] Fix a target selection bug that causing bot stuck 2024-09-26 21:28:40 +08:00
Yunfan Li
d1a744fca3 [Tank target] Improve main tank target selection 2024-09-26 20:00:09 +08:00
Yunfan Li
2756664b77 [Tank face] Improve angle calculation 2024-09-24 20:34:18 +08:00
Yunfan Li
eea652f5d5 Tank face and dps behind 2024-09-24 11:46:39 +08:00
Yunfan Li
68bf09c425 Disable test items 2024-09-18 22:16:18 +08:00