Skip to content

Commit

Permalink
Fixes issue #17 Removed access check
Browse files Browse the repository at this point in the history
  • Loading branch information
Codinablack committed Dec 6, 2024
1 parent d950f2a commit 7866942
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions data/scripts/actions/others/doors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ local door = Action()
function door.onUse(player, item, fromPosition, target, toPosition, isHotkey)
local itemId = item:getId()
if table.contains(closedQuestDoors, itemId) then
if player:getStorageValue(item.actionid) ~= -1 or player:getGroup():getAccess() then
if player:getStorageValue(item.actionid) ~= -1 then
item:transform(itemId + 1)
player:teleportTo(toPosition, true)
else
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The door seems to be sealed against unwanted intruders.")
end
return true
elseif table.contains(closedLevelDoors, itemId) then
if item.actionid > 0 and player:getLevel() >= item.actionid - actionIds.levelDoor or player:getGroup():getAccess() then
if item.actionid > 0 and player:getLevel() >= item.actionid - actionIds.levelDoor then
item:transform(itemId + 1)
player:teleportTo(toPosition, true)
else
Expand Down

0 comments on commit 7866942

Please sign in to comment.