Resolve "Toggle Free Look with Hotkey"
[ryzomcore.git] / ryzom / server / src / sabrina / s_link_effect.h
blob1b8e37888ff0579a6e6f8d60fee480622f582705
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_S_LINK_EFFECT_H
20 #define RY_S_LINK_EFFECT_H
22 #include "nel/misc/types_nl.h"
23 #include "s_effect.h"
25 class CSLinkEffect : public CSEffect
27 public:
28 inline CSLinkEffect(
29 const TDataSetRow & creatorRowId,
30 const TDataSetRow & targetRowId,
31 EFFECT_FAMILIES::TEffectFamily family,
32 sint32 cost,
33 SCORES::TScores energyCost,
34 SKILLS::ESkills skill,
35 sint32 value,
36 uint8 power)
37 :CSEffect(creatorRowId,targetRowId,family,value,power),
38 _CostPerUpdate(cost),
39 _EnergyCost(energyCost),
40 _Skill(skill),
41 _NextUpdate(0)
46 /**
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;}
57 protected:
58 NLMISC::TGameCycle _NextUpdate;
59 sint32 _CostPerUpdate;
60 SCORES::TScores _EnergyCost;
61 SKILLS::ESkills _Skill;
63 static double _UpdatePeriod;
66 class CSLinkEffectOffensive : public CSLinkEffect
68 public:
69 inline CSLinkEffectOffensive( const TDataSetRow & creatorRowId,
70 const TDataSetRow & targetRowId,
71 EFFECT_FAMILIES::TEffectFamily family,
72 sint32 cost,
73 SCORES::TScores energyCost,
74 SKILLS::ESkills skill,
75 sint32 value,
76 uint8 power)
77 :CSLinkEffect(creatorRowId,targetRowId,family,cost,energyCost,skill,value,power),_ResistFactor(0.0f)
81 bool update(uint32 & updateFlag);
83 protected:
84 float _ResistFactor;
87 #endif // RY_S_LINK_EFFECT_H
89 /* End of s_link_effect.h */