mirror of
https://github.com/edubart/otclient.git
synced 2025-10-15 20:14:54 +02:00
Fix a crash issue when attempting to draw invalid item.
This can happen when using UIItem as interfaces etc.
This commit is contained in:
@@ -133,7 +133,7 @@ function Player:getItemsCount(itemId)
|
||||
return count
|
||||
end
|
||||
|
||||
function Player:hasState(_state, states)
|
||||
function Player:hasState(state, states)
|
||||
if not states then
|
||||
states = self:getStates()
|
||||
end
|
||||
@@ -143,7 +143,7 @@ function Player:hasState(_state, states)
|
||||
if pow > states then break end
|
||||
|
||||
local states = bit32.band(states, pow)
|
||||
if states == _state then
|
||||
if states == state then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user