mirror of
https://github.com/edubart/otclient.git
synced 2025-10-16 04:24:54 +02:00
Fixes
* poison condition * battle target outside screen view
This commit is contained in:
@@ -91,9 +91,12 @@ end
|
||||
|
||||
function HealthBar.onStatesChange(localPlayer, now, old)
|
||||
local bitsChanged = bit32.bxor(now, old)
|
||||
print("HealthBar.onStatesChange 1 " .. bitsChanged)
|
||||
for i = 1, 32 do
|
||||
if i > bitsChanged then break end
|
||||
local bitChanged = bit32.band(bitsChanged, math.pow(2, i))
|
||||
local pow = math.pow(2, i-1)
|
||||
if pow > bitsChanged then break end
|
||||
local bitChanged = bit32.band(bitsChanged, pow)
|
||||
print("HealthBar.onStatesChange 2 " .. bitChanged .. " " .. bitsChanged .. " " .. pow)
|
||||
if bitChanged ~= 0 then
|
||||
HealthBar.toggleIcon(bitChanged)
|
||||
end
|
||||
|
Reference in New Issue
Block a user