Skip to content

Commit

Permalink
Mind crystal fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Oen44 committed Jun 2, 2019
1 parent fdc7885 commit 480e212
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion upgrade_system_const.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local UPGRADE_SYSTEM_VERSION = "2.1.1"
local UPGRADE_SYSTEM_VERSION = "2.1.2"
print(">> Loaded Upgrade System v" .. UPGRADE_SYSTEM_VERSION)

ITEM_UPGRADE_CRYSTAL = 1
Expand Down
4 changes: 2 additions & 2 deletions upgrade_system_core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,13 @@ function us_onUse(player, item, fromPosition, target, toPosition, isHotkey)
end
elseif item.itemid == US_CONFIG[1][ITEM_MIND_CRYSTAL] then
if not item:hasMemory() then
if not target:isUnique() then
if target:isUnidentified() then
player:sendTextMessage(MESSAGE_STATUS_WARNING, "Sorry, this item is unidentified and can't be copied!")
player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE)
elseif not target:getBonusAttributes() then
player:sendTextMessage(MESSAGE_STATUS_WARNING, "Sorry, this item doesn't have any attributes!")
player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE)
elseif not target:isUnique() then
elseif target:isUnique() then
player:sendTextMessage(MESSAGE_STATUS_WARNING, "Sorry, this item is Unique and can't be copied!")
player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE)
else
Expand Down

1 comment on commit 480e212

@pedrogiampietro
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice :)

Please sign in to comment.