Show / Hide Table of Contents

    Interface IGameOperationsApi

    Interface for the operations available in the game API.

    Namespace: Fibula.Mechanics.Contracts.Abstractions
    Assembly: Fibula.Mechanics.Contracts.dll
    Syntax
    public interface IGameOperationsApi

    Methods

    | Improve this Doc View Source

    AddOrAggregateCondition(IThing, ICondition, TimeSpan)

    Adds or aggregates a condition to an afflicted thing.

    Declaration
    void AddOrAggregateCondition(IThing thing, ICondition condition, TimeSpan duration)
    Parameters
    Type Name Description
    IThing thing

    The thing to check the conditions on.

    ICondition condition

    The condition to add or extend.

    System.TimeSpan duration

    The duration for the condition being added.

    | Improve this Doc View Source

    AfterThingLocationChanged(IThing, Location)

    Handles the aftermath a location change from a thing.

    Declaration
    void AfterThingLocationChanged(IThing thing, Location previousLocation)
    Parameters
    Type Name Description
    IThing thing

    The thing which's location changed.

    Location previousLocation

    The previous location of the thing.

    | Improve this Doc View Source

    CancelPlayerActions(IPlayer, Type, Boolean)

    Cancels all actions that a player has pending.

    Declaration
    void CancelPlayerActions(IPlayer player, Type typeOfActionToCancel = null, bool async = false)
    Parameters
    Type Name Description
    IPlayer player

    The player to cancel actions for.

    System.Type typeOfActionToCancel

    Optional. The specific type of action to cancel.

    System.Boolean async

    Optional. A value indicating whether to execute the cancellation asynchronously.

    | Improve this Doc View Source

    CreateItemAtLocation(Location, IItemTypeEntity, (ItemAttribute, IConvertible)[])

    Creates item at the specified location.

    Declaration
    void CreateItemAtLocation(Location location, IItemTypeEntity itemType, params (ItemAttribute, IConvertible)[] additionalAttributes)
    Parameters
    Type Name Description
    Location location

    The location at which to create the item.

    IItemTypeEntity itemType

    The type of item to create.

    System.ValueTuple<ItemAttribute, System.IConvertible>[] additionalAttributes

    Optional. Additional item attributes to set on the new item.

    | Improve this Doc View Source

    CreateItemAtLocation(Location, UInt16, (ItemAttribute, IConvertible)[])

    Creates a new item at the specified location.

    Declaration
    void CreateItemAtLocation(Location location, ushort itemTypeId, params (ItemAttribute, IConvertible)[] additionalAttributes)
    Parameters
    Type Name Description
    Location location

    The location at which to create the item.

    System.UInt16 itemTypeId

    The type id of the item to create.

    System.ValueTuple<ItemAttribute, System.IConvertible>[] additionalAttributes

    Optional. Additional item attributes to set on the new item.

    | Improve this Doc View Source

    CreatureSpeech(UInt32, SpeechType, ChatChannelType, String, String)

    Handles creature speech.

    Declaration
    void CreatureSpeech(uint creatureId, SpeechType speechType, ChatChannelType channelType, string content, string receiver = "")
    Parameters
    Type Name Description
    System.UInt32 creatureId

    The id of the creature.

    SpeechType speechType

    The type of speech.

    ChatChannelType channelType

    The type of channel of the speech.

    System.String content

    The content of the speech.

    System.String receiver

    Optional. The receiver of the speech, if any.

    | Improve this Doc View Source

    CreatureStatChanged(ICreature, IStat, UInt32, Byte)

    Handles a stat change event from a creature.

    Declaration
    void CreatureStatChanged(ICreature creature, IStat statThatChanged, uint previousValue, byte previousPercent)
    Parameters
    Type Name Description
    ICreature creature

    The creature for which the stat changed.

    IStat statThatChanged

    The stat that changed.

    System.UInt32 previousValue

    The previous stat value.

    System.Byte previousPercent

    The previous percent for the stat.

    | Improve this Doc View Source

    CreatureTurn(UInt32, ICreature, Direction)

    Turns a creature to a direction.

    Declaration
    void CreatureTurn(uint requestorId, ICreature creature, Direction direction)
    Parameters
    Type Name Description
    System.UInt32 requestorId

    The id of the creature.

    ICreature creature

    The creature to turn.

    Direction direction

    The direction to turn to.

    | Improve this Doc View Source

    LogPlayerIn(IClient, ICreatureCreationMetadata)

    Logs a player into the game.

    Declaration
    void LogPlayerIn(IClient client, ICreatureCreationMetadata creatureCreationMetadata)
    Parameters
    Type Name Description
    IClient client

    The client from which the player is connecting.

    ICreatureCreationMetadata creatureCreationMetadata

    The metadata for the player's creation.

    | Improve this Doc View Source

    LogPlayerOut(IPlayer)

    Logs a player out of the game.

    Declaration
    void LogPlayerOut(IPlayer player)
    Parameters
    Type Name Description
    IPlayer player

    The player to log out.

    | Improve this Doc View Source

    LookAt(UInt16, Location, Byte, IPlayer)

    Describes a thing for a player.

    Declaration
    void LookAt(ushort thingId, Location location, byte stackPosition, IPlayer player)
    Parameters
    Type Name Description
    System.UInt16 thingId

    The id of the thing to describe.

    Location location

    The location of the thing to describe.

    System.Byte stackPosition

    The position in the stack within the location of the thing to describe.

    IPlayer player

    The player for which to describe the thing for.

    | Improve this Doc View Source

    Movement(UInt32, UInt16, Location, Byte, UInt32, Location, UInt32, Byte)

    Moves a thing.

    Declaration
    void Movement(uint requestorId, ushort clientThingId, Location fromLocation, byte fromIndex, uint fromCreatureId, Location toLocation, uint toCreatureId, byte amount = 1)
    Parameters
    Type Name Description
    System.UInt32 requestorId

    The id of the creature requesting the move.

    System.UInt16 clientThingId

    The id of the thing being moved.

    Location fromLocation

    The location from which the thing is being moved.

    System.Byte fromIndex

    The index within the location from which the thing is being moved.

    System.UInt32 fromCreatureId

    The id of the creature from which the thing is being moved, if any.

    Location toLocation

    The location to which the thing is being moved.

    System.UInt32 toCreatureId

    The id of the creature to which the thing is being moved.

    System.Byte amount

    Optional. The amount of the thing to move. Defaults to 1.

    | Improve this Doc View Source

    PlaceMonsterAt(String, Location)

    Places a new monster of the given race, at the given location.

    Declaration
    void PlaceMonsterAt(string raceId, Location location)
    Parameters
    Type Name Description
    System.String raceId

    The id of race of monster to place.

    Location location

    The location at which to place the monster.

    | Improve this Doc View Source

    ResetCreatureDynamicWalkPlan(ICreature, ICreature, WalkPlanStrategy, Int32, Boolean)

    Resets a given creature's walk plan and kicks it off.

    Declaration
    void ResetCreatureDynamicWalkPlan(ICreature creature, ICreature targetCreature, WalkPlanStrategy strategy = WalkPlanStrategy.ConservativeRecalculation, int targetDistance = 1, bool excludeCurrentPosition = false)
    Parameters
    Type Name Description
    ICreature creature

    The creature to reset the walk plan of.

    ICreature targetCreature

    The creature towards which the walk plan will be generated to.

    WalkPlanStrategy strategy

    Optional. The strategy to follow in the plan.

    System.Int32 targetDistance

    Optional. The target distance to calculate from the target creature.

    System.Boolean excludeCurrentPosition

    Optional. A value indicating whether to exclude the current creature's position from being the goal location.

    | Improve this Doc View Source

    ResetCreatureStaticWalkPlan(ICreature, Direction[], WalkPlanStrategy)

    Resets a given creature's walk plan and kicks it off.

    Declaration
    void ResetCreatureStaticWalkPlan(ICreature creature, Direction[] directions, WalkPlanStrategy strategy = WalkPlanStrategy.DoNotRecalculate)
    Parameters
    Type Name Description
    ICreature creature

    The creature to reset the walk plan of.

    Direction[] directions

    The directions for the new plan.

    WalkPlanStrategy strategy

    Optional. The strategy to follow in the plan.

    | Improve this Doc View Source

    SendHeartbeat(IPlayer)

    Sends a heartbeat to the player's client.

    Declaration
    void SendHeartbeat(IPlayer player)
    Parameters
    Type Name Description
    IPlayer player

    The player which to send the heartbeat to.

    | Improve this Doc View Source

    SendHeartbeatResponse(IPlayer)

    Sends a heartbeat response to the player's client.

    Declaration
    void SendHeartbeatResponse(IPlayer player)
    Parameters
    Type Name Description
    IPlayer player

    The player which to send the heartbeat response to.

    | Improve this Doc View Source

    SkilledCreatureSkillChanged(ICreatureWithSkills, ISkill, UInt32, Byte, Nullable<Int64>)

    Handles a skill level change from a skilled creature.

    Declaration
    void SkilledCreatureSkillChanged(ICreatureWithSkills skilledCreature, ISkill skillThatChanged, uint previousLevel, byte previousPercent, long? countDelta = default(long? ))
    Parameters
    Type Name Description
    ICreatureWithSkills skilledCreature

    The skilled creature for which the skill changed.

    ISkill skillThatChanged

    The skill that changed.

    System.UInt32 previousLevel

    The previous skill level.

    System.Byte previousPercent

    The previous percent of completion to next level.

    System.Nullable<System.Int64> countDelta

    Optional. The delta in the count for this skill. Not always sent.

    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.