Resolve "Toggle Free Look with Hotkey"
[ryzomcore.git] / ryzom / server / src / ai_service / ai_profile_pet.h
blob58c5f258f4785c47f7f3d0b9a6d209ee530dbccb
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/>.
17 #ifndef RYAI_PROFILE_PET_H
18 #define RYAI_PROFILE_PET_H
20 #include "profile.h" // for CAIBaseProfile
21 #include "ai_share/ai_types.h" // for TProfiles
22 #include "ai_pos.h" // for CAIPos
23 #include "ai_share/world_map.h" // for TAStarFlag
24 #include "path_behaviors.h" // for CPathCont
26 class CSpawnBotPet;
28 #include "ai_mgr.h"
29 #include "ai_bot_pet.h"
30 #include "server_share/pet_interface_msg.h"
33 //////////////////////////////////////////////////////////////////////////////
34 // CAIPetProfileStand //
35 //////////////////////////////////////////////////////////////////////////////
37 class CAIPetProfileStand
38 : public CAIBaseProfile
40 public:
41 CAIPetProfileStand(CSpawnBotPet* bot);
43 virtual void beginProfile() { }
44 virtual void updateProfile(uint ticksSinceLastUpdate) { }
45 virtual void endProfile() { }
47 virtual std::string getOneLineInfoString() const { return std::string("stand pet profile"); }
49 AITYPES::TProfiles getAIProfileType() const { return AITYPES::PET_STAND; }
51 private:
52 NLMISC::CDbgPtr<CSpawnBotPet> _Bot;
55 //////////////////////////////////////////////////////////////////////////////
56 // CAIPetProfileFollowPlayer //
57 //////////////////////////////////////////////////////////////////////////////
59 class CAIPetProfileFollowPlayer
60 : public CAIBaseProfile
62 public:
63 CAIPetProfileFollowPlayer(CSpawnBotPet* bot, TDataSetRow const& playerRow);
65 virtual void beginProfile() { }
66 virtual void updateProfile(uint ticksSinceLastUpdate);
67 virtual void endProfile() { }
69 virtual std::string getOneLineInfoString() const { return std::string("follow_player pet profile"); }
71 AITYPES::TProfiles getAIProfileType() const { return AITYPES::PET_FOLLOW; }
73 protected:
74 private:
75 NLMISC::CDbgPtr<CSpawnBotPet> _Bot;
76 TDataSetRow _PlayerRow;
79 //////////////////////////////////////////////////////////////////////////////
80 // CAIPetProfileGotoPoint //
81 //////////////////////////////////////////////////////////////////////////////
83 class CAIPetProfileGotoPoint
84 : public CAIBaseProfile
86 public:
87 CAIPetProfileGotoPoint(CSpawnBotPet* bot, CAIPos const& position, RYAI_MAP_CRUNCH::TAStarFlag denyFlags, bool despawn = false);
89 bool isValid() const { return _Valid; }
91 virtual void beginProfile() { }
92 virtual void updateProfile(uint ticksSinceLastUpdate);
93 virtual void endProfile() { }
95 virtual std::string getOneLineInfoString() const { return std::string("goto_point pet profile"); }
97 AITYPES::TProfiles getAIProfileType() const;
99 private:
100 NLMISC::CDbgPtr<CSpawnBotPet> _Bot;
101 CPathCont _PathCont;
102 CAIVector _Pos;
103 bool const _Despawn;
104 bool _Valid;
107 #endif