Class NetworkMessageExtensions
Static class that defines extension methods for an INetworkMessage.
Inheritance
Inherited Members
Namespace: Fibula.Protocol.V772.Extensions
Assembly: Fibula.Protocol.V772.dll
Syntax
public static class NetworkMessageExtensions
Methods
| Improve this Doc View SourceAddCreature(INetworkMessage, ICreature, Boolean, UInt32)
Add a ICreature's description to the message.
Declaration
public static void AddCreature(this INetworkMessage message, ICreature creature, bool asKnown, uint creatureToRemoveId)
Parameters
Type | Name | Description |
---|---|---|
INetworkMessage | message | The message to add the creature description to. |
ICreature | creature | The creature to describe and add. |
System.Boolean | asKnown | A value indicating whether this creature is known. |
System.UInt32 | creatureToRemoveId | The id of another creature to replace if the client buffer is known to be full. |
AddItem(INetworkMessage, IItem)
Adds an IItem's description to a message.
Declaration
public static void AddItem(this INetworkMessage message, IItem item)
Parameters
Type | Name | Description |
---|---|---|
INetworkMessage | message | The message to add the item description to. |
IItem | item | The item to describe and add. |
AddLocation(INetworkMessage, Location)
Adds a Location's description to the message.
Declaration
public static void AddLocation(this INetworkMessage message, Location location)
Parameters
Type | Name | Description |
---|---|---|
INetworkMessage | message | The message to add the location to. |
Location | location | The location to add. |
AddOutfit(INetworkMessage, Outfit)
Adds an Outfit's description to the message.
Declaration
public static void AddOutfit(this INetworkMessage message, Outfit outfit)
Parameters
Type | Name | Description |
---|---|---|
INetworkMessage | message | The message to add the outfit to. |
Outfit | outfit | The outfit to add. |
PrepareToSend(INetworkMessage, UInt32[])
Prepares an INetworkMessage to be sent, encrypting it with the supplied key.
Declaration
public static bool PrepareToSend(this INetworkMessage message, uint[] xteaKey)
Parameters
Type | Name | Description |
---|---|---|
INetworkMessage | message | The message to prepare. |
System.UInt32[] | xteaKey | The XTea key to encrypt with. |
Returns
Type | Description |
---|---|
System.Boolean | True if the message is prepared successfully, false otherwise. |
ToLiquidColor(LiquidType)
Converts a LiquidType to the client supported LiquidColor.
Declaration
public static LiquidColor ToLiquidColor(this LiquidType liquidType)
Parameters
Type | Name | Description |
---|---|---|
LiquidType | liquidType | The type of liquid. |
Returns
Type | Description |
---|---|
LiquidColor | The color supported by the client. |
XteaDecrypt(INetworkMessage, UInt32[])
Attempts to decrypt the message using XTea keys.
Declaration
public static bool XteaDecrypt(this INetworkMessage message, uint[] key)
Parameters
Type | Name | Description |
---|---|---|
INetworkMessage | message | The message to act on. |
System.UInt32[] | key | The key to use. |
Returns
Type | Description |
---|---|
System.Boolean | True if the message could be decrypted, false otherwise. |
XteaEncrypt(INetworkMessage, UInt32[])
Attempts to encrypt the message using XTea keys.
Declaration
public static bool XteaEncrypt(this INetworkMessage message, uint[] key)
Parameters
Type | Name | Description |
---|---|---|
INetworkMessage | message | The message to act on. |
System.UInt32[] | key | The XTEA key. |
Returns
Type | Description |
---|---|
System.Boolean | True if the encryption succeeds, false otherwise. |