Pol  Revision:cb584c9
attribute.h
Go to the documentation of this file.
1 
7 #ifndef ATTRIBUTE_H
8 #define ATTRIBUTE_H
9 
10 #include <string>
11 #include <vector>
12 
13 #include "../scrdef.h"
14 
15 namespace Pol
16 {
17 namespace Clib
18 {
19 class ConfigElem;
20 }
21 namespace Plib
22 {
23 class Package;
24 }
25 namespace Core
26 {
27 class ExportedFunction;
28 }
29 namespace Mobile
30 {
31 class Attribute
32 {
33 public:
34  Attribute( const Plib::Package* pkg, Clib::ConfigElem& elem );
35  explicit Attribute( const std::string& name );
36  ~Attribute();
37  size_t estimateSize() const;
38 
40  std::string name;
41  unsigned attrid;
42 
43  std::vector<std::string> aliases; // aliases[0] is always name
44 
46 
48 
49  // UseSkill information
50  unsigned delay_seconds;
51  bool unhides;
53 
54  // Default cap
55  unsigned short default_cap;
56 
58 
59  static Attribute* FindAttribute( const std::string& str );
60  static Attribute* FindAttribute( unsigned attrid );
61 };
62 
63 
64 void clean_attributes();
65 
66 const unsigned ATTRIBUTE_MIN_EFFECTIVE = 0;
67 const unsigned ATTRIBUTE_MAX_EFFECTIVE = 6000;
68 
69 const unsigned ATTRIBUTE_MIN_BASE = 0;
70 const unsigned ATTRIBUTE_MAX_BASE = 60000;
71 
72 const short ATTRIBUTE_MIN_TEMP_MOD = -30000;
73 const short ATTRIBUTE_MAX_TEMP_MOD = +30000;
74 
75 const short ATTRIBUTE_MIN_INTRINSIC_MOD = -30000;
76 const short ATTRIBUTE_MAX_INTRINSIC_MOD = +30000;
77 }
78 }
79 #endif
unsigned delay_seconds
Definition: attribute.h:50
const unsigned ATTRIBUTE_MIN_EFFECTIVE
Definition: attribute.h:66
const unsigned ATTRIBUTE_MAX_EFFECTIVE
Definition: attribute.h:67
const short ATTRIBUTE_MIN_INTRINSIC_MOD
Definition: attribute.h:75
const unsigned ATTRIBUTE_MIN_BASE
Definition: attribute.h:69
Core::ExportedFunction * getintrinsicmod_func
Definition: attribute.h:47
void clean_attributes()
Definition: attribute.cpp:118
const short ATTRIBUTE_MAX_INTRINSIC_MOD
Definition: attribute.h:76
const Plib::Package * pkg
Definition: attribute.h:39
Attribute * next
Definition: attribute.h:45
const short ATTRIBUTE_MAX_TEMP_MOD
Definition: attribute.h:73
std::vector< std::string > aliases
Definition: attribute.h:43
const unsigned ATTRIBUTE_MAX_BASE
Definition: attribute.h:70
std::string name
Definition: osmod.cpp:943
Core::ScriptDef script_
Definition: attribute.h:57
Definition: berror.cpp:12
const short ATTRIBUTE_MIN_TEMP_MOD
Definition: attribute.h:72
std::string name
Definition: attribute.h:40
unsigned short default_cap
Definition: attribute.h:55