Add multiclassing
Changes: + add multiclassing option + add edit and delete item for class
This commit is contained in:
@@ -207,7 +207,7 @@ export class M5Character extends Actor {
|
||||
const aggregate = new M5ModAggregate(data, ret);
|
||||
|
||||
context.items
|
||||
?.filter((item) => (item.type === "item" || item.type === "effect" || item.type === "armor" || item.type === "container" || item.type === "klasse") && item.system.equipped)
|
||||
?.filter((item) => (item.type === "item" || item.type === "effect" || item.type === "armor" || item.type === "container" || item.type === "class") && item.system.equipped)
|
||||
.forEach((item) => {
|
||||
const mods = item.system.mods;
|
||||
//console.log("Actor item mods", mods)
|
||||
@@ -497,11 +497,19 @@ export class M5Character extends Actor {
|
||||
}
|
||||
|
||||
if (!skip?.class) {
|
||||
const item = context.items?.find((item) => item.type === "class");
|
||||
if (item) {
|
||||
data.info.class = item.name;
|
||||
data.info.magicUsing = item.system.magicUsing;
|
||||
}
|
||||
const item = context.items
|
||||
?.filter((item) => item.type === "class")
|
||||
.forEach((item) => {
|
||||
if (item) {
|
||||
if (typeof data.info.class === "string") {
|
||||
data.info.class = {};
|
||||
}
|
||||
data.info.class[item.id] = item.name;
|
||||
if (item.system.magicUsing) {
|
||||
data.info.magicUsing = item.system.magicUsing;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (!skip?.effects) {
|
||||
|
||||
Reference in New Issue
Block a user