Skip to content

Commit

Permalink
Removed redundant code for targeting in Dragonbane
Browse files Browse the repository at this point in the history
  • Loading branch information
pafvel committed Mar 2, 2024
1 parent 10bb339 commit 6bc7da5
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions src/system-support/aa-dragonbane.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,8 @@ export function systemHooks() {
}
}

// Extract the target id from the Roll Damage button
// Only supports single target
function extractTargets(content) {
try {
let targetId = $(content).find('.magic-roll').attr("data-target-id");
if (!targetId) {
targetId = $(content).find('.weapon-roll').attr("data-target-id");;
}
let target = targetId ? fromUuidSync(targetId) : null;
if (target instanceof TokenDocument) {
target = target.object;
}
return target ? [target] : null;
} catch (exception) {
console.log("COULD NOT GET ITEM ID")
return null;
}
}

let compiledData = await getRequiredData({
itemId: extractItemId(msg.content),
targets: extractTargets(msg.content),
actorId: msg.speaker?.actor,
tokenId: msg.speaker?.token,
workflow: msg,
Expand Down

0 comments on commit 6bc7da5

Please sign in to comment.