Improvements (#903)

This commit is contained in:
kizer 2022-06-29 18:51:40 +09:00 committed by GitHub
parent e9cd7e0273
commit 716736f022
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
55 changed files with 1809 additions and 872 deletions

View file

@ -20,12 +20,15 @@ namespace Dalamud.Game.ClientState.Party
private const int GroupLength = 8;
private const int AllianceLength = 20;
[ServiceManager.ServiceDependency]
private readonly ClientState clientState = Service<ClientState>.Get();
private readonly ClientStateAddressResolver address;
[ServiceManager.ServiceConstructor]
private PartyList(ClientState clientState)
private PartyList()
{
this.address = clientState.AddressResolver;
this.address = this.clientState.AddressResolver;
Log.Verbose($"Group manager address 0x{this.address.GroupManager.ToInt64():X}");
}
@ -115,9 +118,7 @@ namespace Dalamud.Game.ClientState.Party
/// <returns>The party member object containing the requested data.</returns>
public PartyMember? CreatePartyMemberReference(IntPtr address)
{
var clientState = Service<ClientState>.Get();
if (clientState.LocalContentId == 0)
if (this.clientState.LocalContentId == 0)
return null;
if (address == IntPtr.Zero)
@ -146,9 +147,7 @@ namespace Dalamud.Game.ClientState.Party
/// <returns>The party member object containing the requested data.</returns>
public PartyMember? CreateAllianceMemberReference(IntPtr address)
{
var clientState = Service<ClientState>.Get();
if (clientState.LocalContentId == 0)
if (this.clientState.LocalContentId == 0)
return null;
if (address == IntPtr.Zero)