mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-21 15:27:43 +01:00
Implement ioc container
This commit is contained in:
parent
ff1d7f2829
commit
2fe8ccb1da
14 changed files with 247 additions and 248 deletions
|
|
@ -1,10 +1,15 @@
|
|||
using System;
|
||||
|
||||
using Dalamud.IoC;
|
||||
using Dalamud.IoC.Internal;
|
||||
|
||||
namespace Dalamud.Game.ClientState.Conditions
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides access to conditions (generally player state). You can check whether a player is in combat, mounted, etc.
|
||||
/// </summary>
|
||||
[PluginInterface]
|
||||
[InterfaceVersion("1.0")]
|
||||
public class Condition
|
||||
{
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ using System.Collections.Generic;
|
|||
using System.Reflection;
|
||||
|
||||
using Dalamud.Game.ClientState.JobGauge.Types;
|
||||
using Dalamud.IoC;
|
||||
using Dalamud.IoC.Internal;
|
||||
using Serilog;
|
||||
|
||||
namespace Dalamud.Game.ClientState.JobGauge
|
||||
|
|
@ -10,6 +12,8 @@ namespace Dalamud.Game.ClientState.JobGauge
|
|||
/// <summary>
|
||||
/// This class converts in-memory Job gauge data to structs.
|
||||
/// </summary>
|
||||
[PluginInterface]
|
||||
[InterfaceVersion("1.0")]
|
||||
public class JobGauges
|
||||
{
|
||||
private Dictionary<Type, JobGaugeBase> cache = new();
|
||||
|
|
|
|||
|
|
@ -46,11 +46,10 @@ namespace Dalamud.Game.Gui
|
|||
/// </summary>
|
||||
internal GameGui()
|
||||
{
|
||||
this.address = new GameGuiAddressResolver(this.address.BaseAddress);
|
||||
this.address = new GameGuiAddressResolver();
|
||||
this.address.Setup();
|
||||
|
||||
Log.Verbose("===== G A M E G U I =====");
|
||||
|
||||
Log.Verbose($"GameGuiManager address 0x{this.address.BaseAddress.ToInt64():X}");
|
||||
Log.Verbose($"SetGlobalBgm address 0x{this.address.SetGlobalBgm.ToInt64():X}");
|
||||
Log.Verbose($"HandleItemHover address 0x{this.address.HandleItemHover.ToInt64():X}");
|
||||
|
|
|
|||
|
|
@ -11,10 +11,9 @@ namespace Dalamud.Game.Gui
|
|||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GameGuiAddressResolver"/> class.
|
||||
/// </summary>
|
||||
/// <param name="baseAddress">The base address of the native GuiManager class.</param>
|
||||
public GameGuiAddressResolver(IntPtr baseAddress)
|
||||
public GameGuiAddressResolver()
|
||||
{
|
||||
this.BaseAddress = baseAddress;
|
||||
this.BaseAddress = Service<Framework>.Get().Address.BaseAddress;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue