From 50da833a802cdaf98fcc836cf65dc4655850ff6c Mon Sep 17 00:00:00 2001 From: Eduardo Dantas Date: Thu, 14 Mar 2024 18:47:58 -0300 Subject: [PATCH] fix: skill duplication on equip item (#2439) Revert send mistake from: https://github.com/opentibiabr/canary/commit/c6895eb063d564a479e4a42e4c1d15f241f9aa9e --- src/lua/creature/movement.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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;