/** * Sends in point bonus vars, parses them and sends them down the pipeline */ public void AddPointBonus(PointBonus pb_, bool temporary) { List <PointBonus> temp; if (PointBonus.CheckReactive(pb_.GetActionType())) { if (temporary) { temp = reactive_temp; } else { temp = reactive_perm; }; AddBonus(pb_, temp); } else { if (temporary) { temp = accumulative_temp; } else { temp = accumulative_perm; }; AddBonus(pb_, temp); } }
public int GetPointBonus(PointBonus.Action_Type at_) { int totalPointBonus = 0; PointBonus temp; if (PointBonus.CheckReactive(at_)) //If the action type is reactive only bother checking the reactive type lists. { temp = ContainsBonus(reactive_temp, at_); if (temp != null) { totalPointBonus += temp.pointBonus; } temp = ContainsBonus(reactive_perm, at_); if (temp != null) { totalPointBonus += temp.pointBonus; } } else //Else it's accumulative so only check those list types. { temp = ContainsBonus(accumulative_temp, at_); if (temp != null) { totalPointBonus += temp.pointBonus; } temp = ContainsBonus(accumulative_perm, at_); if (temp != null) { totalPointBonus += temp.pointBonus; } } return(totalPointBonus); }