mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-06 08:40:03 +00:00
Notify area listeners upon login
This commit is contained in:
@@ -67,6 +67,14 @@ class Area
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
on :login do |event|
|
||||||
|
player = event.player
|
||||||
|
|
||||||
|
@areas.each do |area|
|
||||||
|
area.entered(player) if player.position.inside(area)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
# Listen for the MobPositionUpdateEvent and update the area listeners if appropriate.
|
# Listen for the MobPositionUpdateEvent and update the area listeners if appropriate.
|
||||||
on :mob_position_update do |event|
|
on :mob_position_update do |event|
|
||||||
mob = event.mob
|
mob = event.mob
|
||||||
|
|||||||
Reference in New Issue
Block a user