00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifdef __cplusplus
00024
00025 # ifndef OGS_ITEMS_RINGS_PROTECTION_H
00026 # define OGS_ITEMS_RINGS_PROTECTION_H
00027
00028 # include <ogs/core/Modifier.h>
00029
00030 # include <ogs/items/Ring.h>
00031 # include <ogs/items/rings/Namespace.h>
00032
00033 OGS_BEGIN_ITEMS_RINGS_NAMESPACE
00034
00043 class Protection: public Ring {
00044 public:
00046 enum Bonus {
00048 PLUS_1 = 1,
00050 PLUS_2 = 2,
00052 PLUS_3 = 3,
00054 PLUS_4 = 4,
00056 PLUS_5 = 5
00057 };
00058
00059 Protection (Bonus bonus);
00060
00061 unsigned getCasterLevel () const;
00062
00063 void equipItem (Creature& creature);
00064 void unequipItem (Creature& creature);
00065
00066 const Modifier& getModifier () const;
00067
00068 private:
00069 Modifier _modifier;
00070 };
00071
00077 Protection::Protection (Bonus bonus):
00078 _modifier (bonus) {
00079
00080 }
00081
00087 inline unsigned Protection::getCasterLevel () const {
00088 return (5);
00089 }
00090
00097 inline const Modifier& Protection::getModifier () const {
00098 return (_modifier);
00099 }
00100
00101 OGS_END_ITEMS_RINGS_NAMESPACE
00102
00103 # endif
00104
00105 #endif
00106