Planeshift
|
The psQuestionClient class manages answering to various questions sent from server to user. More...
#include <questionclient.h>
Public Member Functions | |
void | DeleteQuestion (uint32_t questionID) |
Delete question from list of pending questions. | |
virtual void | HandleMessage (MsgEntry *msg) |
psQuestionClient (MsgHandler *mh, iObjectRegistry *obj) | |
void | SendResponseToQuestion (uint32_t questionID, const csString &answer) |
Sends response to given question to server. | |
virtual | ~psQuestionClient () |
Protected Member Functions | |
void | HandleConfirm (uint32_t questionID, const csString &question) |
Default handler for a confirm message. | |
void | HandleDuel (uint32_t questionID, const csString &question) |
Handles duel questions questions according to user settings. | |
void | HandleMarriage (uint32_t questionID, const csString &question) |
Handles marriage questions according to user settings. | |
void | HandleSecretGuildNotify (uint32_t questionID, const csString &question) |
Silently handles secret guild notifications. | |
Protected Attributes | |
MsgHandler * | messageHandler |
csHash< psQuestion * > | questions |
The psQuestionClient class manages answering to various questions sent from server to user.
It keeps list of the questions that have not been answered yet.
Definition at line 49 of file questionclient.h.
psQuestionClient::psQuestionClient | ( | MsgHandler * | mh, |
iObjectRegistry * | obj | ||
) |
virtual psQuestionClient::~psQuestionClient | ( | ) | [virtual] |
void psQuestionClient::DeleteQuestion | ( | uint32_t | questionID | ) |
Delete question from list of pending questions.
void psQuestionClient::HandleConfirm | ( | uint32_t | questionID, |
const csString & | question | ||
) | [protected] |
Default handler for a confirm message.
Creates a new psQuestion which displays a yes/no dialog and adds it to questions so that the user may reply to the question as they wish.
questionID | ID of the question |
question | Text to be shown in the yes/no dialog |
void psQuestionClient::HandleDuel | ( | uint32_t | questionID, |
const csString & | question | ||
) | [protected] |
Handles duel questions questions according to user settings.
If the user has chosen to ignore duels the question will silently be replied "no" to. If the user has chosen to accept all duels the question will silently be replied "yes" to. Otherwise the dialog will appear normally.
questionID | ID of the question |
question | Text to be shown in the dialog if it is used. |
void psQuestionClient::HandleMarriage | ( | uint32_t | questionID, |
const csString & | question | ||
) | [protected] |
Handles marriage questions according to user settings.
If the user has chosen to ignore marriage proposals the question will silently be replied "no" to. Otherwise the dialog will appear normally.
questionID | ID of the question |
question | Text to be shown in the dialog if it is used. |
virtual void psQuestionClient::HandleMessage | ( | MsgEntry * | msg | ) | [virtual] |
Implements psClientNetSubscriber.
void psQuestionClient::HandleSecretGuildNotify | ( | uint32_t | questionID, |
const csString & | question | ||
) | [protected] |
Silently handles secret guild notifications.
This message is always replied no to but the user sees it anyway because of emulation requirements.
questionID | ID of the question |
question | Text that would be shown if this dialog was shown. |
void psQuestionClient::SendResponseToQuestion | ( | uint32_t | questionID, |
const csString & | answer | ||
) |
Sends response to given question to server.
MsgHandler* psQuestionClient::messageHandler [protected] |
Definition at line 100 of file questionclient.h.
csHash<psQuestion*> psQuestionClient::questions [protected] |
Definition at line 102 of file questionclient.h.