Class NamingAnswerRule
- Namespace
- FishMMO.Server.Core.World.SceneServer
- Assembly
- FishMMO.Server.dll
Whether a waiter is answered when its lookup finishes, and with what. Pure.
public static class NamingAnswerRule
- Inheritance
-
NamingAnswerRule
- Inherited Members
Remarks
| Found, either form | answered with the name. |
| Not found, batched | answered with an empty name: the client drops what was waiting on it rather than hold it for the session. |
| Not found, single | not answered. The single-ID reply never had a not-found form, and the client that asked in it asks again. |
A lookup that could not run (the database did not answer) answers nobody, in either form; that is decided before this rule is asked.
Methods
TryGetReply(bool, string, out string)
Decides one waiter's answer.
public static bool TryGetReply(bool batched, string name, out string reply)
Parameters
batchedboolTrue if the waiter asked with the batched request.
namestringThe name found, or null or empty when there is no such entity.
replystringThe name to send, or empty for "no such entity".
Returns
- bool
True if the waiter is sent an answer.