summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-07-28 06:07:20 -0300
committerJesusaves <cpntb1@ymail.com>2020-07-28 06:07:20 -0300
commit4eb988e28c8d7f0d0139ad0867229a0c99e5db46 (patch)
treeea63431571aa12aa6d41c44a4b4e0a2819f10fb8 /npc
parent1f4a951d85e0ff8984f4f050e8d53a1145d97263 (diff)
downloadserverdata-4eb988e28c8d7f0d0139ad0867229a0c99e5db46.tar.gz
serverdata-4eb988e28c8d7f0d0139ad0867229a0c99e5db46.tar.bz2
serverdata-4eb988e28c8d7f0d0139ad0867229a0c99e5db46.tar.xz
serverdata-4eb988e28c8d7f0d0139ad0867229a0c99e5db46.zip
Prevent players from tweaking currently equipped items
Diffstat (limited to 'npc')
-rw-r--r--npc/craft/tweak.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/npc/craft/tweak.txt b/npc/craft/tweak.txt
index 971f731b5..56f0874e8 100644
--- a/npc/craft/tweak.txt
+++ b/npc/craft/tweak.txt
@@ -73,7 +73,11 @@ function script SmithTweakSystem {
return false;
}
- // FIXME Skip equipped items
+ // Skip equipped items
+ if (isequipped(.@x)) {
+ mesc l("You should unequip this item first."), 1;
+ return false;
+ }
// If the item have no bonuses - fail
setarray .@AlwaysTweaks, 65535, BlacksmithAxe, Dustynator, Lightbringer,