1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
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.
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
21 #include "event_manager.h"
23 #include "ai_variables.h"
24 #include "event_reaction_container.h"
26 //////////////////////////////////////////////////////////////////////////////
28 //////////////////////////////////////////////////////////////////////////////
30 /// This is the manager class for npc (and npc groups)
35 CMgrNpc(IManagerParent
* parent
, uint32 alias
, std::string
const& name
, std::string
const& filename
);
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.
54 void serviceDown(uint32 sid
, std::string
const& name
) { }
56 AITYPES::TMgrType
type() const { return AITYPES::MgrTypeNpc
; }
58 // instantiate the bot population
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
;