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_S_LINK_EFFECT_H
20 #define RY_S_LINK_EFFECT_H
22 #include "nel/misc/types_nl.h"
25 class CSLinkEffect
: public CSEffect
29 const TDataSetRow
& creatorRowId
,
30 const TDataSetRow
& targetRowId
,
31 EFFECT_FAMILIES::TEffectFamily family
,
33 SCORES::TScores energyCost
,
34 SKILLS::ESkills skill
,
37 :CSEffect(creatorRowId
,targetRowId
,family
,value
,power
),
39 _EnergyCost(energyCost
),
47 * return true if it is time to update the effect. It modifies the next update of the effect
49 bool isTimeToUpdate();
51 bool update(uint32
& updateFlag
);
53 virtual void removed();
55 inline static double getUpdatePeriod(){return _UpdatePeriod
;}
58 NLMISC::TGameCycle _NextUpdate
;
59 sint32 _CostPerUpdate
;
60 SCORES::TScores _EnergyCost
;
61 SKILLS::ESkills _Skill
;
63 static double _UpdatePeriod
;
66 class CSLinkEffectOffensive
: public CSLinkEffect
69 inline CSLinkEffectOffensive( const TDataSetRow
& creatorRowId
,
70 const TDataSetRow
& targetRowId
,
71 EFFECT_FAMILIES::TEffectFamily family
,
73 SCORES::TScores energyCost
,
74 SKILLS::ESkills skill
,
77 :CSLinkEffect(creatorRowId
,targetRowId
,family
,cost
,energyCost
,skill
,value
,power
),_ResistFactor(0.0f
)
81 bool update(uint32
& updateFlag
);
87 #endif // RY_S_LINK_EFFECT_H
89 /* End of s_link_effect.h */