mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-04 08:39:27 +00:00
Move EventContext functionality into Event, remove EventContext, add LogoutEvent support.
This commit is contained in:
@@ -42,8 +42,7 @@ on :message, :remove_friend do |ctx, player, message|
|
||||
end
|
||||
|
||||
# Update the friend server status and send the friend/ignore lists of the player logging in.
|
||||
on :login do |event, context|
|
||||
player = event.player
|
||||
on :login do |event, player|
|
||||
player.send(FriendServerStatusMessage.new(ServerStatus::CONNECTING))
|
||||
player.send(IgnoreListMessage.new(player.ignored_usernames)) if player.ignored_usernames.size > 0
|
||||
|
||||
@@ -63,8 +62,8 @@ on :login do |event, context|
|
||||
end
|
||||
|
||||
# Notifies the player's friends that the player has logged out.
|
||||
on :logout do |event, context|
|
||||
update_friends(event.player, 0)
|
||||
on :logout do |event, player|
|
||||
update_friends(player, 0)
|
||||
end
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user