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/>.
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"
29 * \author David Fleury
30 * \author Nevrax France
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
)
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
; }
63 inline uint32
effectId() const { return _EffectId
; }
65 /// get the effect counter
66 inline static uint32
effectCounter() { return _EffectCounter
; }
70 TDataSetRow _CreatorRowId
;
73 TDataSetRow _TargetRowId
;
76 EFFECT_FAMILIES::TEffectFamily _Family
;
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 */