Use configured resolution for login/outgame/ingame
[ryzomcore.git] / ryzom / tools / phrase_generator / skill_tree.h
blob90c78b0d8c5bfdc1eaf8ff143462e308846eceef
1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
3 //
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.
8 //
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/>.
17 #ifndef SKILL_TREE_H
18 #define SKILL_TREE_H
20 // Misc
21 #include "nel/misc/types_nl.h"
22 #include "nel/misc/stream.h"
23 #include "nel/misc/smart_ptr.h"
24 #include "nel/misc/sheet_id.h"
26 // Georges
27 #include "nel/georges/u_form.h"
28 #include "nel/georges/u_form_elm.h"
29 //#include "nel/georges/u_form_dfn.h"
30 //#include "nel/georges/u_form_loader.h"
31 //#include "nel/georges/u_type.h"
33 #include "game_share/skills.h"
35 #include <vector>
36 #include <string>
39 /**
40 * CStaticSkillsTree
42 * \author Alain Saffray
43 * \author Nevrax France
44 * \date 2002
46 class CStaticSkillsTree
48 public :
49 struct SSkillData
51 SKILLS::ESkills Skill;
52 std::string SkillCode;
53 uint16 MaxSkillValue;
54 uint16 StageType;
55 SKILLS::ESkills ParentSkill;
56 std::vector<SKILLS::ESkills> ChildSkills;
58 void serial(NLMISC::IStream &f)
60 f.serialEnum( Skill );
61 f.serial( SkillCode );
62 f.serial( MaxSkillValue );
63 f.serial( StageType );
64 f.serialEnum( ParentSkill );
66 if( f.isReading() )
68 uint16 size;
69 f.serial( size );
70 ChildSkills.resize( size );
71 for( uint i = 0; i < size; ++i )
73 f.serialEnum( ChildSkills[ i ] );
76 else
78 uint16 size = ChildSkills.size();
79 f.serial( size );
80 for( std::vector<SKILLS::ESkills>::iterator it = ChildSkills.begin(); it != ChildSkills.end(); ++it )
82 f.serialEnum( (*it) );
88 /// read sheet
89 virtual void readGeorges( const NLMISC::CSmartPtr<NLGEORGES::UForm> &form, const NLMISC::CSheetId &sheetId );
91 // return the version of this class, increments this value when the content of this class changed
92 static uint getVersion () { return 1 + ( SKILLS::NUM_SKILLS << 16 ); }
94 /// serialize
95 void serial(NLMISC::IStream &f) { f.serialCont( SkillsTree ); }
97 /// destructor
98 virtual ~CStaticSkillsTree() {}
100 /// called when the sheet is removed
101 void removed() {}
103 std::vector< SSkillData > SkillsTree;
106 #endif // SKILL_TREE_H
108 /* End of skill_tree.h */