Resolve "Toggle Free Look with Hotkey"
[ryzomcore.git] / ryzom / server / src / sabrina / combat_stun_effect.h
blob1d8e30d0ea54255549cc7a8c352e5ba3022853da
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 NL_COMBAT_STUN_EFFECT_H
20 #define NL_COMBAT_STUN_EFFECT_H
22 #include "nel/misc/types_nl.h"
23 #include "s_effect.h"
26 /**
27 * <Class description>
28 * \author David Fleury
29 * \author Nevrax France
30 * \date 2003
32 class CCombatStunEffect : public CSEffect
34 public:
35 ///\ctor
36 CCombatStunEffect( const TDataSetRow & creatorRowId, const TDataSetRow & targetRowId, EFFECT_FAMILIES::TEffectFamily family, sint32 effectValue, uint32 endDate)
37 :CSEffect(creatorRowId, targetRowId, family, effectValue,0), _StunEndDate(endDate)
41 /**
42 * return true if it is time to update the effect. It modifies the next update of the effect
44 virtual bool isTimeToUpdate();
46 /**
47 * apply the effects of the... effect
48 * \param updateFlag is a flag telling which effect type has been already processed for an entity. An effect shoud set to 1 the bit corresponding to its effect family
49 * \return true if the effect ends and must be removed
51 virtual bool update( uint32 & updateFlag );
53 /// callback called when the effect is actually removed
54 virtual void removed();
56 /// set stunned entity
57 inline void stunnedEntity(CEntityBase *entity) { _StunnedEntity = entity; }
59 /// get stunned entity
60 inline CEntityBase *stunnedEntity() { return _StunnedEntity; }
62 private:
63 /// effect end date in ticks
64 NLMISC::TGameCycle _StunEndDate;
66 /// affected entity
67 CEntityBase *_StunnedEntity;
71 #endif // NL_COMBAT_STUN_EFFECT_H
73 /* End of combat_stun_effect.h */