Fix #3 v10 fixes for processing embedded items
This commit is contained in:
parent
7d3f880633
commit
b185a3902d
@ -1391,26 +1391,31 @@ export class PegasusActor extends Actor {
|
||||
let newItems = []
|
||||
if (ability.system.effectsgained) {
|
||||
for (let effect of ability.system.effectsgained) {
|
||||
if (!effect.system) effect.system = effect.data
|
||||
newItems.push(effect);
|
||||
}
|
||||
}
|
||||
if (ability.system.powersgained) {
|
||||
for (let power of ability.system.powersgained) {
|
||||
if (!power.system) power.system = power.data
|
||||
newItems.push(power);
|
||||
}
|
||||
}
|
||||
if (ability.system.specialisations) {
|
||||
for (let spec of ability.system.specialisations) {
|
||||
if (!spec.system) spec.system = spec.data
|
||||
newItems.push(spec);
|
||||
}
|
||||
}
|
||||
if (ability.system.attackgained) {
|
||||
for (let weapon of ability.system.attackgained) {
|
||||
if (!weapon.system) weapon.system = weapon.data
|
||||
newItems.push(weapon);
|
||||
}
|
||||
}
|
||||
if (ability.system.armorgained) {
|
||||
for (let armor of ability.system.armorgained) {
|
||||
if (!armor.system) armor.system = armor.data
|
||||
newItems.push(armor);
|
||||
}
|
||||
}
|
||||
@ -1427,11 +1432,13 @@ export class PegasusActor extends Actor {
|
||||
|
||||
console.log("DROPPED RACE", race)
|
||||
for (let ability of race.system.abilities) {
|
||||
if (!ability.system) ability.system = ability.data
|
||||
newItems.push(ability)
|
||||
this.applyAbility(ability, updates)
|
||||
}
|
||||
if (race.system.perksgained) {
|
||||
for (let power of race.system.perks) {
|
||||
if (!power.system) power.system = power.data
|
||||
newItems.push(power);
|
||||
}
|
||||
}
|
||||
@ -1462,7 +1469,7 @@ export class PegasusActor extends Actor {
|
||||
this.getIncreaseStatValue(updates, role.system.statincrease2)
|
||||
|
||||
if (role.system.specialability.length > 0) {
|
||||
console.log("Adding ability", role.system.specialability)
|
||||
//console.log("Adding ability", role.system.specialability)
|
||||
newItems = newItems.concat(duplicate(role.system.specialability)) // Add new ability
|
||||
this.applyAbility(role.system.specialability[0], newItems)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user