Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Luan Luciano committed Dec 11, 2023
1 parent 69e5f9a commit 27c789c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ local function onMovementRemoveProtection(playerId, oldPos, time)

local playerPos = player:getPosition()
if (playerPos.x ~= oldPos.x or playerPos.y ~= oldPos.y or playerPos.z ~= oldPos.z) or player:getTarget() then
player:kv():set("combat-protection", nil)
player:kv():remove("combat-protection")
return true
end

Expand Down
2 changes: 1 addition & 1 deletion data/chatchannels/scripts/help.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function onSpeak(player, type, message)
if hasExhaustionTarget > os.time() then
target:removeCondition(CONDITION_CHANNELMUTEDTICKS, CONDITIONID_DEFAULT, CHANNEL_HELP)
sendChannelMessage(CHANNEL_HELP, TALKTYPE_CHANNEL_R1, target:getName() .. " has been unmuted.")
target:kv():set("channel-help-exhaustion", nil)
target:kv():remove("channel-help-exhaustion")
else
player:sendCancelMessage("That player is not muted.")
end
Expand Down
2 changes: 1 addition & 1 deletion data/events/scripts/creature.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ local function removeCombatProtection(playerUid)
return
end

playerEvent:kv():set("combat-protection", nil)
playerEvent:kv():remove("combat-protection")
playerEvent:remove()
end, time * 1000, playerUid)
end
Expand Down
2 changes: 1 addition & 1 deletion data/libs/functions/player.lua
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ function Player.getCookiesDelivered(self)
end

function Player.allowMovement(self, allow)
return self:kv():set("block-movement", allow and nil or 1)
return allow and self:kv():remove("block-movement") or self:kv():set("block-movement", 1)
end

function Player.hasAllowMovement(self)
Expand Down

0 comments on commit 27c789c

Please sign in to comment.