diff --git a/src/lua/creature/movement.cpp b/src/lua/creature/movement.cpp index 862c1902788..0af09476ed8 100644 --- a/src/lua/creature/movement.cpp +++ b/src/lua/creature/movement.cpp @@ -524,6 +524,11 @@ uint32_t MoveEvent::EquipItem(const std::shared_ptr moveEvent, std::s return 1; } + const ItemType &it = Item::items[item->getID()]; + if (it.transformEquipTo != 0) { + g_game().transformItem(item, it.transformEquipTo); + } + if (player->isItemAbilityEnabled(slot)) { g_logger().debug("[{}] item ability is already enabled", __FUNCTION__); return 1; @@ -531,11 +536,6 @@ uint32_t MoveEvent::EquipItem(const std::shared_ptr moveEvent, std::s player->setItemAbility(slot, true); - const ItemType &it = Item::items[item->getID()]; - if (it.transformEquipTo != 0) { - g_game().transformItem(item, it.transformEquipTo); - } - for (uint8_t slotid = 0; slotid < item->getImbuementSlot(); slotid++) { player->updateImbuementTrackerStats(); ImbuementInfo imbuementInfo;