Skip to content

Commit

Permalink
fix: skill duplication on equip item (#2439)
Browse files Browse the repository at this point in the history
Revert send mistake from:
c6895eb
  • Loading branch information
dudantas authored Mar 14, 2024
1 parent 93b3786 commit 50da833
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/lua/creature/movement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -524,18 +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().debug("[{}] 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;
Expand Down

0 comments on commit 50da833

Please sign in to comment.