style: reformat

This commit is contained in:
Anna 2022-05-10 23:58:40 -04:00
parent d64db95416
commit 2e0e2a9e38
10 changed files with 63 additions and 61 deletions

View File

@ -180,10 +180,10 @@ internal class AppearanceRepository {
var mainEquipCategory = mainHand.EquipSlotCategory.Value!;
var offHand =
mainEquipCategory.MainHand != 0 && mainEquipCategory.OffHand != 0
? null
: usesOffHand
? this.JobOffHands[jobId][random.Next(0, this.JobOffHands[jobId].Count)]
: null;
? null
: usesOffHand
? this.JobOffHands[jobId][random.Next(0, this.JobOffHands[jobId].Count)]
: null;
return (mainHand, offHand);
}

View File

@ -23,29 +23,28 @@ internal class Configuration : IPluginConfiguration {
public Sex PreferredSex = Sex.Female | Sex.Male;
public int PreferredRaces = 1 << 1
| 1 << 2
| 1 << 3
| 1 << 4
| 1 << 5
| 1 << 6
| 1 << 7
| 1 << 8;
public int PreferredTribes = 1 << 1
| 1 << 2
| 1 << 3
| 1 << 4
| 1 << 5
| 1 << 6
| 1 << 7
| 1 << 8;
public int PreferredTribes = 1 << 1
| 1 << 2
| 1 << 3
| 1 << 4
| 1 << 5
| 1 << 6
| 1 << 7
| 1 << 8
| 1 << 9
| 1 << 10
| 1 << 11
| 1 << 12
| 1 << 13
| 1 << 14
| 1 << 15
| 1 << 16;
| 1 << 8
| 1 << 9
| 1 << 10
| 1 << 11
| 1 << 12
| 1 << 13
| 1 << 14
| 1 << 15
| 1 << 16;
}

View File

@ -10,6 +10,7 @@ using Dalamud.Game.ClientState.Objects.Enums;
using Dalamud.Game.ClientState.Objects.Types;
using Dalamud.Game.Text;
using Dalamud.Game.Text.SeStringHandling;
using Dalamud.Game.Text.SeStringHandling.Payloads;
using FFXIVClientStructs.FFXIV.Client.Game.Group;
using XivCommon.Functions.NamePlates;
using GameObject = FFXIVClientStructs.FFXIV.Client.Game.Object.GameObject;
@ -77,6 +78,10 @@ internal class Obscurer : IDisposable {
var text = Util.ReadRawSeString(textPtr);
if (text.Payloads.All(payload => payload is not TextPayload)) {
return;
}
var tval = text.TextValue;
if (string.IsNullOrWhiteSpace(tval) || tval.All(c => !char.IsLetter(c)) || Coords.IsMatch(tval)) {
return;
@ -173,8 +178,6 @@ internal class Obscurer : IDisposable {
Wrists = 7,
RightRing = 8,
LeftRing = 9,
MainHand = 10,
OffHand = 11,
}
private unsafe void OnFlagSlotUpdate(GameObject* gameObj, uint slot, EquipData* equipData) {
@ -202,8 +205,8 @@ internal class Obscurer : IDisposable {
EquipSlot.Wrists => (npc.ModelWrists, npc.DyeWrists.Row),
EquipSlot.RightRing => (npc.ModelRightRing, npc.DyeRightRing.Row),
EquipSlot.LeftRing => (npc.ModelLeftRing, npc.DyeLeftRing.Row),
EquipSlot.MainHand => (mainHand.ModelMain, npc.DyeMainHand.Row),
EquipSlot.OffHand => (mainHand.ModelSub != 0 ? mainHand.ModelSub : offHand?.ModelMain ?? 0, npc.DyeOffHand.Row),
// EquipSlot.MainHand => (mainHand.ModelMain, npc.DyeMainHand.Row),
// EquipSlot.OffHand => (mainHand.ModelSub != 0 ? mainHand.ModelSub : offHand?.ModelMain ?? 0, npc.DyeOffHand.Row),
_ => (uint.MaxValue, uint.MaxValue),
};

View File

@ -137,7 +137,7 @@ internal class PluginUi : IDisposable {
this.Plugin.Functions.LoadSheet(Util.SheetName);
}
if (this.Plugin.TargetManager.Target is {} target) {
if (this.Plugin.TargetManager.Target is { } target) {
var npc = this.Plugin.AppearanceRepository.GetNpc(target.ObjectId);
ImGui.TextUnformatted(npc.ToString());
ImGui.TextUnformatted(this.Plugin.DataManager.GetExcelSheet<ENpcResident>()!.GetRow(npc.RowId)!.Singular);