Vector<Performance*> PerformanceManager::getPerformanceListFromMod( const String& requiredSkillMod, int playerSkillModValue, int instrument) { String instrumentName = ""; if (instrument != 0) instrumentName = getInstrument(instrument); Vector<Performance*> performanceList; if (performances != NULL) { for (int i = 0; i < performances->size(); ++i) { Performance* perform = performances->get(i); if (perform->getRequiredSkillMod() == requiredSkillMod && perform->getRequiredSkillModValue() <= playerSkillModValue) { if (instrumentName != "") { //Should be a music call, look only for performances with that instrument if (instrumentName == perform->getRequiredInstrument()) performanceList.add(perform); } else { //Should be a dance call performanceList.add(perform); } } } } return performanceList; }