Class Player
Class that represents all players in the game.
Inherited Members
Namespace: Fibula.Creatures
Assembly: Fibula.Creatures.dll
Syntax
public class Player : CombatantCreature, ICombatant, ICreatureWithSkills, ICreatureThatSensesOthers, IPlayer, ICreature, IThing, IContainedThing, IEquatable<IThing>, IThingContainer, ILocatable, IEquatable<ICreature>
Constructors
| Improve this Doc View SourcePlayer(IClient, String, String, UInt16, UInt16, UInt16, UInt16, UInt16)
Initializes a new instance of the Player class.
Declaration
public Player(IClient client, string characterId, string name, ushort maxHitpoints, ushort maxManapoints, ushort corpse, ushort hitpoints = 0, ushort manapoints = 0)
Parameters
Type | Name | Description |
---|---|---|
IClient | client | The client to associate this player to. |
System.String | characterId | The id of the character that this player represents. |
System.String | name | The name of the player. |
System.UInt16 | maxHitpoints | The maximum number of hitpoints that the player starts with. |
System.UInt16 | maxManapoints | The maximum number of manapoints that the player starts with. |
System.UInt16 | corpse | The id of the corpse for the player. |
System.UInt16 | hitpoints | Optional. The number of hitpoints that the player starts with. Defaults to |
System.UInt16 | manapoints | Optional. The number of manapoints that the player starts with. Defaults to |
Properties
| Improve this Doc View SourceAutoAttackRange
Gets the range that the auto attack has.
Declaration
public override byte AutoAttackRange { get; }
Property Value
Type | Description |
---|---|
System.Byte |
Overrides
| Improve this Doc View SourceCanBeMoved
Gets a value indicating whether this player can be moved by others.
Declaration
public override bool CanBeMoved { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
| Improve this Doc View SourceCharacterId
Gets the player's character id.
Declaration
public string CharacterId { get; }
Property Value
Type | Description |
---|---|
System.String |
Client
Gets the client associated to this player.
Declaration
public IClient Client { get; }
Property Value
Type | Description |
---|---|
IClient |
Inventory
Gets or sets the inventory for the player.
Declaration
public override sealed IInventory Inventory { get; protected set; }
Property Value
Type | Description |
---|---|
IInventory |
Overrides
| Improve this Doc View SourceIsAllowedToLogOut
Gets a value indicating whether this player is allowed to logout.
Declaration
public bool IsAllowedToLogOut { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
PermissionsLevel
Gets the player's permissions level.
Declaration
public byte PermissionsLevel { get; }
Property Value
Type | Description |
---|---|
System.Byte |
SoulPoints
Gets the player's soul points.
Declaration
public byte SoulPoints { get; }
Property Value
Type | Description |
---|---|
System.Byte |
Speed
Gets or sets this player's speed.
Declaration
public override ushort Speed { get; protected set; }
Property Value
Type | Description |
---|---|
System.UInt16 |
Overrides
Methods
| Improve this Doc View SourceAddToCombatList(ICombatant)
Starts tracking another ICombatant.
Declaration
public override void AddToCombatList(ICombatant otherCombatant)
Parameters
Type | Name | Description |
---|---|---|
ICombatant | otherCombatant | The other combatant, now in view. |
Overrides
| Improve this Doc View SourceApplyDamageModifiers(ref DamageInfo)
Applies damage modifiers to the damage information provided.
Declaration
protected override void ApplyDamageModifiers(ref DamageInfo damageInfo)
Parameters
Type | Name | Description |
---|---|---|
DamageInfo | damageInfo | The damage information. |
Overrides
| Improve this Doc View SourceCalculateMovementSpeed()
Calculates the base movement speed of the player.
Declaration
protected override ushort CalculateMovementSpeed()
Returns
Type | Description |
---|---|
System.UInt16 | The base movement speed of the player. |
Overrides
| Improve this Doc View SourceRemoveFromCombatList(ICombatant)
Stops tracking another ICombatant.
Declaration
public override void RemoveFromCombatList(ICombatant otherCombatant)
Parameters
Type | Name | Description |
---|---|---|
ICombatant | otherCombatant | The other combatant, now in view. |