Added ai command setEquipment
[ryzomcore.git] / ryzom / server / src / ai_service / ai_mgr_pet.h
bloba6432a8eebb2a211e9c089f5b2b06b20b9b0d3c7
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_MGR_PET_H
18 #define RYAI_MGR_PET_H
20 #include "ai_mgr.h"
21 #include "ai_bot_pet.h"
22 #include "server_share/pet_interface_msg.h"
24 class CPetOwner;
26 typedef std::map<NLMISC::CEntityId, uint32> TEntityIdMapUint32;
28 //////////////////////////////////////////////////////////////////////////////
29 // CMgrPet //
30 //////////////////////////////////////////////////////////////////////////////
32 /// This is the manager class for pets, pack animals and steeds
33 class CMgrPet
34 : public CManager
36 public:
37 CMgrPet(IManagerParent* parent, uint32 alias, std::string const& name, std::string const& filename) ;
39 void init() { }
40 void update();
41 void release() { }
43 virtual void spawn() { CManager::spawn(); }
44 void despawnMgr() { CManager::despawnMgr(); }
46 CStateMachine* getStateMachine() { return NULL; }
48 void createPetGroup(NLMISC::CEntityId const& petOwnerId);
49 CGrpPet* getPetGroup(NLMISC::CEntityId const& petOwnerId);
50 void removePetGroup(NLMISC::CEntityId const& petOwnerId);
52 AITYPES::TMgrType type() const { return AITYPES::MgrTypePet; }
54 void serviceEvent(CServiceEvent const& info);
56 virtual std::string getOneLineInfoString() const { return std::string("Pet manager '") + getName() + "'"; }
58 private:
59 TEntityIdMapUint32 _EntityIdToIndex;
62 //////////////////////////////////////////////////////////////////////////////
63 // CPetSpawnMsgImp //
64 //////////////////////////////////////////////////////////////////////////////
66 class CPetSpawnMsgImp
67 : public CPetSpawnMsg
69 virtual void callback(std::string const& name, NLNET::TServiceId id);
72 //////////////////////////////////////////////////////////////////////////////
73 // CPetSetOwnerImp //
74 //////////////////////////////////////////////////////////////////////////////
76 class CPetSetOwnerImp
77 : public CPetSetOwner
79 virtual void callback(std::string const& name, NLNET::TServiceId id);
82 //////////////////////////////////////////////////////////////////////////////
83 // CPetCommandMsgImp //
84 //////////////////////////////////////////////////////////////////////////////
86 class CPetCommandMsgImp
87 : public CPetCommandMsg
89 virtual void callback(std::string const& name, NLNET::TServiceId id);
92 /****************************************************************************/
93 /* Inlined methods */
94 /****************************************************************************/
96 //////////////////////////////////////////////////////////////////////////////
97 // CMgrPet //
98 //////////////////////////////////////////////////////////////////////////////
100 inline
101 CMgrPet::CMgrPet(IManagerParent* parent, uint32 alias, std::string const& name, std::string const& filename)
102 : CManager(parent, alias, name, filename)
106 #endif