Struct ChatPumpKey
- Namespace
- FishMMO.Server.Core.World.SceneServer
- Assembly
- FishMMO.Server.dll
The relevance key of a pumped chat row: the world, party, guild or tell target it concerns.
public readonly struct ChatPumpKey : IEquatable<ChatPumpKey>
- Implements
- Inherited Members
Remarks
The same key the pump's SQL filters on (ChatService.FetchPumpAsync): the world column
for World, Trade and Discord, the message's first word for Party and Guild, and for a Tell
the target's address — the quoted name when the row starts with a quote, otherwise the first
word (FishMMO.Shared.ChatTellAddress).
Fields
ID
The world, party or guild ID. Zero for a tell.
public readonly long ID
Field Value
Kind
What kind of address this is.
public readonly ChatPumpKeyKind Kind
Field Value
Name
The lower-case tell target. Null for everything else.
public readonly string Name
Field Value
Methods
Equals(ChatPumpKey)
public bool Equals(ChatPumpKey other)
Parameters
otherChatPumpKey
Returns
Equals(object)
public override bool Equals(object obj)
Parameters
objobject
Returns
FirstWord(string)
The first space-delimited word of a message, as PostgreSQL's
split_part(message, ' ', 1) takes it: everything before the first space, or the
whole message when there is none.
public static string FirstWord(string message)
Parameters
messagestring
Returns
GetHashCode()
public override int GetHashCode()
Returns
Guild(long)
A guild's key.
public static ChatPumpKey Guild(long guildID)
Parameters
guildIDlong
Returns
Party(long)
A party's key.
public static ChatPumpKey Party(long partyID)
Parameters
partyIDlong
Returns
Tell(string)
A tell target's key. The name is lower-cased here so callers cannot disagree.
public static ChatPumpKey Tell(string name)
Parameters
namestring
Returns
ToString()
public override string ToString()
Returns
World(long)
A world's key.
public static ChatPumpKey World(long worldServerID)
Parameters
worldServerIDlong