| |
CBChatMessage::CBChatMessage() |
|
|
|
|
|
|
|
|
| |
|
| |
CBChatMessage::CBChatMessage( |
const CBChatMessage & cbcmChatMessage) |
|
| Comments: |
| Copy Constructor. |
| Copies each element of the Parameter over into this
CBChatMessage instance. |
|
|
| Parameters: |
| cbcmChatMessage |
| A CBChatMessage
instance whose data we want to copy. |
|
|
|
|
|
|
|
|
|
| |
|
| int |
CBChatMessage::ClearMessage() |
|
|
| Comments: |
| Sets all the data members to their None value such as
setting the nMoodID to CB_MOOD_NONE, etc. Sets the
TimeStamp to 0. Clears out any data in the vMessagePartsArray. |
|
|
|
|
|
|
| |
|
| int |
CBChatMessage::MakeMessagePartsArray( |
CBSTRING sRawStringPayload) |
|
| Comments: |
| Takes the raw text of a Chat Message and fills in the vMessagePartsArray
with it. |
| Makes sure that each Hyperlink in the message is its
own entry into the Array. |
| For messages with no Hyperlinks the size of the array
is 1. |
|
|
|
| Parameters: |
| sRawStringPayload |
| The Text of the chat
message including any Hyperlinks, but not
including the Source or Destination. |
|
|
|
|
|
|
|
|
|
| |
|
| CBChatMessage & |
CBChatMessage::operator=( |
const CBChatMessage & cbcmChatMessage) |
|
| Comments: |
| Assignment Operator to copy an existing CBChatMessage
instance into a new Instance. |
| Copies all the data from the parameter, over into this
instance. |
|
|
| Parameters: |
| cbcmChatMessage |
| An existing
CBChatMessage instance we want to
copy. |
|
|
|
|
|
|
|
| Returns: |
| A reference to this instance via (*this). |
|
| |
|
| static int |
CBChatMessage::SetVerbosityLevel( |
int nVerbosityLevel) |
|
| Comments: |
| Static function which sets how all the Chat Message
are to be displayed. |
| ChatBlade currently supports 2 types of message
formatting, CB_VERBOSITY_CONCISE, and CB_VERBOSITY_VERBOSE. |
| Developers may alternately call CBChatHandler::SetVerbosityLevel(). |
| Players can typically use the /verbose Slash Command
to set how they want their Chat Messages
displayed. |
| Examples of the 2 Formatting types: |
| CB_VERBOSITY_CONCISE: |
| [Group] You: Lets hunt in
Vortopolis. |
| [Say] Happy, Elvish, You,
"Anyone want some Lambas?" |
| CB_VERBOSITY_VERBOSE: |
| You Tell the Group: Lets hunt
in Vortopolis. |
| You Say Happily in Elvish,
"Anyone want some Lambas?" |
|
|
|
| Parameters: |
| nVerbosityLevel |
| The verbosity
Setting. CB_VERBOSITY_CONCISE or CB_VERBOSITY_VERBOSE. |
|
|
|
|
|
|
|
|
|
| |
|
| int |
CBChatMessage::GetChatStringWithHyperlinks( |
CBSTRING & sChatString
/*OUT*/) |
|
| Comments: |
| Gets the Chat Message as a string. |
| Fills in the parameter with the formatted Chat Message
contained in this instance. All parts of the
message are included, including the Source, Channel, and
full HyperLinks including any HyperLink tags. If
the message contains a Mood or Language these portions
are included as well. |
| Since the sChatString may contain HyperLink tags the
GUI should remove any tags before displaying the Chat
Message. |
| This function is designed to be called by the Game in
order to get the text from a CBChatMessage
instance. |
| Examples of the resulting strings: |
| You Say, "Anyone want to
Group?" |
| [Auction] Vanadia:
href=12BA4C<Thunder Sword> 10000 gold. |
| Offensive words in the Chat String may be filtered if
the Chat Filter is enabled. If the Chat Message is
not in a Language the Character is fully fluent in the
the Chat String may be subject to Language
Conversion. |
|
|
| Parameters: |
| sChatString |
| A reference to a
String which shall hold the text representing
the Chat Message upon return. Any
HyperLink tags in the message are
included. |
|
|
|
|
|
|
|
| Returns: |
| CB_SUCCESS |
| Upon function return sChatString is filled with the
formatted Text representing this Chat
Message. |
|
| |
|
| int |
CBChatMessage::GetChatString( |
CBSTRING & sChatString
/*OUT*/) |
|
| Comments: |
| Gets the Chat Message as a string. |
| Fills in the parameter with the formatted Chat Message
contained in this instance. Most parts of the
message are included, including the Source, Channel, and
the HyperLink Text. Any internal HyperLink tags
are left out of the Message. If the message
contains a Mood or Language these portions are included
as well. |
| HyperLink tags are removed, while the HyperLink
text is retained. |
| This function is designed to be called by the Game in
order to get the text from a CBChatMessage
instance. |
| Examples of the resulting strings: |
| You ask, "Anyone want to
Group?" |
| [Auction] Vanadia: Thunder
Sword 10000 gold. |
| Offensive words in the Chat String may be filtered if
the Chat Filter is enabled. If the Chat Message is
not in a Language the Character is fully fluent in the
the Chat String may be subject to Language
Conversion. |
|
|
| Parameters: |
| sChatString |
| A reference to a
String which shall hold the text representing
the Chat Message upon return. Any
HyperLink tags in the message are
removed. |
|
|
|
|
|
|
|
| Returns: |
| CB_SUCCESS |
| Upon function return sChatString is filled with the
formatted Text representing this Chat
Message. |
|
| |
|
| int |
CBChatMessage::GetChatBubbleString( |
CBSTRING & sChatString
/*OUT*/) |
|
| Comments: |
| Gets the Chat Message as a string suitable for display
in a Chat Bubble above a Characters head. |
| Fills in the parameter with the formatted Chat Message
contained in this instance. Only the text payload
of the Chat Message is included. The Source, Chat
Channel, Mood and any Hyperlink tags are excluded and
should not be displayed in Chat Bubbles. |
| HyperLink tags are removed, while the HyperLink
text is retained, making this function suitable to
obtaining Chat that should be displayed in a Chat Bubble
that does not need to include Linking. |
| This function is designed to be called by the Game in
order to get the text from a CBChatMessage
instance. |
| Examples of the resulting strings: |
| Anyone want to
Group? |
| Thunder
Sword 10000 gold. |
| Offensive words in the Chat String may be filtered if
the Chat Filter is enabled. If the Chat Message is
not in a Language the Character is fully fluent in the
the Chat String may be subject to Language
Conversion. |
|
|
| Parameters: |
| sChatString |
| A reference to a
String which shall hold the text representing
the Chat Message upon return. Any
HyperLink tags in the message are removed and
Source, Channel, and Mood are not included. |
|
|
|
|
|
|
|
| Returns: |
| CB_SUCCESS |
| Upon function return sChatString is filled with the
formatted Text representing this Chat
Message. |
|
| |
|
| int |
CBChatMessage::GetRawChatString( |
CBSTRING & sChatString
/*OUT*/) |
|
| Comments: |
| Gets the Chat Message as a string with no Chat
Filtering or Language Conversion performed. |
| Fills in the parameter with the formatted Chat Message
contained in this instance. Most parts of the
message are included, including the Source, Channel, and
the HyperLink Text. Any internal HyperLink tags
are left out of the Message. If the message
contains a Mood or Language these portions are included
as well. |
| HyperLink tags are removed, while the HyperLink
text is retained. |
| This function is designed to be called by the Spam
Filter in order to determine whether the Chat Message
contains Spam and should be blocked. |
| Examples of the resulting strings: |
| You ask, "Anyone want to
Group?" |
| [Auction] Vanadia: Thunder
Sword 10000 gold. |
|
|
| Parameters: |
| sChatString |
| A reference to a
String which shall hold the text representing
the Chat Message upon return. Any
HyperLink tags in the message are
removed. |
|
|
|
|
|
|
|
| Returns: |
| CB_SUCCESS |
| Upon function return sChatString is filled with the
formatted Text representing this Chat
Message. |
|
| |
|
| int |
CBChatMessage::GetConfigurableChatString( |
CBSTRING & sChatString
/*OUT*/, |
| |
|
int bGetBeginningFlag /*IN*/, |
| |
|
int bGetHyperlinkTagsFlag /*IN*/, |
| |
|
int bLanguageConvertFlag /*IN*/, |
| |
|
int bFilterTextFlag /*IN*/, |
| |
|
int bBoundMessageFlag /*IN*/) |
|
| Comments: |
| Helper function which gets the Chat Message as a string.
The flags passed in determine what parts to include in
the string and how they are filtered and modified.
|
| Fills in sChatString with the formatted Chat Message
contained in this instance. Which parts of the
Chat Message to include and how to format them are
dependent upon the settings of the Flag parameters which
are passed in. |
| Hyperlink Tags, the Chat Beginning (source, mood,
language, channel), and Quotes can be optionally left
off the message. |
| Language Conversion (to Elvish or other in-game
Languages) and Chat Filtering (to block bad words) may
be optionally enabled or disabled. |
| Examples of the resulting strings: |
| You ask, "Anyone want to
Group?" |
| [Auction] Vanadia: Thunder
Sword 10000 gold. |
| [Auction] Vanadia: href=12BA4C<Thunder Sword> 10000 gold. |
| You say in Elvish, Tinah Adene Nav
Ylena |
| Anyone want to
Group? |
| Called by the various other GetChatStringXXX()
functions. |
|
|
| Parameters: |
| sChatString |
| A reference to a
String which shall hold the text representing
the Chat Message upon return. |
| bGetBeginningFlag |
| A flag indicating whether
or not to include the Source, Channel, Mood, and
Language of the Chat Message at the beginning of
the returned string. |
| bGetHyperlinkTagsFlag |
| A flag indicating whether
or not to include the Hyperlink Tags (href=IT3M1D)
with the Hyperlink text. |
| bLanguageConvertFlag |
| A flag indicating whether
or not to perform potential Language Conversion
of the Chat Message. |
| bFilterTextFlag |
| A flag indicating whether
or not to potentially filter out bad words from
the Chat Message. |
| bBoundMessageFlag |
| A flag indicating whether
or not to potentially bound the Chat Message in
quotes. |
|
|
|
|
|
|
|
| Returns: |
| CB_SUCCESS |
| Upon function return sChatString is filled with the
formatted Text representing this Chat
Message. |
|
| |
|
| int |
CBChatMessage::GetChannelSourceStringBeginning( |
CBSTRING & sChatBeginning
/*OUT*/) |
|
| Comments: |
| Helper function which obtains the formatted beginning
portions of this Chat Message including the Source,
Channel, Mood, and Language, but excludes any of the
message Text. |
| Examples include: |
| [Group] Vanadia: |
| Vanadia Says Happily, |
| Called by GetChatStringWithHyperlinks() and
GetChatString(). |
|
|
| Parameters: |
| sChatBeginning |
| A reference to a
String which shall represent the beginning
portion of the Chat Message (all parts before
the chat Text) upon function return. |
|
|
|
|
|
|
|
| Returns: |
| CB_SUCCESS |
| Upon return sChatBeginning shall be filled with the
formatted initial portion of the Chat
Message. |
|
| |
|
| int |
CBChatMessage::GetMessageDataStrings( |
CBSTRING & sSourceString
/*OUT*/, |
|
|
CBSTRING & sDestinationString
/*OUT*/, |
|
|
CBSTRING & sMoodString
/*OUT*/, |
|
|
CBSTRING & sMoodAdverbString
/*OUT*/, |
|
|
CBSTRING & sLanguageString
/*OUT*/, |
|
|
int & bIsSourceYou /*OUT*/) |
|
| Comments: |
| Fills in the Parameters with the string
representations of information stored in this
CBChatMessage instance. |
| Retrieves the Mood string in both normal and Adverb
versions. |
| If the Source of the message is this Player then the sSourceString
is set to be "You" and bIsSourceYou is set to
TRUE. If the Destination of the Message is the
Player the sDestinationString is set to be
"You". |
| Examples: |
| sSourceString can be filled with
Vanadia or You (if this Player is Vanadia). |
| sDestinationString can be filled
with Irridia or You (if this Player is
Irridia). |
| sMoodString might by
Happy. |
| sMoodAdverbString might be
Happily. |
| sLanguageString might be
Elvish. |
| Helper function called by GetChannelSourceStringBeginning(). |
|
|
| Parameters: |
| sSourceString |
| A reference to a
string which shall contain the Source of the
message upon function return. |
|
| sDestinationString |
| A reference to a string
which shall contain the Destination of the
message upon function return. |
|
| sMoodString |
| A reference to a
string which shall contain the Mood of the
message upon function return. |
|
| sMoodAdverbString |
| A reference to a
string which shall contain the Mood as an adverb
upon function return. |
|
| sLanguageString |
| A reference to a string
which shall contain the Language of the message
upon function return. |
|
| bIsSourceYou |
| A reference to a Flag
which shall indicate if the Source of the Chat
Message is this Player. |
|
|
|
| Returns: |
| CB_SUCCESS |
| Upon return the parameters of this function are filled
with their appropriate values. |
|
| |
|
| int |
CBChatMessage::GetMessageMoodStrings( |
CBSTRING & sMoodString
/*OUT*/, |
|
|
CBSTRING & sMoodAdverbString
/*OUT*/) |
|
| Comments: |
| Helper function which gets the String representation
of the Mood of the Chat Message. |
| Fills in both a normal string of the Mood as well as
the adverb version of that Mood. |
| Called by GetMessageDataStrings(). |
| See CBUtils::GetMoodStrings(). |
|
|
| Parameters: |
| sMoodString |
| A reference to a
String which shall hold the Mood of the Chat
Message upon function return. |
|
| sMoodAdverbString |
| A reference to a
String which shall hold the adverb version of
the Mood of the Chat Message upon function
return. |
|
|
|
|
| Returns: |
| CB_SUCCESS |
| Upon function return the parameters should contain the
text values of the Mood of this Chat
Message. |
|
| |
|
| int |
CBChatMessage::GetMessageLanguageString( |
CBSTRING & sLanguageString
/*OUT*/) |
|
|
|
| Parameters: |
| sLanguageString |
| A reference to a
String which shall hold the text representation
of the Language the message was sent
in. |
|
|
|
| |
|
| Returns: |
| CB_SUCCESS |
| Upon return sLanguageString shall contain the text
representation of the Chat Message
LanguageID. |
|
| |
|
| int |
CBChatMessage::GetMessageVerbString( |
CBSTRING & sVerbString
/*OUT*/, |
| |
|
int bIsSourceYou /*IN*/) |
|
| Comments: |
| Helper function which returns a verb string used for Verbose Chat.
|
| This function looks to see if the Chat Message is a
Question, an Exclamation, or neither. It returns
the proper verb to use based on if the Source is the
current User and if the Chat Message is a Statement,
Question, or Exclamation. |
| sVerbString is set to be "Tell",
"Tells", "Say", "Says",
'Ask", "Asks", "Exclaim",
"Exclaims", "Exclaim to", or
"Exclaims to". |
| If a Chat Message ends in a ? then "Ask" or
"Asks" is used (depending on the value of bIsSourceYou
). An exclamation point (!) causes the verb to be
one of the "Exclaim" variants. |
| So, by using this functionality ChatBlade can format
Verbose Chat to display: |
| Vanadia Asks,
"Anyone need my Levin Sword?" |
| instead of: |
| Vanadia Says, "Anyone
need my Levin Sword?" |
| Called by CBChatMessage::GetChannelSourceStringBeginning(). |
|
|
| Parameters: |
| sVerbString |
| A reference to a
String which, upon return, shall hold the
correct verb to use depending on if the Chat
Message is a Statement, Question, or
Exclamation. |
| bIsSourceYou |
| A flag representing if the
Source of the Chat Message is the current
Player. |
|
|
|
| |
|
| Returns: |
| CB_SUCCESS |
| Upon return sVerbString shall contain the verb to use
when displaying this Chat Message in Verbose mode. |
|
| |
|
| int |
CBChatMessage::BoundMessageText( |
CBSTRING & sString
/*IN OUT*/) |
|
|
|
| Parameters: |
| sString |
| A reference to a
string representing the spoken portion of a Chat
Message. Upon function return this string
has Quotes added to the front and the back if
the nChannelID is of a spoken type Chat
Channel. If not, sString remains
unchanged. |
|
|
|
|
|
| Returns: |
| CB_SUCCESS |
| Upon return sString shall be surrounded by Quotes if
it is on a spoken type Chat Channel. |
|
| |
|
| int |
CBChatMessage::IsChatHyperlinked( |
) |
|
| Comments: |
| Helper function which returns CB_TRUE if this
CBChatMessage instance contains a
Hyperlink. |
| Returns CB_FALSE if there are no Hyperlinks in the
Chat Message. |
|
|
|
|
| Returns: |
| CB_TRUE if the Chat Message has at least one
Hyperlink. |
| CB_FALSE if there or no Hyperlinks in the Chat Message
or there is no Chat Text. |
|
| |
|
| int |
CBChatMessage::IsLanguageConvertibleText( |
) |
|
| Comments: |
| Helper function which returns CB_TRUE if this
CBChatMessage contains Text which should be subject to
potential Language Conversion. |
| Returns CB_FALSE if the LanguageID is CB_LANGUAGE_NONE,
or if the ChannelID is a Chat Channel which should not
be Language Converted (such as CB_CHANNEL_EMOTE). |
| Called by the various GetChatString() type
functions. |
|
|
|
|
| Returns: |
| CB_TRUE if the Chat Message contains a LanguageID that
is not CB_LANGUAGE_NONE and is on an applicable Chat
Channel. |
| CB_FALSE if nLanguageID is CB_LANGUAGE_NONE or nChannelID
represents a Chat Channel which should not be Language
Converted. |
|
| |
|
| |