Compare commits
4 Commits
b0f9835a1b
...
1ba35b67c9
Author | SHA1 | Date |
---|---|---|
Anna | 1ba35b67c9 | |
Anna | 13f4da7283 | |
Anna | a0e3e5f6a8 | |
Anna | 0553e1ceb3 |
|
@ -47,5 +47,4 @@ internal class Configuration : IPluginConfiguration {
|
|||
| 1 << 14
|
||||
| 1 << 15
|
||||
| 1 << 16;
|
||||
|
||||
}
|
||||
|
|
|
@ -77,6 +77,10 @@ internal class Obscurer : IDisposable {
|
|||
|
||||
var text = Util.ReadRawSeString(textPtr);
|
||||
|
||||
if (text.Payloads.All(payload => payload.Type != PayloadType.RawText)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var tval = text.TextValue;
|
||||
if (string.IsNullOrWhiteSpace(tval) || tval.All(c => !char.IsLetter(c)) || Coords.IsMatch(tval)) {
|
||||
return;
|
||||
|
@ -106,8 +110,7 @@ internal class Obscurer : IDisposable {
|
|||
return false;
|
||||
}
|
||||
|
||||
var gameChara = (FFXIVClientStructs.FFXIV.Client.Game.Character.Character*) chara.Address;
|
||||
var name = Marshal.PtrToStringUTF8((IntPtr) gameChara->GameObject.Name)!;
|
||||
var name = chara.RawName()!;
|
||||
|
||||
if (this.Plugin.Config.ObscureAppearancesExcludeFriends && this.Friends.Contains(name)) {
|
||||
return false;
|
||||
|
@ -173,8 +176,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 +203,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),
|
||||
};
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -24,9 +24,7 @@ internal static class Util {
|
|||
//
|
||||
// break;
|
||||
case TextPayload txt:
|
||||
if (txt.Text.Contains(name)) {
|
||||
txt.Text = txt.Text.Replace(name, replacement);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue