Calculate prepared spells on load
This commit is contained in:
+9
-4
@@ -11849,7 +11849,7 @@
|
||||
<div class="sheet-col-1-6 sheet-margin-top sheet-center">Prepared</div>
|
||||
<div class="sheet-col-1-12">
|
||||
<input type="number" name="attr_spells_prepared_count_arcane_trickster" value="0" disabled="disabled" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="sheet-col-1-12">
|
||||
<input type="number" name="attr_spells_prepared_count_bard" value="0" disabled="disabled" />
|
||||
</div>
|
||||
@@ -18336,6 +18336,11 @@
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
on('sheet:opened',function(){
|
||||
countPreparedSpells();
|
||||
});
|
||||
|
||||
on("change:repeating_spellbooklevel1", function(eventInfo) {
|
||||
if(eventInfo.sourceAttribute.match(/spellisprepared/)) {
|
||||
countPreparedSpells();
|
||||
@@ -18391,9 +18396,9 @@
|
||||
});
|
||||
|
||||
on("change:drop_category", function(eventinfo) {
|
||||
if(eventinfo.newValue === "Monsters") {
|
||||
handle_drop_monster(eventinfo.newValue);
|
||||
}
|
||||
if(eventinfo.newValue === "Monsters") {
|
||||
handle_drop_monster(eventinfo.newValue);
|
||||
}
|
||||
});
|
||||
|
||||
var handle_drop_monster = function(category, eventinfo) {
|
||||
|
||||
Reference in New Issue
Block a user