Class HairFaceDump
java.lang.Object
tools.HairFaceDump
從 WZ 資料讀取髮型與臉型 ID,並產生造型師 NPC 腳本的命令列工具。
掃描 Character.wz/Hair 與 Character.wz/Face 目錄,
依性別與 ID 範圍分類所有髮型(男性三組、女性三組)及臉型(男女各一組),
並將完整的 GraalJS NPC 腳本(包含對話選單、sendStyle 呼叫、
hairExists/faceExists 函式等)輸出至 Styler.js。
性別判斷依據 ID 數值段:
- 男性髮型:ID 首三碼為 30、33、36 等段(含特例)。
- 女性髮型:ID 首三碼為 31、34 等段(含特例)。
- 男性臉型:ID 首兩碼為 20;女性臉型首兩碼為 21。
亦提供靜態方法 hairExists(int) 與 faceExists(int)
供腳本執行時查詢指定 ID 是否確實存在於 WZ 資料中,
透過 MapleDataProviderFactory 存取 WZ 資料樹。
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddLine(StringBuilder sb, String string) static StringcreateStyler(List<Integer> maleHair1, List<Integer> maleHair2, List<Integer> maleHair3, List<Integer> femaleHair1, List<Integer> femaleHair2, List<Integer> femaleHair3, List<Integer> maleFace, List<Integer> femaleFace, List<Integer> hairList, List<Integer> faceList) static booleanfaceExists(int face) static booleanhairExists(int hair) static booleanisFemaleFace(int id) static booleanisFemaleHair(int id) static booleanisMaleFace(int id) static booleanisMaleHair(int id) static void
-
Constructor Details
-
HairFaceDump
public HairFaceDump()
-
-
Method Details
-
main
- Throws:
IOException
-
isMaleHair
public static boolean isMaleHair(int id) -
isFemaleHair
public static boolean isFemaleHair(int id) -
isMaleFace
public static boolean isMaleFace(int id) -
isFemaleFace
public static boolean isFemaleFace(int id) -
hairExists
public static boolean hairExists(int hair) -
faceExists
public static boolean faceExists(int face) -
createStyler
-
addLine
-