MCPcopy Create free account
hub / github.com/PCGen/pcgen / getActiveBonuses

Method getActiveBonuses

code/src/java/pcgen/cdom/base/CDOMObject.java:1157–1171  ·  view source on GitHub ↗

returns all BonusObj's that are "active" @param pc A PlayerCharacter object. @return active bonuses

(final PlayerCharacter pc)

Source from the content-addressed store, hash-verified

1155 * @return active bonuses
1156 */
1157 @Override
1158 public List<BonusObj> getActiveBonuses(final PlayerCharacter pc)
1159 {
1160 final List<BonusObj> aList = new ArrayList<>();
1161
1162 for (BonusObj bonus : getRawBonusList(pc))
1163 {
1164 if (pc.isApplied(bonus))
1165 {
1166 aList.add(bonus);
1167 }
1168 }
1169
1170 return aList;
1171 }
1172
1173 public List<BonusObj> getBonusList(PlayerCharacter assocStore)
1174 {

Callers

nothing calls this directly

Calls 3

getRawBonusListMethod · 0.95
isAppliedMethod · 0.80
addMethod · 0.65

Tested by

no test coverage detected