Skip to content

Commit 4459cef

Browse files
authored
D&D PaladinAura - Fix Multiclass, Remove leftover log message, update README. (#1185)
* add PaladinAura API * updated paladin aura js to fix a bug, and bumped version 1.0 -> 1.1 * Remove accidental log message * Update README * Add a multiclass fix thanks to user Oosh. * Update README
1 parent 332ca03 commit 4459cef

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

PaladinAura/1.1/PaladinAura.js

+2-7
Original file line numberDiff line numberDiff line change
@@ -190,17 +190,12 @@ const PaladinAura = (function () {
190190
const multiclasses = [];
191191
const classesToCheck = ['class'];
192192
['multiclass1', 'multiclass2', 'multiclass3'].forEach(a => {
193-
multiclasses.push(getAttrByName(charID, a + '_flag'));
194-
});
195-
multiclasses.forEach(a => {
196-
if (a === '1') {
197-
classesToCheck.push(a);
198-
}
193+
let x = getAttrByName(charID, a + '_flag');
194+
if (x && x === '1') classesToCheck.push(a);
199195
});
200196
const palClass = classesToCheck.find(c => {
201197
const val = getAttrByName(charID, c);
202198
if (!val) {
203-
sendChat('PaladinAura', `/w gm Attribute: '${c}' not found on charId: ${charID}`);
204199
return false;
205200
}
206201
return val.search(/paladin/gi) !== -1;

PaladinAura/README.md

+6
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ Either leave a message on the [API Forum Post](https://app.roll20.net/forum/post
3434

3535
## Updates
3636

37+
1.1.2 - Bug fix for multi-class.
38+
39+
1.1.1 - Remove accidental log that was left over from bug fix.
40+
41+
1.1.0 - Patch a bug that causes a crash for some people (reason unknown).
42+
3743
1.0.2 - Character sheet saving throws are now detected.
3844

3945
1.0.1 - Improve chat output when a page is loaded.

PaladinAura/script.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"version": "1.1",
55
"previousversions": [],
66
"description": "A Roll20 API that auto-applies Paladin Auras and shows which characters are affected by the aura through the use of token-markers. Only Compatible with the **D&D 5E by Roll20** character sheet.\n\n* Forum Thread\n* [Readme & further instructions](https://github.com/Roll20/roll20-api-scripts/tree/master/PaladinAura)",
7-
"authors": "Layton Burchell. Special thanks to: Gustav Merelius.",
7+
"authors": "Layton Burchell. User \"Oosh\" https://app.roll20.net/users/4775411/oosh. Special thanks to: Gustav Merelius.",
88
"roll20userid": "1519557",
99
"patreon": "",
1010
"tipeee": "",

0 commit comments

Comments
 (0)