Skip to content

Commit

Permalink
fix: potions conditions for group ids above senior tutors (#2019)
Browse files Browse the repository at this point in the history
Resolves #1989
  • Loading branch information
Luan Luciano authored Dec 11, 2023
1 parent c5ff05c commit 1c01b7a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion data-otservbr-global/scripts/actions/other/potions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ function flaskPotion.onUse(player, item, fromPosition, target, toPosition, isHot
end

local potion = potions[item:getId()]
if potion.level and player:getLevel() < potion.level or potion.vocations and not table.contains(potion.vocations, player:getVocation():getBaseId()) and not (player:getGroup():getId() >= 2) then
if potion.level and player:getLevel() < potion.level or potion.vocations and not table.contains(potion.vocations, player:getVocation():getBaseId()) and not (player:getGroup():getId() >= GROUP_TYPE_GAMEMASTER) then
player:say(potion.description, MESSAGE_POTION)
return true
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 @@ -27,7 +27,7 @@ function Player.feed(self, food)
end

function Player.getClosestFreePosition(self, position, extended)
if self:getGroup():getAccess() and self:getAccountType() >= ACCOUNT_TYPE_GOD then
if self:getGroup():getAccess() and self:getAccountType() == ACCOUNT_TYPE_GOD then
return position
end
return Creature.getClosestFreePosition(self, position, extended)
Expand Down

0 comments on commit 1c01b7a

Please sign in to comment.