Commit Graph

16 Commits

Author SHA1 Message Date
Type1Error
f365b79e96 fix(#1276) Prevent bots from equipping relics intended for other classes (#1277)
Fixes #1276

This change adds logic to detect if an item is a relic and ensures it can only be equipped by bots of the corresponding class:

- Idols are restricted to druids
- Librams are restricted to paladins
- Sigils are restricted to death knights
- Totems are restricted to shamans

Fixes a bug where bots would attempt to equip relics regardless of class restrictions.

Additionally, this commit resolves two unrelated build warnings found in the same file.
2025-05-08 23:37:33 +02:00
avirar
9edddc5b26 Hunter equip bug (#1050) 2025-03-03 15:09:47 +01:00
avirar
c59c0cc802 Added logic for early ranged/thrown weapon equipping (#839)
Ranged weapons get caught up in the ITEM_CLASS_WEAPON logic but aren't handled. Added an early check and equip for ranged INVTYPE_
2025-01-03 16:06:06 +01:00
avirar
d77dbb65e5 Enhanced dual wield logic in EquipItem
Implemented logic to ensure the strongest weapon is always placed in the main hand for dual-wielding or Titan Grip-capable bots.
When equipping a new weapon, the code now compares the new weapon’s score with the currently equipped main-hand and off-hand weapons.
If the new weapon is the strongest, it goes into the main hand. The previous main-hand weapon may be moved to the off-hand if it is allowed (e.g., not a main-hand-only weapon) and provides a performance improvement.
Titan Grip conditions are accounted for, allowing valid two-handed weapons (2H axes, maces, swords) to be placed in the off-hand as well.
2024-12-14 18:52:57 +11:00
avirar
0c16f308db Update EquipAction.cpp 2024-12-14 18:41:32 +11:00
avirar
34c0759c90 Update EquipAction.cpp 2024-12-14 18:28:28 +11:00
avirar
f8da773ce1 Update EquipAction.cpp 2024-12-14 18:21:28 +11:00
avirar
a9eb41600d Update EquipAction.cpp 2024-12-14 18:07:02 +11:00
avirar
ea9bd18102 Enhanced dual-wield logic
Description of Changes:

    Implemented logic to ensure the strongest weapon is always placed in the main hand for dual-wielding or Titan Grip-capable bots.
    When equipping a new weapon, the code now compares the new weapon’s score with the currently equipped main-hand and off-hand weapons.
    If the new weapon is the strongest, it goes into the main hand. The previous main-hand weapon may be moved to the off-hand if it is allowed (e.g., not a main-hand-only weapon) and provides a performance improvement.
    Titan Grip conditions are accounted for, allowing valid two-handed weapons (2H axes, maces, swords) to be placed in the off-hand as well.
2024-12-14 17:57:16 +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
33f4ef63b6 Update EquipAction.cpp 2024-11-07 23:10:13 +11: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
Yunfan Li
53611c9040 Run clang-format 2024-08-04 10:23:36 +08:00
Yunfan Li
68fdf57c3c Enhance equip upgrade 2024-03-19 17:06:14 +08:00
Yunfan Li
29b748803e enable battleground 2023-10-19 00:20:45 +08:00
UltraNix
b952636f0d Big update. 2022-03-12 22:27:09 +01:00