1- using Dalamud . Game ;
1+ using Dalamud . Game ;
2+ using Dalamud . Game . Chat ;
23using Dalamud . Game . ClientState . Objects . Enums ;
34using Dalamud . Game . ClientState . Objects . SubKinds ;
45using 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 ) ) {
0 commit comments