1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
25 //#include "starting_roles.h"
27 //#include "game_share/skills_build.h"
28 //#include "game_share/characs_build.h"
30 //#include "nel/georges/u_form_loader.h"
31 //#include "nel/georges/u_form.h"
32 //#include "nel/georges/u_form_elm.h"
34 //#include "nel/misc/progress_callback.h"
35 //#include "client_sheets/starting_role_sheet.h"
36 //#include "sheet_manager.h"
40 //// global instance for starting roles
41 //CStartingRoleSet StartingRoleSet;
44 //using namespace NLMISC;
45 //using namespace std;
48 //// ***************************************************************************
49 //CStartingRoleSet::CStartingRoleSet()
51 // memset(_StartingRole, 0, sizeof(CStartingRoleSheet *)*JOBS::NbJobs);
54 //// ***************************************************************************
55 //void CStartingRoleSet::init (NLMISC::IProgressCallback &progress)
57 // // Get list of sheet of interest
58 // vector<CSheetId> sheetIDs;
59 // vector<string> fileNames;
60 // CSheetId::buildIdVector(sheetIDs, fileNames, "starting_role");
61 // for(uint k = 0; k < sheetIDs.size(); ++k)
64 // progress.progress ((float)k/(float)sheetIDs.size());
67 // CStartingRoleSheet *sroleSheet= dynamic_cast<CStartingRoleSheet*>(SheetMngr.get(sheetIDs[k]));
70 // uint32 role= JOBS::getAssociatedRole(sroleSheet->Job);
71 // sint jobDBId= JOBS::getJobDBIndex(sroleSheet->Job);
72 // if (jobDBId >=0 && role < ROLES::NB_ROLES) // valid role and race
74 // _StartingRole[sroleSheet->Job]= sroleSheet;
79 // nlwarning("Could get correct sheet %s for starting roles", fileNames[k].c_str());
85 //// ***************************************************************************
86 //const CStartingRoleSheet *CStartingRoleSet::getStartingRole(JOBS::TJob eJob) const
88 // if (eJob == JOBS::Unknown)
91 // return _StartingRole[eJob];