Show / Hide Table of Contents

    Class Client

    Class that implements an IClient for any sort of connection.

    Inheritance
    System.Object
    Client
    Implements
    IClient
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Fibula.Client
    Assembly: Fibula.Client.dll
    Syntax
    public class Client : IClient

    Constructors

    | Improve this Doc View Source

    Client(ILogger, IConnection)

    Initializes a new instance of the Client class.

    Declaration
    public Client(ILogger logger, IConnection connection)
    Parameters
    Type Name Description
    Serilog.ILogger logger

    A reference to the logger to use.

    IConnection connection

    The connection that this client uses.

    Properties

    | Improve this Doc View Source

    Connection

    Gets the connection enstablished by this client.

    Declaration
    public IConnection Connection { get; }
    Property Value
    Type Description
    IConnection
    | Improve this Doc View Source

    Information

    Gets the information about the client on the other side of this connection.

    Declaration
    public ClientInformation Information { get; }
    Property Value
    Type Description
    ClientInformation
    | Improve this Doc View Source

    IsIdle

    Gets a value indicating whether this client is idle.

    Declaration
    public bool IsIdle { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    PlayerId

    Gets or sets the id of the player that this client is tied to.

    Declaration
    public uint PlayerId { get; set; }
    Property Value
    Type Description
    System.UInt32

    Methods

    | Improve this Doc View Source

    AddKnownCreature(UInt32)

    Adds the given creature to this player's known collection.

    Declaration
    public void AddKnownCreature(uint creatureId)
    Parameters
    Type Name Description
    System.UInt32 creatureId

    The id of the creature to add to the known creatures collection.

    | Improve this Doc View Source

    ChooseCreatureToRemoveFromKnownSet(Int32)

    Chooses a creature to remove from this player's known creatures collection, if it has reached the collection size limit.

    Declaration
    public uint ChooseCreatureToRemoveFromKnownSet(int skip = 0)
    Parameters
    Type Name Description
    System.Int32 skip

    Optional. A number of creatures to skip during selection. Used for multiple creature picking.

    Returns
    Type Description
    System.UInt32

    The id of the chosen creature, if any, or System.UInt32.MinValue if no creature was chosen.

    | Improve this Doc View Source

    KnowsCreatureWithId(UInt32)

    Checks if this player knows the given creature.

    Declaration
    public bool KnowsCreatureWithId(uint creatureId)
    Parameters
    Type Name Description
    System.UInt32 creatureId

    The id of the creature to check.

    Returns
    Type Description
    System.Boolean

    True if the player knows the creature, false otherwise.

    | Improve this Doc View Source

    RemoveKnownCreature(UInt32)

    Removes the given creature from this player's known collection.

    Declaration
    public void RemoveKnownCreature(uint creatureId)
    Parameters
    Type Name Description
    System.UInt32 creatureId

    The id of the creature to remove from the known creatures collection.

    | Improve this Doc View Source

    Send(IEnumerable<IOutboundPacket>)

    Sends the packets supplied over the Connection.

    Declaration
    public void Send(IEnumerable<IOutboundPacket> packetsToSend)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<IOutboundPacket> packetsToSend

    The packets to send.

    Implements

    IClient

    Extension Methods

    ObjectExtensions.YieldSingleItem<T>(T)
    ObjectExtensions.GetPropertyValue(Object, String)
    Validate.ThrowIfNull(Object, String)
    • Improve this Doc
    • View Source
    Back to top Copyright © 2018-2020 | The Fibula Project
    Generated using DocFX | Jose L. Nuñez de Caceres et al.