mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-12-06 19:01:35 +00:00
Move EventContext functionality into Event, remove EventContext, add LogoutEvent support.
This commit is contained in:
1 parent
06b6f5fb74
commit
d81f0feaf7
8 files changed
+39
-46
No files matched your search
@@ -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