Multi-subject Messaging
From Multiverse
This article or section documents a feature that will be incorporated into a release after version 1.5 It is subject to change until that time.
To help simplify message chatter within the server for things like Kill Quests, version 1.5 introduces three new message classes and two new filters.
[edit]
Message Classes
-
multiverse.mars.messages.MultiSubjectMessageThis message class was created to allow for multiple subjects to be assigned to the same message. This message in conjunction with the MultiSubjectFilter allows for a single broadcast to multiple subject recipients. -
multiverse.mars.messages.MultiTargetMessageThis message class was created to allow for single subject, but multiple target messaging. This message in conjunction with the MultiTargetFilter will allow for a single broadcast that is meant to be recieved by many targets. Basically it's purpose to provide the ability to do area effect spells. -
multiverse.mars.messages.TargetedMultiSubjectMessageThis message class was created to allow for a multiple subject to a single target type of message. It is used for example in the Mars Kill Quest to handle the fact that there are, or could be, many attackers of the same object. The Combat Plugin sends out this type of message when the mob dies, instead of sending out a single targeted message for every attacker. This message type can be used in conjunction with MultiSubjectFilter or MultiTargetFilter.
These classes were specifically designed to simplify message calls where possible, when the purpose is to inform multiple numbers of subjects or targets.
Typically, there is a one-to-one correspondence between MessageType and Message sub-classes. However, this is not enforced. One MessageType can be used with multiple Message sub-classes. And a single Message sub-class can be published with different MessageTypes.
[edit]
Filter Classes
-
multiverse.mars.messages.MultiSubjectFilterThis filter class provides a means to check subject Oids for both single SubjectMessage messages, and MultiSubjectMessage messages. It can also check TargetedMultiSubjectMessage messages. If the subject's Oid is found, then it allows the message through to the system assigned to the filter. -
multiverse.mars.messages.MultiTargetFilterThis filter class provides a means to check subject Oids and target Oids for a more thorough catch than the MultiSubjectFilter. This filter will allow messages through that have the matching subject Oid and target Oid, particularly from the MultiTargetMessage and TargetedMultiSubjectMessage. Although it will still evaluate correctly if it encounters a TargetMessage as well.
For more information on Filtering, please review the following Multiverse Messaging System#Custom_filters wiki page.
