Interface IClient
Interface for connections.
Namespace: Fibula.Client.Contracts.Abstractions
Assembly: Fibula.Client.Contracts.dll
Syntax
public interface IClient
Fields
| Improve this Doc View SourceKnownCreatureLimit
The limit of creatures that a client can keep track of.
Declaration
public const int KnownCreatureLimit = 150
Field Value
Type | Description |
---|---|
System.Int32 |
Properties
| Improve this Doc View SourceConnection
Gets the connection enstablished by this client.
Declaration
IConnection Connection { get; }
Property Value
Type | Description |
---|---|
IConnection |
Information
Gets the information about the client on the other side of this connection.
Declaration
ClientInformation Information { get; }
Property Value
Type | Description |
---|---|
ClientInformation |
IsIdle
Gets a value indicating whether this client is idle.
Declaration
bool IsIdle { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
PlayerId
Gets or sets the id of the player that this client is tied to.
Declaration
uint PlayerId { get; set; }
Property Value
Type | Description |
---|---|
System.UInt32 |
Methods
| Improve this Doc View SourceAddKnownCreature(UInt32)
Adds the given creature to this client's known creatures collection.
Declaration
void AddKnownCreature(uint creatureId)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | creatureId | The id of the creature to add to the known creatures collection. |
ChooseCreatureToRemoveFromKnownSet(Int32)
Chooses a creature to remove from this player's known creatures collection, if it has reached the collection size limit.
Declaration
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. |
KnowsCreatureWithId(UInt32)
Checks if this client knows the given creature.
Declaration
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 client knows the creature, false otherwise. |
RemoveKnownCreature(UInt32)
Removes the given creature from this player's known collection.
Declaration
void RemoveKnownCreature(uint creatureId)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | creatureId | The id of the creature to remove from the known creatures collection. |
Send(IEnumerable<IOutboundPacket>)
Sends the packets supplied over the Connection.
Declaration
void Send(IEnumerable<IOutboundPacket> packetsToSend)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<IOutboundPacket> | packetsToSend | The packets to send. |