//========= Copyright Valve Corporation, All rights reserved. ============// // // Purpose: Implementation of CPlayerSpecifics // // $Workfile: $ // $Date: $ // //------------------------------------------------------------------------------------------------------ // $Log: $ // // $NoKeywords: $ //=============================================================================// #include "PlayerSpecifics.h" #include "PlayerReport.h" //------------------------------------------------------------------------------------------------------ // Function: CPlayerSpecifics::init // Purpose: intializes the object //------------------------------------------------------------------------------------------------------ void CPlayerSpecifics::init() { } //------------------------------------------------------------------------------------------------------ // Function: CPlayerSpecifics::generate // Purpose: generates intermediate data from match info //------------------------------------------------------------------------------------------------------ void CPlayerSpecifics::generate() { } //------------------------------------------------------------------------------------------------------ // Function: CPlayerSpecifics::writeHTML // Purpose: writes out html based on the intermediate data generated by generate() // Input: html - the html file to output to //------------------------------------------------------------------------------------------------------ void CPlayerSpecifics::writeHTML(CHTMLFile& html) { int numteams=0; for (int t=0;tteamExists(t)) numteams++; html.write("\n",numteams); CPlayerListIterator i; //multimap > ranksort; //split playerlist into teams; multimap > rankedteams[MAX_TEAMS]; for (i=g_pMatchInfo->playerBegin();i!=g_pMatchInfo->playerEnd();++i) { PID pid=(*i).first; CPlayer p=(*i).second; for (int t=0;t insertme(rank,p); rankedteams[t].insert(insertme); } } } while(!rankedteams[0].empty() || !rankedteams[1].empty() || !rankedteams[2].empty() || !rankedteams[3].empty()) { html.write("\n"); int t; for (t=0;tteamExists(t)) continue; html.write("\n"); } html.write("\n"); } html.write("
"); if (rankedteams[t].begin()==rankedteams[t].end()) continue; else { CPlayer& plr=(*(rankedteams[t].begin())).second; CPlayerReport cpr(&plr,t); cpr.writeHTML(html); rankedteams[t].erase(rankedteams[t].begin()); //break; } html.write("
"); }