Enum Class ChatLogType
- All Implemented Interfaces:
Serializable, Comparable<ChatLogType>, Constable
玩家聊天記錄(
chatlog 資料表)的頻道型別代碼。
資料庫只存 code()(TINYINT),中文名(label())僅供 GUI/日誌顯示,
此 enum 為「代碼 ↔ 中文名」的單一來源。新增頻道型別時在此追加即可。
由 ChatLogService 與各聊天 handler(ChatHandler、PlayerInteractionHandler)使用。
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionintcode()資料庫儲存用的數字代碼。static ChatLogTypefromCode(int code) 由數字代碼反查 enum。static ChatLogTypefromOthersType(int othersType) 將ChatHandler.Others封包的 type byte 對應到本 enum。label()顯示用的中文名。static ChatLogTypeReturns the enum constant of this class with the specified name.static ChatLogType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
GENERAL
公開(地圖普通聊天)。 -
WHISPER
密語(私訊)。 -
PARTY
組隊聊天。 -
GUILD
公會聊天。 -
ALLIANCE
聯盟(家族)聊天。 -
TRADE
交易視窗聊天。 -
MESSENGER
聊天室(Messenger)。 -
BUDDY
好友聊天。 -
EXPEDITION
遠征隊聊天。 -
SHOP
玩家商店/僱傭商人聊天。 -
COMMAND
!/@指令字串(於可下指令的頻道輸入)。
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
code
public int code()資料庫儲存用的數字代碼。 -
label
顯示用的中文名。 -
fromOthersType
將ChatHandler.Others封包的 type byte 對應到本 enum。- Parameters:
othersType- 0=好友、1=組隊、2=公會、3=聯盟、4=遠征隊- Returns:
- 對應型別;未知(偽造封包)值回
null(record() 會據此略過、不寫入被誤標的記錄)
-
fromCode
由數字代碼反查 enum。- Parameters:
code-code()值- Returns:
- 對應型別;查無則回
null
-