Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: transform order
Browse files Browse the repository at this point in the history
dudantas committed Mar 12, 2024
1 parent 16209a0 commit 7369570
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/lua/creature/movement.cpp
Original file line number Diff line number Diff line change
@@ -524,17 +524,18 @@ uint32_t MoveEvent::EquipItem(const std::shared_ptr<MoveEvent> 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().error("[{}] item ability is already enabled", __FUNCTION__);
return 1;
}

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;

0 comments on commit 7369570

Please sign in to comment.