Added ai command setEquipment
[ryzomcore.git] / ryzom / server / src / server_share / basic_effect.h
blob15dbd7cb620fc756c9101a740849a0e9cf718756
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_BASIC_EFFECT_H
20 #define RY_BASIC_EFFECT_H
22 #include "nel/misc/types_nl.h"
23 #include "game_share/base_types.h"
24 #include "game_share/effect_families.h"
27 /**
28 * <Class description>
29 * \author David Fleury
30 * \author Nevrax France
31 * \date 2003
33 class CBasicEffect
35 public:
36 /// Constructor
37 CBasicEffect(EFFECT_FAMILIES::TEffectFamily family, const TDataSetRow & creatorId, const TDataSetRow & targetRowId)
38 : _CreatorRowId(creatorId), _TargetRowId(targetRowId), _Family(family), _EffectId(0)
40 _EffectId = ++_EffectCounter;
43 CBasicEffect( EFFECT_FAMILIES::TEffectFamily family, const TDataSetRow & creatorId, const TDataSetRow & targetRowId, uint32 effectId )
44 : _CreatorRowId(creatorId), _TargetRowId(targetRowId), _Family(family), _EffectId(effectId)
50 /// Destructor
51 virtual ~CBasicEffect() {}
53 /// get the effect creator Id
54 inline const TDataSetRow &creatorRowId() const { return _CreatorRowId; }
56 /// get the effect target rowId
57 inline const TDataSetRow &targetRowId() const { return _TargetRowId; }
59 /// get the effect family
60 inline EFFECT_FAMILIES::TEffectFamily family() const { return _Family; }
62 /// get the effect Id
63 inline uint32 effectId() const { return _EffectId; }
65 /// get the effect counter
66 inline static uint32 effectCounter() { return _EffectCounter; }
68 protected:
69 /// effect creator Id
70 TDataSetRow _CreatorRowId;
72 /// effect target Id
73 TDataSetRow _TargetRowId;
75 /// effect family
76 EFFECT_FAMILIES::TEffectFamily _Family;
78 /// effect ID
79 uint32 _EffectId;
81 /// counter, increased by one with every effect creation, give a unique Id per effect
82 static uint32 _EffectCounter;
86 #endif // RY_BASIC_EFFECT_H
88 /* End of basic_effect.h */