Merge branch 'fixes' into main/rendor-staging
[ryzomcore.git] / ryzom / common / src / game_share / characteristics.h
blobe2714fdf20d7d19fac827a5005cea220625de830
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/>.
19 #ifndef RY_CHARACTERISTICS_H
20 #define RY_CHARACTERISTICS_H
22 #include "nel/misc/types_nl.h"
24 #include <string.h>
26 namespace CHARACTERISTICS
28 enum TCharacteristics
30 constitution = 0, //HP max
31 metabolism, //Hp Regen
33 intelligence, //Sap Max
34 wisdom, //Sap regen
36 strength, //Stamina Max
37 well_balanced, //Stamina regen
39 dexterity, //Focus Max
40 will, //Focus regen
42 NUM_CHARACTERISTICS,
43 Unknown = NUM_CHARACTERISTICS
46 /**
47 * get the right characteristic enum from the input string
48 * \param str the input string
49 * \return the ECharacteristics associated to this string (unknown if the string cannot be interpreted)
51 TCharacteristics toCharacteristic( const std::string &str );
53 /**
54 * get the code associated to his characteristic
55 * \param c is the enum number of characteristic
56 * \return associated code
58 TCharacteristics getCharacteristicFromCode( const std::string &code );
60 /**
61 * get the characteristic associated to a code
62 * \param code the code to find
63 * \return associated enum value
65 const std::string &getCharacteristicCode( TCharacteristics c );
67 /**
68 * get the right characteristic string from the gived enum
69 * \param c is the enum number of characteristic
70 * \return the string associated to this enum number (Unknown if enum number not exist)
72 const std::string& toString( TCharacteristics c );
73 const std::string& toString( uint c );
75 }; // CHARACTERISTICS
77 #endif // RY_CHARACTERISTICS_H
78 /* End of charateristics.h */