// returns 2 bits (b01 == display name, b10 == display hp) private byte ShouldDisplayNameplateDetour(IntPtr raptureAtkModule, GameObject *actor, GameObject *localPlayer, float distance) { if (actor->ObjectKind != (byte)ObjectKind.Pc) { goto ReturnOriginal; } var pc = (BattleChara *)actor; var targets = TargetSystem.Instance(); if (actor == localPlayer || // Ignore localplayer (((BattleChara *)localPlayer)->Character.StatusFlags & 2) == 0 || // Alternate in combat flag GetTargetType(actor) == 3 || (config.IgnoreParty && (pc->Character.StatusFlags & 16) > 0) || // Ignore party members (config.IgnoreAlliance && (pc->Character.StatusFlags & 32) > 0) || // Ignore alliance members (config.IgnoreFriends && (pc->Character.StatusFlags & 64) > 0) || // Ignore friends (config.IgnoreDead && pc->Character.Health == 0) // Ignore dead players // Ignore targets || (config.IgnoreTargets && targets->Target == actor || targets->SoftTarget == actor || targets->FocusTarget == actor)) { goto ReturnOriginal; } return((byte)(config.ShowHP ? (shouldDisplayNameplateHook.Original(raptureAtkModule, actor, localPlayer, distance) & ~1) : 0)); // Ignore HP ReturnOriginal: return(shouldDisplayNameplateHook.Original(raptureAtkModule, actor, localPlayer, distance)); }