mirror of
https://gitlab.com/YuukiPS/GC-Proto.git
synced 2025-07-31 09:34:12 +03:00
Update file res proto
This commit is contained in:
3710
PacketOpcodes.java
3710
PacketOpcodes.java
File diff suppressed because it is too large
Load Diff
7028
cmdid.json
7028
cmdid.json
File diff suppressed because it is too large
Load Diff
810
cmdid_gc.json
810
cmdid_gc.json
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,16 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"name": "ChannelerSlabOneOffDungeonInfoNotify",
|
||||||
|
"id": 8729
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ChannelerSlabOneOffDungeonInfoReq",
|
||||||
|
"id": 8409
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ChannelerSlabOneOffDungeonInfoRsp",
|
||||||
|
"id": 8268
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "FireworkNotify",
|
"name": "FireworkNotify",
|
||||||
"id": 5934
|
"id": 5934
|
||||||
@@ -23,6 +35,14 @@
|
|||||||
"name": "FireworkSetRsp",
|
"name": "FireworkSetRsp",
|
||||||
"id": 5969
|
"id": 5969
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "FunitureMakeMakeInfoChangeNotify",
|
||||||
|
"id": 4898
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "MistTrialDunegonFailNotify",
|
||||||
|
"id": 8135
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "MusicGameGetBeatmapRsp",
|
"name": "MusicGameGetBeatmapRsp",
|
||||||
"id": 6309
|
"id": 6309
|
||||||
@@ -55,6 +75,14 @@
|
|||||||
"name": "PrivateChatSetSequenceRsp",
|
"name": "PrivateChatSetSequenceRsp",
|
||||||
"id": 4957
|
"id": 4957
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "SceneWeatherForcastReq",
|
||||||
|
"id": 3110
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "SceneWeatherForcastRsp",
|
||||||
|
"id": 3012
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "Unk2700_NGPMINKIOPK",
|
"name": "Unk2700_NGPMINKIOPK",
|
||||||
"id": 8956
|
"id": 8956
|
||||||
|
5960
cmdid_gc_update.json
5960
cmdid_gc_update.json
File diff suppressed because it is too large
Load Diff
@@ -519,7 +519,7 @@
|
|||||||
"name": "ChangeGameTimeReq"
|
"name": "ChangeGameTimeReq"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Unk2700BEDLIGJANCJClientReq"
|
"name": "HomeChangeBgmReq"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ChangeMailStarNotify"
|
"name": "ChangeMailStarNotify"
|
||||||
@@ -728,6 +728,12 @@
|
|||||||
{
|
{
|
||||||
"name": "QuestCreateEntityReq"
|
"name": "QuestCreateEntityReq"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "QuestDestroyEntityReq"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "QuestTransmitReq"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "QuestUpdateQuestVarReq"
|
"name": "QuestUpdateQuestVarReq"
|
||||||
},
|
},
|
||||||
@@ -917,6 +923,9 @@
|
|||||||
{
|
{
|
||||||
"name": "AddBackupAvatarTeamRsp"
|
"name": "AddBackupAvatarTeamRsp"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "AddNoGachaAvatarCardNotify"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "AddQuestContentProgressRsp"
|
"name": "AddQuestContentProgressRsp"
|
||||||
},
|
},
|
||||||
@@ -1037,6 +1046,9 @@
|
|||||||
{
|
{
|
||||||
"name": "BattlePassMissionUpdateNotify"
|
"name": "BattlePassMissionUpdateNotify"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "BeginCameraSceneLookNotify"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "BlossomBriefInfoNotify"
|
"name": "BlossomBriefInfoNotify"
|
||||||
},
|
},
|
||||||
@@ -1154,6 +1166,9 @@
|
|||||||
{
|
{
|
||||||
"name": "DoGachaRsp"
|
"name": "DoGachaRsp"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "DropHintNotify"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "DungeonChallengeBeginNotify"
|
"name": "DungeonChallengeBeginNotify"
|
||||||
},
|
},
|
||||||
@@ -1175,6 +1190,12 @@
|
|||||||
{
|
{
|
||||||
"name": "DungeonWayPointActivateRsp"
|
"name": "DungeonWayPointActivateRsp"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "DungeonWayPointNotify"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "EndCameraSceneLookNotify"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "EnterSceneDoneRsp"
|
"name": "EnterSceneDoneRsp"
|
||||||
},
|
},
|
||||||
@@ -1394,15 +1415,15 @@
|
|||||||
{
|
{
|
||||||
"name": "HomeMarkPointSceneData"
|
"name": "HomeMarkPointSceneData"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "HomePreChangeEditModeNotify"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "HomeSceneInitFinishReq"
|
"name": "HomeSceneInitFinishReq"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "HomeSceneJumpRsp"
|
"name": "HomeSceneJumpRsp"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "HomeUnknown1Notify"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "HostPlayerNotify"
|
"name": "HostPlayerNotify"
|
||||||
},
|
},
|
||||||
@@ -1578,10 +1599,10 @@
|
|||||||
"name": "QueryPathRsp"
|
"name": "QueryPathRsp"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "CreateEntityInfo"
|
"name": "QuestCreateEntityRsp"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "QuestCreateEntityRsp"
|
"name": "QuestDestroyEntityRsp"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "QuestListNotify"
|
"name": "QuestListNotify"
|
||||||
@@ -1592,6 +1613,9 @@
|
|||||||
{
|
{
|
||||||
"name": "QuestProgressUpdateNotify"
|
"name": "QuestProgressUpdateNotify"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "QuestTransmitRsp"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "QuestUpdateQuestVarRsp"
|
"name": "QuestUpdateQuestVarRsp"
|
||||||
},
|
},
|
||||||
@@ -1625,6 +1649,12 @@
|
|||||||
{
|
{
|
||||||
"name": "SceneEntityMoveNotify"
|
"name": "SceneEntityMoveNotify"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "SceneForceLockNotify"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "SceneForceUnlockNotify"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "SceneInitFinishRsp"
|
"name": "SceneInitFinishRsp"
|
||||||
},
|
},
|
||||||
@@ -1856,6 +1886,9 @@
|
|||||||
{
|
{
|
||||||
"name": "WorktopOptionNotify"
|
"name": "WorktopOptionNotify"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "WorldChestOpenNotify"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "WorldDataNotify"
|
"name": "WorldDataNotify"
|
||||||
},
|
},
|
||||||
|
105
op.js
105
op.js
@@ -118,56 +118,64 @@ var data_gc_cmdid_nofound = [];
|
|||||||
|
|
||||||
var check_dunp_id = [];
|
var check_dunp_id = [];
|
||||||
function update_cmdid_gc() {
|
function update_cmdid_gc() {
|
||||||
const cmd_last = fs.readFileSync(read_cmdid_output);
|
|
||||||
const cmd_old = fs.readFileSync(read_cmdid_output_gc);
|
// cmdid_gc.json (read_cmdid_output_gc) and cmdid.json (read_cmdid_output)
|
||||||
const json_cmdid_last = JSON.parse(cmd_last);
|
|
||||||
const json_cmdid_old = JSON.parse(cmd_old);
|
const json_cmdid_last = read_json(read_cmdid_output);
|
||||||
|
const json_cmdid_old = read_json(read_cmdid_output_gc);
|
||||||
|
|
||||||
json_cmdid_old.forEach(function (s, index) {
|
json_cmdid_old.forEach(function (s, index) {
|
||||||
var id = s.id;
|
var id = s.id;
|
||||||
var name = s.name.trim();
|
var name = s.name.trim();
|
||||||
|
|
||||||
var found_id = json_cmdid_last.find((j) => j.id == id);
|
// switch to name mode?
|
||||||
|
var found_id = json_cmdid_last.find((j) => j.name == name);
|
||||||
if (found_id) {
|
if (found_id) {
|
||||||
|
|
||||||
found_cmdid_new++;
|
found_cmdid_new++;
|
||||||
if (name == found_id.name) {
|
|
||||||
|
if (id == found_id.id) {
|
||||||
noneed_rename_name_cmdid++;
|
noneed_rename_name_cmdid++;
|
||||||
} else {
|
} else {
|
||||||
rename_name_cmdid++;
|
rename_name_cmdid++;
|
||||||
//console.log("Wow rename -> ID: "+id+" | Name: "+name+" > "+found_id.name);
|
//console.log("Wow rename -> ID: "+id+" > "+found_id.id);
|
||||||
// rename json_cmdid_old
|
|
||||||
s.replace = s.name;
|
s.replace = s.id; // old
|
||||||
s.name = found_id.name;
|
|
||||||
|
s.id = found_id.id; // rename id
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
console.log("Wow nofound -> ID: " + id + " | Name: " + name);
|
console.log("Wow nofound -> ID: " + id + " | Name: " + name);
|
||||||
data_gc_cmdid_nofound.push(s);
|
data_gc_cmdid_nofound.push(s);
|
||||||
nofound_cmdid_new++;
|
nofound_cmdid_new++;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// find dump by id
|
// find dump by id
|
||||||
|
/*
|
||||||
var found_id = check_dunp_id.find((j) => j.id == id);
|
var found_id = check_dunp_id.find((j) => j.id == id);
|
||||||
if (found_id) {
|
if (found_id) {
|
||||||
console.log(
|
|
||||||
"Wow dup -> ID: " +
|
console.log("Wow dup -> ID: " +id +" (ADD " +found_id.id +") | Name Remove: " +name +" (ADD " +found_id.name +")");
|
||||||
id +
|
|
||||||
" (ADD " +
|
|
||||||
found_id.id +
|
|
||||||
") | Name Remove: " +
|
|
||||||
name +
|
|
||||||
" (ADD " +
|
|
||||||
found_id.name +
|
|
||||||
")"
|
|
||||||
);
|
|
||||||
// remove bad
|
// remove bad
|
||||||
json_cmdid_old.splice(index, 1);
|
json_cmdid_old.splice(index, 1);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
check_dunp_id.push(s);
|
check_dunp_id.push(s);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
// find dump by name?
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
check_dunp_id = []; // clear
|
check_dunp_id = []; // clear
|
||||||
|
|
||||||
// I don't know why this happened but make sure to check again
|
// I don't know why this happened but make sure to check again
|
||||||
|
/*
|
||||||
var check_dunp_name = [];
|
var check_dunp_name = [];
|
||||||
json_cmdid_old.forEach(function (s, index) {
|
json_cmdid_old.forEach(function (s, index) {
|
||||||
var id = s.id;
|
var id = s.id;
|
||||||
@@ -202,8 +210,8 @@ function update_cmdid_gc() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
check_dunp_name = []; // clear
|
//check_dunp_name = []; // clear
|
||||||
|
|
||||||
console.log(
|
console.log(
|
||||||
"found " +
|
"found " +
|
||||||
@@ -215,6 +223,7 @@ function update_cmdid_gc() {
|
|||||||
" | noneed rename " +
|
" | noneed rename " +
|
||||||
noneed_rename_name_cmdid
|
noneed_rename_name_cmdid
|
||||||
);
|
);
|
||||||
|
|
||||||
save_json(json_cmdid_old, read_cmdid_output_gc_update);
|
save_json(json_cmdid_old, read_cmdid_output_gc_update);
|
||||||
save_json(data_gc_cmdid_nofound, read_cmdid_output_gc_nofound);
|
save_json(data_gc_cmdid_nofound, read_cmdid_output_gc_nofound);
|
||||||
}
|
}
|
||||||
@@ -239,6 +248,9 @@ function save(raw, file) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var dup_name = [];
|
||||||
|
var count_dup = 0;
|
||||||
|
var count_nodup = 0;
|
||||||
function cmdid_to_op() {
|
function cmdid_to_op() {
|
||||||
let melon =
|
let melon =
|
||||||
"\
|
"\
|
||||||
@@ -251,12 +263,36 @@ function cmdid_to_op() {
|
|||||||
\n// Opcodes\
|
\n// Opcodes\
|
||||||
";
|
";
|
||||||
|
|
||||||
|
//const read_file_gcneed = fs.readFileSync(file_gc_needed2);
|
||||||
|
//const json_gcneed_raw = JSON.parse(read_file_gcneed);
|
||||||
|
|
||||||
const cmdidfix_raw = fs.readFileSync(read_cmdid_output_gc_update);
|
const cmdidfix_raw = fs.readFileSync(read_cmdid_output_gc_update);
|
||||||
const json_cmdidfix_raw = JSON.parse(cmdidfix_raw);
|
const json_cmdidfix_raw = JSON.parse(cmdidfix_raw);
|
||||||
|
|
||||||
|
//const json_cmdidfix_raw = read_json(read_cmdid_output_gc_update);
|
||||||
|
|
||||||
json_cmdidfix_raw.forEach(function (s) {
|
json_cmdidfix_raw.forEach(function (s) {
|
||||||
melon += "\npublic static final int " + s.name + " = " + s.id + ";";
|
var found_id = dup_name.find((j) => j.name == s.name);
|
||||||
|
if(!found_id){
|
||||||
|
melon += "\npublic static final int " + s.name + " = " + s.id + ";";
|
||||||
|
dup_name.push(s);
|
||||||
|
count_nodup++;
|
||||||
|
}else{
|
||||||
|
count_dup++;
|
||||||
|
if(s.replace){
|
||||||
|
console.log("DUP: "+found_id.id+" > "+s.id+" ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//console.log(s);
|
||||||
|
/*
|
||||||
|
var found_new = json_cmdidfix_raw.find((j) => j.name == s.name);
|
||||||
|
if(found_new){
|
||||||
|
}
|
||||||
|
*/
|
||||||
});
|
});
|
||||||
|
|
||||||
|
console.log("done no dup "+count_nodup+" | dup "+count_dup);
|
||||||
|
|
||||||
melon += "\n}";
|
melon += "\n}";
|
||||||
save(melon, write_op); // use "npx prettier --write PacketOpcodes.java" for better Formatter
|
save(melon, write_op); // use "npx prettier --write PacketOpcodes.java" for better Formatter
|
||||||
}
|
}
|
||||||
@@ -679,11 +715,20 @@ function scan_gc() {
|
|||||||
//console.log(g_todump);
|
//console.log(g_todump);
|
||||||
}
|
}
|
||||||
|
|
||||||
//scan_gc();
|
//scan_gc(); // 1 scene proto gc
|
||||||
clean_proto_gen();
|
//clean_proto_gen(); // 5 clean proto
|
||||||
//fix_packet(false);
|
//fix_packet(false);
|
||||||
//cmdid_to_op();
|
//cmdid_to_op(); // 6. update cmd op
|
||||||
//update_cmdid_gc();
|
//update_cmdid_gc(); // 4 update cmd gc
|
||||||
//get_cmdid_gc();
|
//get_cmdid_gc(); // 3 get cmd gc
|
||||||
//get_cmdid_json();
|
//get_cmdid_json(); // 2 update cmd json
|
||||||
//check_gen();
|
//check_gen();
|
||||||
|
|
||||||
|
// Update GC Proto
|
||||||
|
//get_cmdid_gc(); // 1. get cmd old gc
|
||||||
|
//get_cmdid_json(); // 2. get last cmdid.csv to json
|
||||||
|
// now we have cmdid_gc.json and cmdid.json
|
||||||
|
//update_cmdid_gc(); // 3. update gc cmdid (mode by id)
|
||||||
|
//cmdid_to_op(); // 4. update op
|
||||||
|
//scan_gc(); // 5. scan gc
|
||||||
|
//clean_proto_gen(); // 6. clean proto
|
Reference in New Issue
Block a user