fix: update offsets for 5.3
This commit is contained in:
parent
7945690c7a
commit
6a09f0e72c
@ -311,14 +311,14 @@ namespace PeepingTom {
|
||||
|
||||
if (this.plugin.Interface.ClientState.LocalPlayer != null) {
|
||||
PlayerCharacter player = this.plugin.Interface.ClientState.LocalPlayer;
|
||||
IntPtr statusPtr = this.plugin.Interface.TargetModuleScanner.ResolveRelativeAddress(player.Address, 0x1901);
|
||||
IntPtr statusPtr = this.plugin.Interface.TargetModuleScanner.ResolveRelativeAddress(player.Address, 0x1906);
|
||||
byte status = Marshal.ReadByte(statusPtr);
|
||||
ImGui.Text($"Status: {status}");
|
||||
}
|
||||
|
||||
PlayerCharacter currentTarget = this.GetCurrentTarget();
|
||||
if (currentTarget != null) {
|
||||
IntPtr statusPtr = this.plugin.Interface.TargetModuleScanner.ResolveRelativeAddress(currentTarget.Address, 0x1901);
|
||||
IntPtr statusPtr = this.plugin.Interface.TargetModuleScanner.ResolveRelativeAddress(currentTarget.Address, 0x1906);
|
||||
byte status = Marshal.ReadByte(statusPtr);
|
||||
ImGui.Text($"Target status: {status}");
|
||||
}
|
||||
|
@ -146,24 +146,24 @@ namespace PeepingTom {
|
||||
return actors
|
||||
.Where(actor => actor.TargetActorID == player.ActorId && actor is PlayerCharacter)
|
||||
.Select(actor => actor as PlayerCharacter)
|
||||
.Where(actor => this.plugin.Config.LogParty || !this.InParty(actor))
|
||||
.Where(actor => this.plugin.Config.LogAlliance || !this.InAlliance(actor))
|
||||
.Where(actor => this.plugin.Config.LogInCombat || !this.InCombat(actor))
|
||||
.Where(actor => this.plugin.Config.LogParty || !InParty(actor))
|
||||
.Where(actor => this.plugin.Config.LogAlliance || !InAlliance(actor))
|
||||
.Where(actor => this.plugin.Config.LogInCombat || !InCombat(actor))
|
||||
.Where(actor => this.plugin.Config.LogSelf || actor.ActorId != player.ActorId)
|
||||
.Select(actor => new Targeter(actor))
|
||||
.ToArray();
|
||||
}
|
||||
|
||||
private byte GetStatus(Actor actor) {
|
||||
IntPtr statusPtr = this.plugin.Interface.TargetModuleScanner.ResolveRelativeAddress(actor.Address, 0x1901);
|
||||
private static byte GetStatus(Actor actor) {
|
||||
IntPtr statusPtr = actor.Address + 0x1906; // updated 5.3
|
||||
return Marshal.ReadByte(statusPtr);
|
||||
}
|
||||
|
||||
private bool InCombat(Actor actor) => (this.GetStatus(actor) & 2) > 0;
|
||||
private static bool InCombat(Actor actor) => (GetStatus(actor) & 2) > 0;
|
||||
|
||||
private bool InParty(Actor actor) => (this.GetStatus(actor) & 16) > 0;
|
||||
private static bool InParty(Actor actor) => (GetStatus(actor) & 16) > 0;
|
||||
|
||||
private bool InAlliance(Actor actor) => (this.GetStatus(actor) & 32) > 0;
|
||||
private static bool InAlliance(Actor actor) => (GetStatus(actor) & 32) > 0;
|
||||
|
||||
private bool CanPlaySound() {
|
||||
if (!this.plugin.Config.PlaySoundOnTarget) {
|
||||
|
Loading…
Reference in New Issue
Block a user