* Fix bots attacking despite being in a prohibited zone
* Protect pets as well and move logic to not skip IsFriendlyTo
* Fix prohibited typo
* Update AttackAction.cpp
There was existing code to ignore practice targets (anything with Dummy in the name) so I've just added the names of practice targets located in the tournament grounds:
Charge Target
Melee Target
Ranged Target
I considered just using the phrase "Target", but it is too generic and there are 246 creature_template names containing Target.
* prevent autogear on player alt bots
* update chat message to match other message format
* add config option with default set to 1
* replace end of file blank line
* remove extra space
Since they didn't have any sell value you couldn't get a bot to give you a healthstone or conjured food/water. This change allows them to be traded to you without altering any of the other logic for bot trades.
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.
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.
Corrected bot output for EQUIP_ERR_NOT_IN_COMBAT which is returned when the bot is in combat and cannot perform the equip action. Bot would previously say "I am not in combat", it will now say "I am in combat"
* 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
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.
Added checks to ensure bot and botAI are valid at function start.
Added extra pointer checks when accessing unit and gameobj in loops that iterate over nearest NPCs and game objects.
This adjustment ensures that objects are initialized correctly before being used in the ProcessQuests function.