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/>.
18 #ifndef CL_SKILLS_TREE_SHEET_H
19 #define CL_SKILLS_TREE_SHEET_H
22 #include "entity_sheet.h"
24 #include "game_share/skills.h"
25 #include "game_share/character_title.h"
27 class CSkillsTreeSheet
: public CEntitySheet
32 SKILLS::ESkills Skill
;
33 std::string SkillCode
;
36 SKILLS::ESkills ParentSkill
;
37 std::vector
<SKILLS::ESkills
> ChildSkills
;
39 // ---------------------------------------------
43 ParentSkill
= Skill
= SKILLS::unknown
;
44 MaxSkillValue
= StageType
= 0;
47 void serial(NLMISC::IStream
&f
)
51 f
.serial (MaxSkillValue
);
53 f
.serialEnum (ParentSkill
);
59 ChildSkills
.resize (size
);
60 for (uint i
= 0; i
< size
; ++i
)
62 f
.serialEnum (ChildSkills
[i
]);
67 uint16 size
= uint16(ChildSkills
.size());
69 for (std::vector
<SKILLS::ESkills
>::iterator it
= ChildSkills
.begin(); it
!= ChildSkills
.end(); ++it
)
85 virtual ~CSkillsTreeSheet() {}
87 virtual void build(const NLGEORGES::UFormElm
&item
);
90 virtual void serial(NLMISC::IStream
&f
)
92 f
.serialCont( SkillsTree
);
97 std::vector
< SSkillData
> SkillsTree
;
100 #endif // CL_SKILLS_TREE_SHEET_H