[#bugs] The `CommandEquipObject` event does not respect the value returned by the `CanEq...

Issue #6305 resolved
Freehold Games Bot Account created an issue

Marked for crossposting by: Noelle Lavenza (transgendeer)

Message (jump):

<Noelle Lavenza (transgendeer)> The CommandEquipObject event does not respect the value returned by the CanEquipOverDefaultBehavior event, which leads to inconsistent behaviour—an item can be equipped over a default behaviour from the equipment screen, but not from the inventory screen.

Comments (4)

  1. Noelle Lavenza

    This seems to be because GetEquipmentListForSlot fires QueryEquippableListEvent rather than QuerySlotList, which means CanEquipOverDefaultBehavior is never checked—for good reason, I think, since only a slot string is provided and not a body type reference.

    In the handler for CommandEquipObject, there’s already code that uses GetSlotListForObject to check if there is a valid slot to equip to, but only if the "BodyPart" parameter is null and the one equipping the object is a player. Moving this check so that it always happens would probably solve this.

  2. Log in to comment