canary/data/scripts/creaturescripts/familiar
James 4d9bc97e8c
fix: familiar time (#3747)
These changes make a small but significant fix to the familiar system
on player login. It ensures that the remaining familiar summon time is
never negative by clamping the value to zero. This prevents potential
issues if the stored summon time is in the past.

- Clamp `familiarTimeLeft` to zero to prevent negative values by using
`math.max(0, familiarSummonTime - os.time())` in
`familiarOnLogin.onLogin`
(`data/scripts/creaturescripts/familiar/on_login.lua`).

Resolves #3710
2025-10-27 12:23:46 -03:00
..
on_advance.lua chore: small organization in core scripts (#2248) 2024-02-16 17:12:25 +00:00
on_death.lua chore: small organization in core scripts (#2248) 2024-02-16 17:12:25 +00:00
on_login.lua fix: familiar time (#3747) 2025-10-27 12:23:46 -03:00