Show / Hide Table of Contents

    Class Player

    Class that represents all players in the game.

    Inheritance
    System.Object
    Thing
    Creature
    CombatantCreature
    Player
    Implements
    ICombatant
    ICreatureWithSkills
    ICreatureThatSensesOthers
    IPlayer
    ICreature
    IThing
    IContainedThing
    System.IEquatable<IThing>
    IThingContainer
    ILocatable
    System.IEquatable<ICreature>
    Inherited Members
    CombatantCreature.Death
    CombatantCreature.AttackTargetChanged
    CombatantCreature.FollowTargetChanged
    CombatantCreature.SkillChanged
    CombatantCreature.ChaseTarget
    CombatantCreature.AutoAttackTarget
    CombatantCreature.AttackSpeed
    CombatantCreature.DefenseSpeed
    CombatantCreature.FightMode
    CombatantCreature.ChaseMode
    CombatantCreature.DamageTakenInSession
    CombatantCreature.AttackedBy
    CombatantCreature.Skills
    CombatantCreature.SetAttackTarget(ICombatant)
    CombatantCreature.SetFollowTarget(ICreature)
    CombatantCreature.CalculateSkillPercent(SkillType)
    CombatantCreature.SetAttackedBy(ICombatant)
    CombatantCreature.UnsetAttackedBy(ICombatant)
    CombatantCreature.ApplyDamage(DamageInfo, UInt32)
    CombatantCreature.IncreaseAttackSpeed(Decimal)
    CombatantCreature.DecreaseAttackSpeed(Decimal)
    CombatantCreature.IncreaseDefenseSpeed(Decimal)
    CombatantCreature.DecreaseDefenseSpeed(Decimal)
    CombatantCreature.RaiseSkillChange(SkillType, UInt32, Byte)
    Creature.StatChanged
    Creature.CreatureSensed
    Creature.CreatureSeen
    Creature.CreatureLost
    Creature.TypeId
    Creature.Id
    Creature.Article
    Creature.Name
    Creature.CorpseTypeId
    Creature.CarryLocation
    Creature.EmittedLightLevel
    Creature.EmittedLightColor
    Creature.VariableSpeed
    Creature.Flags
    Creature.BloodType
    Creature.Outfit
    Creature.Direction
    Creature.LastMovementCostModifier
    Creature.WalkPlan
    Creature.TrackedCreatures
    Creature.IsDead
    Creature.CanWalk
    Creature.Stats
    Creature.StartSensingCreature(ICreature)
    Creature.StopSensingCreature(ICreature)
    Creature.CanSee(ICreature)
    Creature.CanSee(Location)
    Creature.AddContent(IThingFactory, IThing, Byte)
    Creature.RemoveContent(IThingFactory, IThing, Byte, Byte)
    Creature.ReplaceContent(IThingFactory, IThing, IThing, Byte, Byte)
    Creature.FindThingAtIndex(Byte)
    Creature.DescribeForLogger()
    Creature.Equals(ICreature)
    Creature.RaiseStatChange(CreatureStat, UInt32, Byte)
    Thing.LocationChanged
    Thing.UniqueId
    Thing.ParentContainer
    Thing.Location
    Thing.TrackedEvents
    Thing.Conditions
    Thing.RaiseLocationChanged(Location)
    Thing.ToString()
    Thing.Equals(IThing)
    Thing.StartTrackingEvent(IEvent, String)
    Thing.StopTrackingEvent(IEvent, String)
    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)
    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 Source

    Player(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 maxHitpoints.

    System.UInt16 manapoints

    Optional. The number of manapoints that the player starts with. Defaults to maxManapoints.

    Properties

    | Improve this Doc View Source

    AutoAttackRange

    Gets the range that the auto attack has.

    Declaration
    public override byte AutoAttackRange { get; }
    Property Value
    Type Description
    System.Byte
    Overrides
    CombatantCreature.AutoAttackRange
    | Improve this Doc View Source

    CanBeMoved

    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
    Thing.CanBeMoved
    | Improve this Doc View Source

    CharacterId

    Gets the player's character id.

    Declaration
    public string CharacterId { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    Client

    Gets the client associated to this player.

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

    Inventory

    Gets or sets the inventory for the player.

    Declaration
    public override sealed IInventory Inventory { get; protected set; }
    Property Value
    Type Description
    IInventory
    Overrides
    Creature.Inventory
    | Improve this Doc View Source

    IsAllowedToLogOut

    Gets a value indicating whether this player is allowed to logout.

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

    PermissionsLevel

    Gets the player's permissions level.

    Declaration
    public byte PermissionsLevel { get; }
    Property Value
    Type Description
    System.Byte
    | Improve this Doc View Source

    SoulPoints

    Gets the player's soul points.

    Declaration
    public byte SoulPoints { get; }
    Property Value
    Type Description
    System.Byte
    | Improve this Doc View Source

    Speed

    Gets or sets this player's speed.

    Declaration
    public override ushort Speed { get; protected set; }
    Property Value
    Type Description
    System.UInt16
    Overrides
    Creature.Speed

    Methods

    | Improve this Doc View Source

    AddToCombatList(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
    CombatantCreature.AddToCombatList(ICombatant)
    | Improve this Doc View Source

    ApplyDamageModifiers(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
    CombatantCreature.ApplyDamageModifiers(ref DamageInfo)
    | Improve this Doc View Source

    CalculateMovementSpeed()

    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
    Creature.CalculateMovementSpeed()
    | Improve this Doc View Source

    RemoveFromCombatList(ICombatant)

    Stops tracking another ICombatant.

    Declaration
    public override void RemoveFromCombatList(ICombatant otherCombatant)
    Parameters
    Type Name Description
    ICombatant otherCombatant

    The other combatant, now in view.

    Overrides
    CombatantCreature.RemoveFromCombatList(ICombatant)

    Implements

    ICombatant
    ICreatureWithSkills
    ICreatureThatSensesOthers
    IPlayer
    ICreature
    IThing
    IContainedThing
    System.IEquatable<T>
    IThingContainer
    ILocatable
    System.IEquatable<T>

    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.