Ejemplo n.º 1
0
    def _notify_leave(self, channel, leaver_guid):
        """ Send to all members of this channel that a player left. """
        members = channel.get_members()
        notification = Notification(NotificationType.LEFT, channel)
        notification.join_leave_guid = leaver_guid
        notify_packet = notification.to_packet()

        self.server.broadcast(notify_packet,
                              state=WorldConnectionState.IN_WORLD,
                              guids=members)
Ejemplo n.º 2
0
    def _notify_join(self, channel, joiner_guid):
        """ Send to all members of this channel that a player joined. """
        members = channel.get_members()
        notification = Notification(NotificationType.JOINED, channel)
        notification.join_leave_guid = joiner_guid
        notify_packet = notification.to_packet()

        members.remove(joiner_guid)
        self.server.broadcast(notify_packet,
                              state=WorldConnectionState.IN_WORLD,
                              guids=members)
Ejemplo n.º 3
0
    def _notify_leave(self, channel, leaver_guid):
        """ Send to all members of this channel that a player left. """
        members = channel.get_members()
        notification = Notification(NotificationType.LEFT, channel)
        notification.join_leave_guid = leaver_guid
        notify_packet = notification.to_packet()

        self.server.broadcast(
            notify_packet,
            state = WorldConnectionState.IN_WORLD,
            guids = members
        )
Ejemplo n.º 4
0
    def _notify_join(self, channel, joiner_guid):
        """ Send to all members of this channel that a player joined. """
        members = channel.get_members()
        notification = Notification(NotificationType.JOINED, channel)
        notification.join_leave_guid = joiner_guid
        notify_packet = notification.to_packet()

        members.remove(joiner_guid)
        self.server.broadcast(
            notify_packet,
            state = WorldConnectionState.IN_WORLD,
            guids = members
        )