1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
4 // This source file has been modified by the following contributors:
5 // Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com>
7 // This program is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU Affero General Public License as
9 // published by the Free Software Foundation, either version 3 of the
10 // License, or (at your option) any later version.
12 // This program is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU Affero General Public License for more details.
17 // You should have received a copy of the GNU Affero General Public License
18 // along with this program. If not, see <http://www.gnu.org/licenses/>.
22 #ifndef CL_BOT_CHAT_MANAGER_H
23 #define CL_BOT_CHAT_MANAGER_H
27 class CPrerequisitInfos
;
31 class CInterfaceGroup
;
34 class IMissionPrereqInfosWaiter
37 IMissionPrereqInfosWaiter() { MissionSlotId
= 0; }
38 virtual ~IMissionPrereqInfosWaiter() {}
40 // The mission SheetId. If differ from current sheet in the SlotId, the infos are not updated / requested
42 // The mission SlotId to retrieve info.
45 // Called when the info is received for this slot.
46 virtual void missionInfoReceived(const CPrerequisitInfos
&infos
) = 0;
50 /** Bot chat management.
51 * The bot chat manager allow to change the current bot chat page, and contains pointer to the various pages
52 * \author Nicolas Vizerie
53 * \author Nevrax France
61 // Get the unique instance of that class
62 static CBotChatManager
*getInstance();
65 static void releaseInstance();
67 // Get current setupped page, or NULL if none
68 CBotChatPage
*getCurrPage() const { return _CurrPage
; }
69 /** Set the current page to display. Any previous page is hidden. Passing NULL just close all windows.
70 * NB : this doesn't send the BOT_CHAT:END msg to the server, see endDialog
72 void setCurrPage(CBotChatPage
*page
);
73 // Increment current session ID. (a session is all talk heppening during the selection of a target npc)
74 uint16
getSessionID() { return _SessionID
; }
75 void incrementSessionID() { ++ _SessionID
; }
76 // Update the current page. Should be called at each frame
78 // Close the botchat, and send 'end' msg to the server
80 // this class retains the flags of mission option that has been chosen in the contextual menu
82 uint getChosenMissionFlags() const { return _ChosenMissionFlags; }
83 void setChosenMissionFlags(uint flag) { _ChosenMissionFlags = flag; }
87 // Add a Waiter on mission prereq info (MissionHelp opening). no-op if here, but reorder
88 void addMissionInfoWaiter(IMissionPrereqInfosWaiter
*waiter
);
89 // remove a Waiter on mission prereq info (MissionHelp closing). no-op if not here. NB: no delete
90 void removeMissionInfoWaiter(IMissionPrereqInfosWaiter
*waiter
);
92 void onReceiveMissionInfo(uint16 missionSlotId
, const CPrerequisitInfos
&infos
);
93 // Called for local client debugging
94 void debugLocalReceiveMissionInfo();
97 /////////////////////////////////////////////////////////////////////////////////
98 /////////////////////////////////////////////////////////////////////////////////
100 CBotChatPage
*_CurrPage
;
102 static CBotChatManager
*_Instance
;
103 //uint _ChosenMissionFlags;
105 // *** keep infos on opened mission help windows (for prerequisits)
106 typedef std::list
<IMissionPrereqInfosWaiter
*> TMissionPrereqInfosWaiter
;
107 TMissionPrereqInfosWaiter _MissionInfoWaiters
;