//
// PetManager.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 NosSmooth.LocalBinding.Errors;
using NosSmooth.LocalBinding.Options;
using Reloaded.Memory.Sources;
using Remora.Results;
namespace NosSmooth.LocalBinding.Structs;
///
/// NosTale pet manager.
///
public class PetManager : ControlManager
{
///
/// Initializes a new instance of the class.
///
public PetManager()
: base(null!, nuint.Zero)
{
}
///
/// Initializes a new instance of the class.
///
/// The memory.
/// The pet manager address.
public PetManager(IMemory memory, nuint petManagerAddress)
: base(memory, petManagerAddress)
{
}
///
/// Gets the player object.
///
public MapNpcObj Pet
{
get
{
Memory.SafeRead(Address + 0x7C, out int playerAddress);
return new MapNpcObj(Memory, (nuint)playerAddress);
}
}
///
public override MapBaseObj Entity => Pet;
}