Skip to content

Commit 76c165e

Browse files
committed
Patch 7.5
1 parent 46ac207 commit 76c165e

23 files changed

Lines changed: 177 additions & 180 deletions

ArtemisRoleplayingKit/CoreLogic/DataCleanup.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Dalamud.Game.ClientState.Objects.Types;
1+
using Dalamud.Game.ClientState.Objects.Types;
22
using Dalamud.Game.Config;
33
using Dalamud.Plugin;
44
using FFXIVClientStructs.FFXIV.Client.Game;
@@ -95,7 +95,7 @@ private void _clientState_LeavePvP() {
9595
CleanSounds();
9696
}
9797

98-
private void _clientState_TerritoryChanged(ushort e) {
98+
private void _clientState_TerritoryChanged(uint e) {
9999
if (config.DebugMode) {
100100
_chat?.Print("Territory is " + e);
101101
}

ArtemisRoleplayingKit/CoreLogic/DynamicEmoting.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Dalamud.Game.ClientState.Objects.Types;
1+
using Dalamud.Game.ClientState.Objects.Types;
22
using Dalamud.Game.Text.SeStringHandling;
33
using Dalamud.Game.Text;
44
using Dalamud.Plugin;
@@ -81,7 +81,7 @@ private unsafe void CheckForNewDynamicEmoteRequests() {
8181
character.ObjectKind == ObjectKind.BattleNpc ||
8282
character.ObjectKind == ObjectKind.EventNpc) && config.DebugMode) ||
8383
character.ObjectKind == ObjectKind.Companion ||
84-
character.ObjectKind == ObjectKind.Housing) {
84+
character.ObjectKind == (ObjectKind)12 /* Housing */) {
8585
if (!IsPartOfQuestOrImportant(character as Dalamud.Game.ClientState.Objects.Types.IGameObject)) {
8686
if (character.ObjectKind != ObjectKind.Companion || PenumbraAndGlamourerHelperFunctions.IsHumanoid(character)) {
8787
characters.Add(character);
@@ -201,7 +201,7 @@ public Dalamud.Game.ClientState.Objects.Types.IGameObject[] GetNearestObjects()
201201
gameObjects.Add((item as Dalamud.Game.ClientState.Objects.Types.IGameObject));
202202
// }
203203
}
204-
if (item.ObjectKind == ObjectKind.Player) {
204+
if (item.ObjectKind == ObjectKind.Pc) {
205205
_playerCount++;
206206
}
207207
}

ArtemisRoleplayingKit/CoreLogic/SoundManagement.cs

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using Dalamud.Game;
1+
using Dalamud.Game;
2+
using Dalamud.Game.Chat;
23
using Dalamud.Game.ClientState.Objects.Enums;
34
using Dalamud.Game.ClientState.Objects.SubKinds;
45
using Dalamud.Game.ClientState.Objects.Types;
@@ -133,7 +134,7 @@ private unsafe void framework_Update(IFramework framework) {
133134
}
134135
}
135136
} catch (Exception e) {
136-
Plugin.PluginLog.Error(e, e.Message);
137+
Plugin.PluginLog.Error(e, "[framework_Update] " + e.Message);
137138
}
138139
}
139140

