HWTeam::HWTeam(const QStringList& strLst) : QObject(0) , m_numHedgehogs(4) , m_isNetTeam(true) { // net teams are configured from QStringList if(strLst.size() != 23) throw HWTeamConstructException(); m_name = strLst[0]; m_grave = strLst[1]; m_fort = strLst[2]; m_voicepack = strLst[3]; m_flag = strLst[4]; m_owner = strLst[5]; m_difficulty = strLst[6].toUInt(); for(int i = 0; i < HEDGEHOGS_PER_TEAM; i++) { m_hedgehogs.append(HWHog()); m_hedgehogs[i].Name=strLst[i * 2 + 7]; m_hedgehogs[i].Hat=strLst[i * 2 + 8]; // Somehow claymore managed an empty hat. Until we figure out how, this should avoid a repeat // Checking net teams is probably pointless, but can't hurt. if (m_hedgehogs[i].Hat.isEmpty()) m_hedgehogs[i].Hat = "NoHat"; } m_rounds = 0; m_wins = 0; m_campaignProgress = 0; m_color = 0; }
HWTeam::HWTeam(const QStringList& strLst) : numHedgehogs(4), m_isNetTeam(true) { // net teams are configured from QStringList if(strLst.size() != 23) throw HWTeamConstructException(); TeamName = strLst[0]; Grave = strLst[1]; Fort = strLst[2]; Voicepack = strLst[3]; Flag = strLst[4]; Owner = strLst[5]; difficulty = strLst[6].toUInt(); for(int i = 0; i < 8; i++) { Hedgehogs[i].Name=strLst[i * 2 + 7]; Hedgehogs[i].Hat=strLst[i * 2 + 8]; // Somehow claymore managed an empty hat. Until we figure out how, this should avoid a repeat // Checking net teams is probably pointless, but can't hurt. if (Hedgehogs[i].Hat.isEmpty()) Hedgehogs[i].Hat = "NoHat"; } Rounds = 0; Wins = 0; CampaignProgress = 0; }