Add cache parsers and POJOs for DEED and RUNE templates
New engine.parsers package: - cache: DeedParser and RuneParser load COBJECTS/DEED and COBJECTS/RUNE JSON straight from the data dir, keyed by file id. CacheParserUtil holds the shared JSON helpers. - objects: standalone DeedTemplate and RuneTemplate covering every field in the client data, plus shared PowerGrant/UserPowerAction. - wpak: placeholder for upcoming wpak parsers. Not wired into server startup yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
777f7ad89d
commit
0d48080e38
8 files changed
+1222
No files matched your search
@@ -0,0 +1,33 @@
|
||||
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
|
||||
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
|
||||
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
|
||||
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
|
||||
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀
|
||||
// Magicbane Emulator Project © 2013 - 2026
|
||||
// https://www.magicbane.com
|
||||
|
||||
package engine.parsers.objects;
|
||||
|
||||
import org.json.JSONArray;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
// One entry of item_power_grant.
|
||||
//
|
||||
// power_granted_skills and power_granted_powers entries look like
|
||||
// [hash, value] pairs (first element is a 32-bit string hash, some
|
||||
// exceed Integer.MAX_VALUE in the JSON and are stored wrapped to int).
|
||||
// This reading is from the data only and has not been confirmed in the client.
|
||||
//
|
||||
// power_granted_attrs and power_monster_types are empty in every DEED and
|
||||
// RUNE file, so their shape is unknown and they are kept as raw JSON.
|
||||
|
||||
public class PowerGrant {
|
||||
|
||||
public String power_type;
|
||||
public int power_value;
|
||||
public JSONArray power_granted_attrs;
|
||||
public final ArrayList<int[]> power_granted_skills = new ArrayList<>();
|
||||
public final ArrayList<int[]> power_granted_powers = new ArrayList<>();
|
||||
public JSONArray power_monster_types;
|
||||
}
|
||||
Reference in new issue
Block a user