Check InConversation to avoid unnecessary EndConversation calls (#877)

## Improvements

- fix #859: CharacterDialogueTree.InConversation is now checked in our
attachment patch to avoid unnecessary EndConversation calls.
This commit is contained in:
xen-42 2024-06-03 22:46:04 -04:00 committed by GitHub
commit fef13f6710
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -23,9 +23,12 @@ public static class CharacterDialogueTreePatches
}
private static void OnAttachPlayerToPoint(this CharacterDialogueTree characterDialogueTree, OWRigidbody rigidbody)
{
if (characterDialogueTree.InConversation())
{
characterDialogueTree.EndConversation();
}
}
[HarmonyPostfix]
[HarmonyPatch(nameof(CharacterDialogueTree.StartConversation))]