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/>.
22 #include "game_share/people.h"
26 class IProgressCallback
;
29 /** Records which hair item are valid for one race
30 * \author Nicolas Vizerie
31 * \author Nevrax France
37 /** Init the hair item after all the sheets have been loaded
39 void init (NLMISC::IProgressCallback
&progress
);
41 // remove all infos about hairs
44 /** get the number of hair item for the given race
46 uint
getNumHairItem(EGSPD::CPeople::TPeople people
) const;
48 /** get hair item id in sheet manager for the race
49 * or -1 if index is invalid
51 sint
getHairItemId(EGSPD::CPeople::TPeople people
, uint index
) const;
53 // Tells whether this id in the sheet manager is the id of a hair item
54 bool isHairItemId(uint id
) const;
56 // Gives the people for this hair id in the sheet manager, or unknown if not found
57 EGSPD::CPeople::TPeople
getPeopleFromHairItemID(uint id
) const;
60 /** Get the index of an hair item form its id in the sheet manager, or -1 if not found
62 sint
getHairItemFromId(EGSPD::CPeople::TPeople people
, uint Id
) const;
65 enum EPeople
{ Fyros
= 0, Matis
, Tryker
, Zorai
, NumPeople
, DontKnow
};
66 typedef std::vector
<uint
> TIntArray
;
68 TIntArray _Hairs
[NumPeople
]; // 4 races
70 static EPeople
convPeople(EGSPD::CPeople::TPeople people
);
71 static EGSPD::CPeople::TPeople
convPeople(EPeople people
);
76 // the only instance of hair_set
78 extern CHairSet HairSet
;