Package tools


package tools
伺服器通用工具層:封包加解密、編碼字元集、字串/十六進位處理與各式雜項輔助型別。

本 package 是跨子系統共用的底層工具箱,不含遊戲邏輯,被網路層、腳本層與資料層廣泛依賴。 封包加密以 MapleAESOFB 提供 AES-OFB 串流加解密(配合握手金鑰與 0xFFFF - 149 版本旗標), 並由 MapleCustomEncryption 補上 MapleStory 專屬的自訂位元重排;封包位元組的實際讀寫 則由子套件 LittleEndianAccessorMaplePacketLittleEndianWriter 負責,封包建構器集中於子套件 tools.packet

編碼方面,Encoding 將歷史平台預設字元集 (MS950) 凍結為 Encoding.DEFAULT, 隔離 Java 18+ (JEP 400) 改用 UTF-8 帶來的中文亂碼風險;StringUtilHexTool 提供字串補齊、位元組與十六進位字串互轉等共用函式。

另提供一組輕量資料結構:PairTripleQuadra 等多值組合, 以及 AttackPairBitToolsCollectionUtil 等雜項輔助,供各層直接取用。

  • Class
    Description
    Provides a strongly-typed map of keys to values.
    Provides a strongly typed mapping of a key to a value.
    單次攻擊動作中「一個受擊目標」的資料容器。
    Provides static methods for working with raw byte sequences.
     
    以 Shunting-yard 演算法實作的純 Java 數學算式求值器。
     
    Provides utilities for manipulating collections of objects.
    ConcurrentEnumMap<K extends Enum<K>, V>
    以讀寫鎖保護的執行緒安全 EnumMap,供多執行緒並行存取 Enum 鍵的映射。
    以取樣方式剖析伺服器執行緒 CPU 熱點的效能診斷工具。
     
     
    集中管理字元集,移除對 JVM 預設字元集 (file.encoding) 的隱性依賴。
    伺服器全域的靜態檔案輸出工具,提供時間戳記式訊息追加與自動滾動功能。
    依日期分目錄的靜態輔助類別,將伺服器事件與例外訊息寫入各專屬日誌檔。
     
    從 WZ 資料讀取髮型與臉型 ID,並產生造型師 NPC 腳本的命令列工具。
    Provides a class for manipulating hexadecimal numbers.
    Deterministic unit tests for HexTool.
    Provides a class with tools for working with IP addresses, in both strings and as long integers.
    Provides a suite of tools for manipulating Korean Timestamps.
     
    Provides a class for encrypting MapleStory packets with AES OFB encryption.
    Provides MapleStory's custom encryption routines.
    Represents a mock version of an IOSession to use a MapleClient instance without an active connection (faekchar, etc).
    Pair<E,F>
    Represents a pair of values.
    Quadra<F,S,T,Fo>
    儲存四個異質型別值的不可變泛型容器,為 PairTriple 的四元組擴充。
     
     
     
    Provides a suite of utilities for manipulating strings.
    Deterministic unit tests for StringUtil.
    Triple<E,F,G>
    儲存三個異質型別值的不可變泛型容器,為 Pair 的三元組擴充。