Commit Graph

26 Commits

Author SHA1 Message Date
Revision
fcb956ec1b Removed unnecessary spaces 2025-09-19 22:43:50 +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
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
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
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
avirar
5962dc3d0c Update ItemUsageValue.cpp 2024-12-14 17:23:48 +11: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
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
484a2ae458 Item usage and equip initialization 2024-09-04 18:08:19 +08:00
Yunfan Li
1700a20c89 Add quest rewards to gear initialization 2024-08-19 18:46:23 +08:00
Yunfan Li
52bd378719 Rewrite stats weight and item score calculation 2024-08-08 20:36:32 +08:00
Yunfan Li
53611c9040 Run clang-format 2024-08-04 10:23:36 +08:00
Revision
838bfe333d Fix: Updated to work with newer commits of AzerothCore 2024-07-22 00:39:06 +02:00
Yunfan Li
4636b6e5b6 [Warnings] Fix warnings 2024-06-22 18:48:20 +08:00
Yunfan Li
ab9339dffa [Warnings] Fix warnings 2024-06-22 18:47:00 +08:00
Yunfan Li
4047fe4301 Fix occasionally unequip offhand 2024-03-27 19:20:11 +08:00
Yunfan Li
a320a716fa auto equip upgrade 2023-11-02 22:01:52 +08:00
Yunfan Li
9efec9b325 fix loot 2023-08-28 17:29:14 +08:00
Yunfan Li
48bf9d083a reduce item instance guid consume 2023-08-05 23:23:56 +08:00
Yunfan Li
7c70f42f34 refactor: naxxramas and kel'thuzad strategy 2023-07-18 17:58:51 +08:00
Yunfan Li
c21b534e47 fix equip replace bug 2023-07-14 14:46:02 +08:00
UltraNix
b952636f0d Big update. 2022-03-12 22:27:09 +01:00