Resolve "Toggle Free Look with Hotkey"
[ryzomcore.git] / ryzom / server / src / sabrina / sabrina_actor_creature.h
blobaa8748f540fc4f78d16fd188b375c4af7ebe6fdd
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_SABRINA_ACTOR_CREATURE_H
20 #define RY_SABRINA_ACTOR_CREATURE_H
22 // Sabrina
23 #include "sabrina_actor.h"
24 #include "sabrina_pointers.h"
26 /**
27 * AI specialisation of Sabrina actor class
28 * \author Sadge
29 * \author Nevrax France
30 * \date 2003
33 class CSabrinaActorCreature: public ISabrinaActor
35 public:
36 //------------------------------------------------------------------------------------------------------
37 // ctor and dtor
38 CSabrinaActorCreature(CEntityBase *parent);
39 CSabrinaActorCreature(const CSabrinaActorCreature& other);
40 virtual ~CSabrinaActorCreature();
43 //------------------------------------------------------------------------------------------------------
44 // Management of the creature's own actions
46 virtual void beginSabrinaAction(const ISabrinaPhraseModel* phrase);
47 virtual void cancelSabrinaAction(SABRINA::TEventCode reason);
50 //------------------------------------------------------------------------------------------------------
51 // Virtual application of results of a Sabrina Action to a target
53 virtual void cbSabrinaActionApplyBegin();
54 virtual void applyHeal(SABRINA::THealType healType,uint32 value);
55 virtual void applyDamage(SABRINA::TDmgType damageType, uint32 value);
56 virtual void applyBeginSecondaryEffect(SABRINA::TEffectType effectType, uint32 strength);
57 virtual void applyEndSecondaryEffect(SABRINA::TEffectType effectType);
58 virtual void cbSabrinaActionApplyEnd();
61 //------------------------------------------------------------------------------------------------------
62 // Virtual Read Accessor Interface
64 virtual sint32 getSkillValue(SKILLS::ESkills skill) const;
65 virtual sint32 getAttackSkillValue() const;
66 virtual sint32 getDefenseSkillValue() const;
67 virtual sint32 getDodgeSkillValue() const;
68 virtual bool getRightHandWeaponStats(CWeaponStats& stats) const;
69 virtual bool getLeftHandWeaponStats(CWeaponStats& stats) const;
70 virtual bool getAmmoStats(CWeaponStats& stats) const;
71 virtual bool getArmorProtectionStats(SLOT_EQUIPMENT::TSlotEquipment slot,CArmorStats& protection) const;
72 virtual bool getLeftHandProtectionStats(CShieldStats& protection) const;
73 virtual ISabrinaActor* getTarget() const;
76 //------------------------------------------------------------------------------------------------------
77 // Logical test routines
79 virtual bool isValidOffensiveTarget(ISabrinaActor* target) const;
80 virtual bool isValidCurativeTarget(ISabrinaActor* target) const;
83 //------------------------------------------------------------------------------------------------------
84 // Virtual callbacks for message sending on activation/ cancelation of Sabrina actions
86 virtual void cbSabrinaActionBegin(const CSabrinaPhraseInstance* completedPhrase);
87 virtual void cbSabrinaActionSuccess(const CSabrinaPhraseInstance* completedPhrase, SABRINA::TEventCode code);
88 virtual void cbSabrinaActionFailure(const CSabrinaPhraseInstance* completedPhrase, SABRINA::TEventCode code);
89 virtual void cbSabrinaActionCancel(const CSabrinaPhraseInstance* completedPhrase, SABRINA::TEventCode code);
90 virtual void cbSabrinaActionEnd(const CSabrinaPhraseInstance* completedPhrase);
92 private:
93 //------------------------------------------------------------------------------------------------------
94 // private data
96 /// creature form
97 const CStaticCreatures *_CreatureForm;
99 /// defense value (parry or dodge)
100 sint32 _AttackSkillValue;
102 /// defense value (parry or dodge)
103 sint32 _DefenseSkillValue;
105 /// defense value (parry or dodge)
106 sint32 _DodgeSkillValue;
108 /// Global armor
109 CArmorStats _GlobalArmorStats;
111 /// Equivalent Weapon stats
112 CWeaponStats _RightHandWeaponStats;
113 CWeaponStats _LeftHandWeaponStats;
117 #endif