Skip to content

Commit

Permalink
Merge pull request #713 from MrVauxs/patch-1
Browse files Browse the repository at this point in the history
Fix PF2e playing an animation on token being hurt
  • Loading branch information
otigon authored Aug 6, 2024
2 parents 3673e95 + fd0b23b commit bc6e6de
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/system-support/aa-pf2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ export function systemHooks() {
Hooks.on("createChatMessage", async (msg) => {
if (msg.author.id !== game.user.id) { return };
const playOnDmg = game.settings.get("autoanimations", "playonDamageCore")
if (msg.flags.pf2e?.context?.type === "damage-taken") {
// This can be removed if later A-A can differentiate animations on the same item. I guess.
debug ("Caught a damage-taken message thats not meant to be animated, exiting main workflow")
return;
}
let compiledData = await getRequiredData({
item: msg.item,
itemId: msg.flags.pf2e?.origin?.uuid,
Expand Down

0 comments on commit bc6e6de

Please sign in to comment.