Added ai command setEquipment
[ryzomcore.git] / ryzom / server / src / ai_service / ai_mgr_npc.h
blob9d01d6206dbd7deb4045368830b923fc6737a89c
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_NPC_H
18 #define RYAI_MGR_NPC_H
20 #include "ai_mgr.h"
21 #include "event_manager.h"
22 #include "states.h"
23 #include "ai_variables.h"
24 #include "event_reaction_container.h"
26 //////////////////////////////////////////////////////////////////////////////
27 // CMgrNpc //
28 //////////////////////////////////////////////////////////////////////////////
30 /// This is the manager class for npc (and npc groups)
31 class CMgrNpc
32 : public CManager
34 public:
35 CMgrNpc(IManagerParent* parent, uint32 alias, std::string const& name, std::string const& filename);
36 virtual ~CMgrNpc();
38 void update();
40 CStateMachine* getStateMachine() { return &_StateMachine; }
42 uint32 getAlias() const { return CManager::getAlias(); }
43 CAIAliasDescriptionNode* getAliasNode() const { return CManager::getAliasNode(); }
45 virtual std::string getOneLineInfoString() const;
46 virtual std::vector<std::string> getMultiLineInfoString() const;
48 //////////////////////////////////////////////////////////////////////////
50 // Methods inherited from IManager.
51 void init() { }
52 void release() { }
54 void serviceDown(uint32 sid, std::string const& name) { }
56 AITYPES::TMgrType type() const { return AITYPES::MgrTypeNpc; }
58 // instantiate the bot population
59 virtual void spawn();
60 // clear the bot population
61 virtual void despawnMgr();
63 // event managers --------------------------------------------------
64 CAIEvent EventDestinationReachedFirst;
65 CAIEvent EventDestinationReachedAll;
66 CAIEvent EventBotKilled;
67 CAIEvent EventSquadLeaderKilled;
68 CAIEvent EventGrpEliminated;
70 virtual void registerEvents();
72 //////////////////////////////////////////////////////////////////////////
73 // Alias Tree related Methods.
75 IAliasCont* getAliasCont(AITYPES::TAIType type);
76 CAliasTreeOwner* createChild(IAliasCont* cont, CAIAliasDescriptionNode* aliasTree);
78 //////////////////////////////////////////////////////////////////////////
79 CStateMachine _StateMachine;
82 #endif