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/>.
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"
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"
42 * \author Alain Saffray
43 * \author Nevrax France
46 class CStaticSkillsTree
51 SKILLS::ESkills Skill
;
52 std::string SkillCode
;
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
);
70 ChildSkills
.resize( size
);
71 for( uint i
= 0; i
< size
; ++i
)
73 f
.serialEnum( ChildSkills
[ i
] );
78 uint16 size
= ChildSkills
.size();
80 for( std::vector
<SKILLS::ESkills
>::iterator it
= ChildSkills
.begin(); it
!= ChildSkills
.end(); ++it
)
82 f
.serialEnum( (*it
) );
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 ); }
95 void serial(NLMISC::IStream
&f
) { f
.serialCont( SkillsTree
); }
98 virtual ~CStaticSkillsTree() {}
100 /// called when the sheet is removed
103 std::vector
< SSkillData
> SkillsTree
;
106 #endif // SKILL_TREE_H
108 /* End of skill_tree.h */