Commit Graph

217 Commits

Author SHA1 Message Date
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
Yunfan Li
4de02481be Avoid aoe max radius and whitelist 2024-09-08 12:53:08 +08:00
Yunfan Li
95f0768a8b Fix avoid aoe crash 2024-09-06 20:51:36 +08:00
Yunfan Li
593b30bbb0 Arm warrior and dk 2024-09-06 20:29:38 +08:00
Yunfan Li
927d893945 Improve combat reach and dps target, allowing spell interruption 2024-09-06 12:33:54 +08:00
Yunfan Li
484a2ae458 Item usage and equip initialization 2024-09-04 18:08:19 +08:00
Yunfan Li
aab8cf04d3 Improve estimated group dps 2024-09-01 23:28:22 +08:00
Yunfan Li
9aaeb67d3a melee attacker arc 2024-09-01 17:33:05 +08:00
Yunfan Li
360a025b34 Estimated dps calculation 2024-09-01 17:11:46 +08:00
Yunfan Li
0281fe73ad Estimated group dps calculation 2024-09-01 00:05:31 +08:00
Yunfan Li
a63fbb3b5f Improve druid cat spec 2024-08-31 23:16:14 +08:00
Yunfan Li
4b62d99c92 [Crash fix] Circle formation 2024-08-25 11:19:11 +08:00
Yunfan Li
47f8eb3e4a Ulduar flame leviathan (normal mode) 2024-08-19 19:30:04 +08:00
Yunfan Li
1700a20c89 Add quest rewards to gear initialization 2024-08-19 18:46:23 +08:00
Yunfan Li
7b0bb20078 Movement priority 2024-08-14 18:37:21 +08:00
Yunfan Li
a1cb9dea05 Improve class spell and use trinket 2024-08-14 18:37:21 +08:00
Atidot3
078ba4aba1 fix merge master conflict 2024-08-12 09:35:31 +02:00
Yunfan Li
d3b1041719 Fix movement on transport 2024-08-12 11:07:14 +08:00