@@ -187,7 +188,7 @@ private void CheckForCustomEmoteTriggers() {
187188
_emoteSyncCheck.Restart();
188189
try {
189190
foreach (Dalamud.Game.ClientState.Objects.Types.IGameObject item in _objectTable) {
190-
if ((item as IGameObject).ObjectKind == ObjectKind.Player && item.Name.TextValue != _threadSafeObjectTable.LocalPlayer.Name.TextValue) {
191+
if ((item as IGameObject).ObjectKind == ObjectKind.Pc && item.Name.TextValue != _threadSafeObjectTable.LocalPlayer.Name.TextValue) {
191192
string[] senderStrings = SplitCamelCase(RemoveSpecialSymbols(item.Name.TextValue)).Split(" ");
192193
bool isShoutYell = false;
193194
if (senderStrings.Length > 2) {
@@ -196,7 +197,7 @@ private void CheckForCustomEmoteTriggers() {
196197
var task = Task.Run(async delegate () {
197198
try {
198199
Vector3 lastPosition = item.Position;
199-
int startingTerritoryId = _clientState.TerritoryType;
200+
uint startingTerritoryId = _clientState.TerritoryType;
200201
while (!disposed && _clientState.IsLoggedIn &&
201202
startingTerritoryId == _clientState.TerritoryType && boundByDuty) {
202203
if (boundByDuty && inCombat) {
@@ -211,7 +212,7 @@ private void CheckForCustomEmoteTriggers() {
211212
_addonTalkHandler.TriggerEmote((item as ICharacter).Address, animation);
212213
lastPosition = item.Position;
213214
_ = Task.Run(() => {
214-
int startingTerritoryId = _clientState.TerritoryType;
215+
uint startingTerritoryId = _clientState.TerritoryType;
215216
while (true) {
216217
Thread.Sleep(500);
217218
if ((Vector3.Distance(item.Position, lastPosition) > 0.001f)) {
@@ -242,7 +243,7 @@ private void CheckForCustomEmoteTriggers() {
242243
task = Task.Run(async delegate () {
243244
try {
244245
Vector3 lastPosition = item.Position;
245-
int startingTerritoryId = _clientState.TerritoryType;
246+
uint startingTerritoryId = _clientState.TerritoryType;
246247
while (!disposed && _clientState.IsLoggedIn &&
247248
startingTerritoryId == _clientState.TerritoryType && boundByDuty) {
248249
if (boundByDuty && inCombat) {
@@ -261,7 +262,7 @@ private void CheckForCustomEmoteTriggers() {
261262
var gameObject = ((FFXIVClientStructs.FFXIV.Client.Game.Object.GameObject*)companion->CompanionObject);
262263
lastPosition = gameObject->Position;
263264
_ = Task.Run(() => {
264-
int startingTerritoryId = _clientState.TerritoryType;
265+
uint startingTerritoryId = _clientState.TerritoryType;
265266
while (true) {
266267
Thread.Sleep(500);
267268
if ((Vector3.Distance(gameObject->Position, lastPosition) > 0.001f)) {
@@ -493,9 +494,10 @@ private unsafe void CheckForCustomMountingAudio() {
493494
}
494495
}
495496

496-
private void Chat_ChatMessage(XivChatType type, int timestamp, ref SeString sender, ref SeString message, ref bool isHandled) {
497-
var storedSender = sender;
498-
var storedMessage = message;
497+
private void Chat_ChatMessage(IHandleableChatMessage msg) {
498+
var type = msg.LogKind;
499+
var storedSender = msg.Sender;
500+
var storedMessage = msg.Message;
499501
Task.Run(delegate () {
500502
if (!disposed) {
501503
CheckDependancies();
@@ -547,7 +549,7 @@ private void Chat_ChatMessage(XivChatType type, int timestamp, ref SeString send
547549
case XivChatType.Alliance:
548550
case XivChatType.PvPTeam:
549551
if ((type != XivChatType.Shout && type != XivChatType.Yell) || IsResidential()) {
550-
ChatText(playerName, storedMessage, type, timestamp);
552+
ChatText(playerName, storedMessage, type, msg.Timestamp);
551553
}
552554
break;
553555
case XivChatType.NPCDialogue:
@@ -683,7 +685,7 @@ private void ChatText(string sender, SeString message, XivChatType type, int tim
683685
bool audioFocus = false;
684686
if (_threadSafeObjectTable.LocalPlayer.TargetObject != null) {
685687
if (_threadSafeObjectTable.LocalPlayer.TargetObject.ObjectKind ==
686-
ObjectKind.Player) {
688+
ObjectKind.Pc) {
687689
audioFocus = _threadSafeObjectTable.LocalPlayer.TargetObject.Name.TextValue == sender
688690
|| type == XivChatType.Party
689691
|| type == XivChatType.CrossParty || isShoutYell;
@@ -1064,7 +1066,7 @@ private void CheckForMovingObjects() {
10641066
_checkingMovementInProgress = true;
10651067
try {
10661068
foreach (IGameObject gameObject in _objectTable) {
1067-
if (gameObject.ObjectKind == ObjectKind.Player) {
1069+
if (gameObject.ObjectKind == ObjectKind.Pc) {
10681070
string cleanedName = CleanSenderName(gameObject.Name.TextValue);
10691071
if (!string.IsNullOrEmpty(cleanedName)) {
10701072
if (gameObjectPositions.ContainsKey(cleanedName)) {

ArtemisRoleplayingKit/CoreLogic/TriggerAnimationMods.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Dalamud.Game.ClientState.Objects.Enums;
1+
using Dalamud.Game.ClientState.Objects.Enums;
22
using Dalamud.Game.ClientState.Objects.Types;
33
using Dalamud.Plugin;
44
using Dalamud.Plugin.Services;
@@ -71,7 +71,7 @@ private void CheckNPCEmoteControl(string[] splitArgs, string args) {
7171
character.ObjectKind == ObjectKind.BattleNpc ||
7272
character.ObjectKind == ObjectKind.EventNpc ||
7373
character.ObjectKind == ObjectKind.Companion ||
74-
character.ObjectKind == ObjectKind.Housing) {
74+
character.ObjectKind == (ObjectKind)12 /* Housing */) {
7575
if (character.Name.TextValue.ToLower().Contains(splitArgs[2].ToLower())) {
7676
if (!IsPartOfQuestOrImportant(character as Dalamud.Game.ClientState.Objects.Types.IGameObject)) {
7777
_toast.ShowNormal(character.Name.TextValue + " ceases your command.");
@@ -98,7 +98,7 @@ private void CheckNPCEmoteControl(string[] splitArgs, string args) {
9898
character.ObjectKind == ObjectKind.BattleNpc ||
9999
character.ObjectKind == ObjectKind.EventNpc ||
100100
character.ObjectKind == ObjectKind.Companion ||
101-
character.ObjectKind == ObjectKind.Housing) {
101+
character.ObjectKind == (ObjectKind)12 /* Housing */) {
102102
if (character.Name.TextValue.ToLower().Contains(splitArgs[2].ToLower())) {
103103
bool hasQuest = false;
104104
unsafe {
@@ -160,7 +160,7 @@ public unsafe void DoEmote(string command, string targetNPC, bool becomesPreOccu
160160
character.ObjectKind == ObjectKind.BattleNpc ||
161161
character.ObjectKind == ObjectKind.EventNpc ||
162162
character.ObjectKind == ObjectKind.Companion ||
163-
character.ObjectKind == ObjectKind.Housing) {
163+
character.ObjectKind == (ObjectKind)12 /* Housing */) {
164164
if (character.Name.TextValue.ToLower().Contains(targetNPC.ToLower())) {
165165
if (!IsPartOfQuestOrImportant(character as Dalamud.Game.ClientState.Objects.Types.IGameObject)) {
166166
if (AgentEmote.Instance()->CanUseEmote((ushort)emoteItem.RowId)) {

ArtemisRoleplayingKit/Datamining/ReportData.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Dalamud.Game.ClientState.Objects.Enums;
1+
using Dalamud.Game.ClientState.Objects.Enums;
22
using Dalamud.Game.ClientState.Objects.Types;
33
using Newtonsoft.Json;
44
using System;
@@ -12,7 +12,7 @@
1212

1313
namespace RoleplayingVoiceDalamud.Datamining {
1414
public class ReportData {
15-
private ushort territoryId;
15+
private uint territoryId;
1616
public string speaker { get; set; }
1717
public string sentence { get; set; }
1818
public ulong npcid { get; set; }
@@ -23,10 +23,10 @@ public class ReportData {
2323
public byte eyes { get; set; }
2424
public byte folder { get; set; }
2525
public string user { get; set; }
26-
public ushort TerritoryId { get => territoryId; set => territoryId = value; }
26+
public uint TerritoryId { get => territoryId; set => territoryId = value; }
2727
public string Note { get; set; }
2828

29-
public ReportData(string name, string message, IGameObject gameObject, ushort territoryId, string note) {
29+
public ReportData(string name, string message, IGameObject gameObject, uint territoryId, string note) {
3030
ICharacter character = gameObject as ICharacter;
3131
if (character != null) {
3232
this.territoryId = territoryId;
@@ -47,7 +47,7 @@ public ReportData(string name, string message, IGameObject gameObject, ushort te
4747
user = "ArtemisRoleplayingKit";
4848
}
4949
}
50-
public ReportData(string name, string message, uint objectId, int body, bool gender, byte race, byte tribe, byte eyes, ushort territoryId, string note) {
50+
public ReportData(string name, string message, uint objectId, int body, bool gender, byte race, byte tribe, byte eyes, uint territoryId, string note) {
5151
speaker = name;
5252
sentence = message;
5353
npcid = objectId;

ArtemisRoleplayingKit/NPC/NPCPersonalityWindow.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
using Dalamud.Interface.Internal;
1+
using Dalamud.Interface.Internal;
22
using Dalamud.Interface.Windowing;
33
using Dalamud.Plugin;
44
using FFXIVClientStructs.FFXIV.Common.Math;
55
using Dalamud.Bindings.ImGui;
6-
using ImGuiScene;
6+
77
using RoleplayingMediaCore;
88
using RoleplayingMediaCore.Twitch;
99
using System;

ArtemisRoleplayingKit/Plugin.cs

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#region Usings
1+
#region Usings
22
using Dalamud.Game;
33
using Dalamud.Game.Text;
44
using Dalamud.Game.Text.SeStringHandling;
@@ -387,17 +387,24 @@ public Plugin(
387387
NPCVoiceMapping.Initialize();
388388
Task.Run(async () =>
389389
{
390-
_npcVoiceManager = new NPCVoiceManager(await NPCVoiceMapping.GetVoiceMappings(), await NPCVoiceMapping.GetCharacterToCacheType(),
391-
config.CacheFolder, "7fe29e49-2d45-423d-8efc-d8e2c1ceaf6d", false);
392-
_voiceEditor.NPCVoiceManager = _npcVoiceManager;
393-
_addonTalkManager = new AddonTalkManager(_framework, _clientState, condition, gameGui);
394-
_addonTalkHandler = new AddonTalkHandler(_addonTalkManager, _framework, _threadSafeObjectTable, clientState, this, chat, scanner, _redoLineWindow, _toast);
395-
_ipcSystem = new IpcSystem(pluginInterface, _addonTalkHandler, this);
396-
NpcVoiceManager.UseClosestRelay = config.UseClosestRelayServer;
397-
_gameGui = gameGui;
398-
_dragDrop = dragDrop;
399-
_videoWindow.WindowResized += _videoWindow_WindowResized;
400-
_toast.ErrorToast += _toast_ErrorToast;
390+
try
391+
{
392+
_npcVoiceManager = new NPCVoiceManager(await NPCVoiceMapping.GetVoiceMappings(), await NPCVoiceMapping.GetCharacterToCacheType(),
393+
config.CacheFolder, "7fe29e49-2d45-423d-8efc-d8e2c1ceaf6d", false);
394+
_voiceEditor.NPCVoiceManager = _npcVoiceManager;
395+
_addonTalkManager = new AddonTalkManager(_framework, _clientState, condition, gameGui);
396+
_addonTalkHandler = new AddonTalkHandler(_addonTalkManager, _framework, _threadSafeObjectTable, clientState, this, chat, scanner, _redoLineWindow, _toast);
397+
_ipcSystem = new IpcSystem(pluginInterface, _addonTalkHandler, this);
398+
NpcVoiceManager.UseClosestRelay = config.UseClosestRelayServer;
399+
_gameGui = gameGui;
400+
_dragDrop = dragDrop;
401+
_videoWindow.WindowResized += _videoWindow_WindowResized;
402+
_toast.ErrorToast += _toast_ErrorToast;
403+
}
404+
catch (Exception e)
405+
{
406+
Plugin.PluginLog?.Error(e, "[Artemis Roleplaying Kit] Async initialization failed: " + e.Message);
407+
}
401408
});
402409
} catch (Exception e)
403410
{

ArtemisRoleplayingKit/RoleplayingVoiceDalamud.csproj

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Dalamud.NET.Sdk/13.0.0">
1+
<Project Sdk="Dalamud.NET.Sdk/15.0.0">
22
<PropertyGroup>
33
<TargetFramework>net10.0-windows7.0</TargetFramework>
44
<LangVersion>11.0</LangVersion>
@@ -29,7 +29,7 @@
2929
</ItemGroup>
3030

3131
<ItemGroup>
32-
<PackageReference Include="DalamudPackager" Version="14.0.1" />
32+
3333
<PackageReference Include="Glamourer.Api" Version="2.8.0" />
3434
<PackageReference Include="NAudio" Version="2.2.1" />
3535
<PackageReference Include="NAudio.Lame" Version="2.1.0" />
@@ -48,33 +48,7 @@
4848
</ProjectReference>
4949
</ItemGroup>
5050

51-
<ItemGroup>
52-
<!--You may need to adjust these paths yourself. These point to a Dalamud assembly in AppData.-->
53-
<Reference Include="Dalamud">
54-
<HintPath>$(AppData)\XIVLauncher\addon\Hooks\dev\Dalamud.dll</HintPath>
55-
<Private>false</Private>
56-
</Reference>
57-
<Reference Include="ImGuiScene">
58-
<HintPath>$(AppData)\XIVLauncher\addon\Hooks\dev\ImGuiScene.dll</HintPath>
59-
<Private>false</Private>
60-
</Reference>
61-
<Reference Include="Lumina">
62-
<HintPath>$(AppData)\XIVLauncher\addon\Hooks\dev\Lumina.dll</HintPath>
63-
<Private>false</Private>
64-
</Reference>
65-
<Reference Include="Lumina.Excel">
66-
<HintPath>$(AppData)\XIVLauncher\addon\Hooks\dev\Lumina.Excel.dll</HintPath>
67-
<Private>false</Private>
68-
</Reference>
69-
<Reference Include="Newtonsoft.Json">
70-
<HintPath>$(AppData)\XIVLauncher\addon\Hooks\dev\Newtonsoft.Json.dll</HintPath>
71-
<Private>false</Private>
72-
</Reference>
73-
<Reference Include="FFXIVClientStructs">
74-
<HintPath>$(AppData)\XIVLauncher\addon\Hooks\dev\FFXIVClientStructs.dll</HintPath>
75-
<Private>false</Private>
76-
</Reference>
77-
</ItemGroup>
51+
7852

7953
<ItemGroup>
8054
<None Update="ArtemisRoleplayingKit.json">

0 commit comments

Comments
 (0)