Skip to content

Commit

Permalink
extra security check in case of book swap
Browse files Browse the repository at this point in the history
  • Loading branch information
brightrim committed Feb 23, 2025
1 parent 8d545c4 commit f5aef1f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions magic/arcane/createSpell.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ local function getMagicBook(user)

for _, book in pairs(grimoireCreation.books) do

if leftItem.id == book then
if leftItem.id == book and leftItem:getData("magicBook") == "true" then
return leftItem
elseif rightItem.id == book then
elseif rightItem.id == book and leftItem:getData("magicBook") == "true" then
return rightItem
end
end
Expand Down

0 comments on commit f5aef1f

Please sign in to comment.