mirror of
https://github.com/otland/forgottenserver
synced 2026-08-15 16:32:07 -04:00
* Move world time and light to lua * Some fix * Remove duplicated checks and move return to last fn line * Move world packet to lua
12 lines
309 B
Lua
12 lines
309 B
Lua
local event = CreatureEvent("WorldTimeAndLight")
|
|
|
|
function event.onLogin(player)
|
|
local worldTime = Game.getWorldTime()
|
|
player:sendWorldTime(worldTime)
|
|
|
|
local worldLightColor, worldLightLevel = Game.getWorldLight()
|
|
player:sendWorldLight(worldLightColor, worldLightLevel)
|
|
return true
|
|
end
|
|
|
|
event:register()
|