mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-03 00:38:21 +00:00
Merge pull request #166 from ryleykimmel/issue164
Notify area listeners upon login
This commit is contained in:
@@ -67,6 +67,14 @@ class Area
|
||||
|
||||
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.
|
||||
on :mob_position_update do |event|
|
||||
mob = event.mob
|
||||
|
||||
Reference in New Issue
Block a user