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/>.
19 #ifndef RYAI_NPC_DESCRIPTION_MSG_H
20 #define RYAI_NPC_DESCRIPTION_MSG_H
22 #include "server_share/npc_description_messages.h"
24 //----------------------------------------------------------------
25 // class used to describe a bot's chat possibilities
26 //----------------------------------------------------------------
29 class CNpcChatProfileImp
: public CNpcChatProfile
, public NLMISC::CRefCount
31 /// A list of cell zone names for witch this bot can give dynamic mission.
32 std::vector
<std::string
> _CellZones
;
35 CNpcChatProfileImp() {}
36 CNpcChatProfileImp(const CNpcChatProfileImp
&other0
,const CNpcChatProfileImp
&other1
);
38 // interface for setting up chat info
39 void clear() { clearShopInfo(); clearMissions(); clearCellZones(); clearContextOption(); clearWeb(); _OptionalProperties
.clear(); }
43 _ExplicitSales
.clear();
44 // _shopTypesNegators.clear();
45 // _shopItemTypes.clear();
46 // _shopItemQualities.clear();
47 // _shopItemPrices.clear();
48 // _shopItemFactionTypes.clear();
49 // _shopItemFactionPointPrices.clear();
50 // _shopItemTypesNegators.clear();
51 // _shopItemQualitiesNegators.clear();
52 // _ExplicitActionTradeList.clear();
53 _FilterExplicitActionTradeByPlayerRace
= false;
54 _ExplicitActionSPType
= EGSPD::CSPType::Unknown
;
55 _FilterExplicitActionTradeByBotRace
= true;
57 void clearCellZones() { _CellZones
.clear(); }
58 void clearMissions() { _Missions
.clear(); }
64 bool add(CAIInstance
*aiInstance
, const std::string
&chatArgs
) { return parseChatArgs(aiInstance
, chatArgs
); }
65 void addMission(uint32 mission
) { _Missions
.push_back(mission
); }
66 void clearContextOption() { _ContextOptions
.clear(); }
67 void addContextOption(const std::string menuId
, const std::string contentId
) { RYMSG::TContextOption co
; co
.setTitle(menuId
); co
.setDetail(contentId
); _ContextOptions
.push_back(co
); }
69 // interface for interpreting chat info
70 // const std::vector<uint32> &getShopTypes() const { return _shopTypes; }
71 // const std::vector<NLMISC::CSheetId> &getShopItemTypes() const { return _shopItemTypes; }
72 // const std::vector<uint32> &getShopItemQualities() const { return _shopItemQualities; }
73 // const std::vector<uint32> &getMissions() const { return _Missions; }
74 const std::vector
<std::string
> &getCellZones() const { return _CellZones
; }
76 static CNpcChatProfileImp
combineChatProfile(const CNpcChatProfileImp
&referenceChat
, const CNpcChatProfileImp
¤tChat
);
78 bool parseChatArgs(CAIInstance
*aiInstance
,const std::string
&args
);
83 class TGenNpcDescMsgImp
: public RYMSG::TGenNpcDescMsg
86 // handy write accessors
87 void setChat(const CNpcChatProfileImp
& chatProfile
);
91 getShopCategories().clear();
92 getShopCategories().push_back(0);
97 #endif //RYAI_NPC_DESCRIPTION_MSG_H