// // IHookManager.cs // // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using Remora.Results; namespace NosSmooth.LocalBinding.Hooks; /// /// A manager holding all NosTale hooks with actions to execute on all of them. /// public interface IHookManager { /// /// A name of packet send hook. /// public const string PacketSendName = "NetworkManager.PacketSend"; /// /// A name of packet receive hook. /// public const string PacketReceiveName = "NetworkManager.PacketReceive"; /// /// A name of character walk hook. /// public const string CharacterWalkName = "CharacterManager.Walk"; /// /// A name of pet walk hook. /// public const string PetWalkName = "PetManager.Walk"; /// /// A name of entity follow hook. /// public const string EntityFollowName = "CharacterManager.EntityFollow"; /// /// A name of entity unfollow hook. /// public const string EntityUnfollowName = "CharacterManager.EntityUnfollow"; /// /// A name of entity focus hook. /// public const string EntityFocusName = "UnitManager.EntityFocus"; /// /// A name of periodic hook. /// public const string PeriodicName = "Periodic"; /// /// Gets the packet send hook. /// public IPacketSendHook PacketSend { get; } /// /// Gets the packet receive hook. /// public IPacketReceiveHook PacketReceive { get; } /// /// Gets the player walk hook. /// public IPlayerWalkHook PlayerWalk { get; } /// /// Gets the entity follow hook. /// public IEntityFollowHook EntityFollow { get; } /// /// Gets the entity unfollow hook. /// public IEntityUnfollowHook EntityUnfollow { get; } /// /// Gets the player walk hook. /// public IPetWalkHook PetWalk { get; } /// /// Gets the entity focus hook. /// public IEntityFocusHook EntityFocus { get; } /// /// Gets the periodic function hook. /// /// /// May be any function that is called periodically. /// This is used for synchronizing using . /// public IPeriodicHook Periodic { get; } /// /// Gets all of the hooks. /// public IReadOnlyList Hooks { get; } /// /// Initializes all hooks. /// /// The binding manager. /// The browser manager. /// A result that may or may not have failed. public IResult Initialize(NosBindingManager bindingManager, NosBrowserManager browserManager); /// /// Enable hooks from the given list. /// /// /// Use constants from , /// such as IHookManager.PacketSendName. /// /// The hooks to enable. public void Enable(IEnumerable names); /// /// Disable hooks from the given list. /// /// /// Use constants from , /// such as IHookManager.PacketSendName. /// /// The hooks to disable. public void Disable(IEnumerable names); /// /// Disable all hooks. /// public void DisableAll(); /// /// Enable all hooks. /// public void EnableAll(); }