add dup name

This commit is contained in:
Akbar Yahya 2022-11-10 23:24:11 +08:00
parent 85e0ba8e44
commit ed24691719
No known key found for this signature in database
GPG Key ID: 0C9985FEC5C018C9
3 changed files with 26 additions and 8 deletions

View File

@ -1686,7 +1686,6 @@ public class PacketOpcodes {
public static final int GachaActivityNextStageReq = 8257;
public static final int LaunchFireworksRsp = 6057;
public static final int FireworksLaunchDataNotify = 5928;
public static final int DungeonReviseLevelNotify = 933;
public static final int SpiceActivityGivingRecordNotify = 8407;
public static final int IrodoriScanEntityReq = 8767;
public static final int IrodoriMasterGallerySettleNotify = 8340;

View File

@ -6719,10 +6719,6 @@
"name": "FireworksLaunchDataNotify",
"id": 5928
},
{
"name": "DungeonReviseLevelNotify",
"id": 933
},
{
"name": "SpiceActivityGivingRecordNotify",
"id": 8407

29
op.js
View File

@ -115,7 +115,7 @@ function update_cmdid_gc() {
const json_cmdid_old = JSON.parse(cmd_old);
json_cmdid_old.forEach(function (s, index) {
var id = s.id;
var name = s.name;
var name = s.name.trim();
var found_id = json_cmdid_last.find((j) => j.id == id);
if (found_id) {
@ -155,12 +155,33 @@ function update_cmdid_gc() {
}
});
check_dunp_id = []; // clear
// I don't know why this happened but make sure to check again
var check_dunp_name = [];
json_cmdid_old.forEach(function (s, index) {
var id = s.id;
var name = s.name;
var name = s.name.trim();
var found_name = check_dunp_name.find((j) => j.name === name);
if (found_name) {
console.log(
"Wow dup -> ID: " +
id +
" (ADD " +
found_name.id +
") | Name Remove: " +
name +
" (ADD " +
found_name.name +
")"
);
// remove bad
json_cmdid_old.splice(index, 1);
} else {
check_dunp_name.push(s);
}
// maybe need || j.name == name
var found_id = json_cmdid_last.find((j) => j.id == id);
if (found_id) {
if (name != found_id.name) {
@ -172,6 +193,8 @@ function update_cmdid_gc() {
}
});
check_dunp_name = []; // clear
console.log(
"found " +
found_cmdid_new +