Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: wheel #3157

Merged
merged 10 commits into from
Jan 10, 2025
Merged
4 changes: 1 addition & 3 deletions data/scripts/actions/items/wheel_scrolls.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,11 @@ function scroll.onUse(player, item, fromPosition, target, toPosition, isHotkey)
end

local scrollData = promotionScrolls[item:getId()]
local scrollKV = player:kv():scoped("wheel-of-destiny"):scoped("scrolls")
if scrollKV:get(scrollData.name) then
if not player:wheelUnlockScroll(scrollData.name) then
player:sendTextMessage(MESSAGE_LOOK, "You have already deciphered this scroll.")
return true
end

scrollKV:set(scrollData.name, true)
player:sendTextMessage(MESSAGE_LOOK, "You have gained " .. scrollData.points .. " promotion points for the Wheel of Destiny by deciphering the " .. scrollData.itemName .. ".")
item:remove(1)
return true
Expand Down
Loading
Loading