Class DumpItems
java.lang.Object
tools.wztosql.DumpItems
將 WZ 道具資料傾印至 MySQL
wz_itemdata 系列資料表的工具類別。
讀取 Item.wz、Character.wz 與 String.wz,
批次寫入下列資料表:
wz_itemdata:道具基本屬性(名稱、描述、售價、捲軸需求、潛在能力等)。wz_itemequipdata:裝備各等級附加數值(key/value鍵值對)。wz_itemadddata:道具附加屬性(如升星等效果)。wz_itemrewarddata:道具獎勵掉落清單(含機率與數量)。
update=true)以跳過已存在的記錄,
並以四條背景執行緒並行執行批次寫入(t1–t4)提升效能。
正常使用時由 WzDataInitializer.ensureDumped() 於啟動時自動調用;
亦可透過 tools/Dump-Items.bat 手動執行。
資料依賴 MapleDataProviderFactory 讀取 wz/ 目錄。-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintvoidvoiddeleteItem(int itemid) 刪除單一道具在四張 wz_item* 表的所有列(供 WzDataInitializer 增量更新 / 移除裝備使用)。booleanvoiddumpItem(PreparedStatement psa, PreparedStatement psr, PreparedStatement ps, PreparedStatement pse, MapleData iz) voidvoiddumpItems(PreparedStatement psa, PreparedStatement psr, PreparedStatement ps, PreparedStatement pse) voiddumpItems(MapleDataProvider d, PreparedStatement psa, PreparedStatement psr, PreparedStatement ps, PreparedStatement pse, boolean charz) booleandumpSingleEquip(int itemid) 只重新匯入單一件裝備(Character.wz 一檔 = 一件裝備)。protected final MapleDatagetStringData(int itemId) booleanstatic void
-
Field Details
-
cashStringData
-
consumeStringData
-
eqpStringData
-
etcStringData
-
insStringData
-
petStringData
-
doneIds
-
hadError
protected boolean hadError -
update
protected boolean update -
id
protected int id
-
-
Constructor Details
-
DumpItems
-
-
Method Details
-
isHadError
public boolean isHadError() -
dumpItems
-
delete
-
doesExist
-
deleteItem
-
dumpSingleEquip
只重新匯入單一件裝備(Character.wz 一檔 = 一件裝備)。 供 WzDataInitializer 的增量更新使用:呼叫端應先以deleteItem(int)清掉舊列, 再呼叫本方法把該裝備重新解析寫回。完整重用dumpItem(PreparedStatement, PreparedStatement, PreparedStatement, PreparedStatement, MapleData)的解析邏輯,僅針對單一 .img, 解析完立即 executeBatch(同步寫入,不另開執行緒)。- Returns:
- true 表示有解析並寫入;false 表示在 Character.wz 找不到對應 .img(視為已移除)。
- Throws:
Exception
-
dumpItems
public void dumpItems(MapleDataProvider d, PreparedStatement psa, PreparedStatement psr, PreparedStatement ps, PreparedStatement pse, boolean charz) throws Exception - Throws:
Exception
-
dumpItem
public void dumpItem(PreparedStatement psa, PreparedStatement psr, PreparedStatement ps, PreparedStatement pse, MapleData iz) throws Exception - Throws:
Exception
-
dumpItems
public void dumpItems(PreparedStatement psa, PreparedStatement psr, PreparedStatement ps, PreparedStatement pse) throws Exception - Throws:
Exception
-
currentId
public int currentId() -
main
-
getStringData
-