From 135b61b4513cd307a263e54030bbdfd4b77e9794 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Thu, 1 Feb 2024 17:44:43 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E8=A3=85=E5=A4=87?= =?UTF-8?q?=E7=A9=BF=E6=88=B4=E9=94=99=E8=AF=AF=E6=97=A5=E5=BF=97=E8=A1=A5?= =?UTF-8?q?=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/equipment/api_equip.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/modules/equipment/api_equip.go b/modules/equipment/api_equip.go index cf12f57a9..5527b1e60 100644 --- a/modules/equipment/api_equip.go +++ b/modules/equipment/api_equip.go @@ -74,7 +74,6 @@ func (this *apiComp) Equip(session comm.IUserSession, req *pb.EquipmentEquipReq) this.module.Errorf("Equip_Check err:%v", err) errdata = &pb.ErrorData{ Code: pb.ErrorCode_ConfigNoFound, - Title: pb.ErrorCode_ConfigNoFound.ToString(), Message: err.Error(), } return @@ -89,9 +88,9 @@ func (this *apiComp) Equip(session comm.IUserSession, req *pb.EquipmentEquipReq) if suitconfs[i], err = this.module.configure.getEquipSuit(confs[i].Suittype); err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_ConfigNoFound, - Title: pb.ErrorCode_ConfigNoFound.ToString(), - Message: err.Error(), + Message: fmt.Sprintf("%s-err:%s", confs[i].Id, err.Error()), } + return } suit = nil @@ -157,7 +156,6 @@ func (this *apiComp) Equip(session comm.IUserSession, req *pb.EquipmentEquipReq) this.module.Errorf("Equip reader uid:%s equipment:%s err:%v", session.GetUserId(), v, err) errdata = &pb.ErrorData{ Code: pb.ErrorCode_SystemError, - Title: pb.ErrorCode_SystemError.ToString(), Message: err.Error(), } return @@ -170,7 +168,6 @@ func (this *apiComp) Equip(session comm.IUserSession, req *pb.EquipmentEquipReq) this.module.Errorf("Equip reader uid:%s equipment:%s err:%v", session.GetUserId(), v, err) errdata = &pb.ErrorData{ Code: pb.ErrorCode_SystemError, - Title: pb.ErrorCode_SystemError.ToString(), Message: err.Error(), } return From 372f23ddbb80fe446bcf1041d59f44ac103ec21b Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Thu, 1 Feb 2024 17:45:52 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E8=A3=85=E5=A4=87?= =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/equipment/api_equip.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/equipment/api_equip.go b/modules/equipment/api_equip.go index 5527b1e60..4637be57f 100644 --- a/modules/equipment/api_equip.go +++ b/modules/equipment/api_equip.go @@ -186,10 +186,11 @@ func (this *apiComp) Equip(session comm.IUserSession, req *pb.EquipmentEquipReq) for i, v := range equipments { //校验装备位置 if v != nil { if i != int(confs[i].Pos) { - this.module.Errorf("Equip conf:%+v Target:%d Incorrect range!", confs[i], i) + err = fmt.Errorf("Equip conf:%+v Target:%d Incorrect range!", confs[i], i) + this.module.Errorln(err) errdata = &pb.ErrorData{ - Code: pb.ErrorCode_SystemError, - Title: pb.ErrorCode_SystemError.ToString(), + Code: pb.ErrorCode_SystemError, + Message: err.Error(), } return } @@ -210,7 +211,6 @@ func (this *apiComp) Equip(session comm.IUserSession, req *pb.EquipmentEquipReq) this.module.Errorf("Equip err%v", err) errdata = &pb.ErrorData{ Code: pb.ErrorCode_SystemError, - Title: pb.ErrorCode_SystemError.ToString(), Message: err.Error(), } return From 252bd04039717094a94c65a6fecec2092e559510 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Thu, 1 Feb 2024 17:51:28 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E5=A4=84=E7=90=86=E6=97=A0=E5=A5=97?= =?UTF-8?q?=E8=A3=85=E6=95=88=E6=9E=9C=E8=A3=85=E5=A4=87=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/equipment/api_equip.go | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/modules/equipment/api_equip.go b/modules/equipment/api_equip.go index 4637be57f..4d1ce11df 100644 --- a/modules/equipment/api_equip.go +++ b/modules/equipment/api_equip.go @@ -85,12 +85,24 @@ func (this *apiComp) Equip(session comm.IUserSession, req *pb.EquipmentEquipReq) if equipments[i].Lv < minlv { minlv = equipments[i].Lv } - if suitconfs[i], err = this.module.configure.getEquipSuit(confs[i].Suittype); err != nil { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_ConfigNoFound, - Message: fmt.Sprintf("%s-err:%s", confs[i].Id, err.Error()), + + lvnum[equipments[i].Lv]++ + for k, _ := range lvnum { + if k > equipments[i].Lv { + lvnum[k]++ } - return + } + + if confs[i].Suittype > 0 { + if suitconfs[i], err = this.module.configure.getEquipSuit(confs[i].Suittype); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ConfigNoFound, + Message: fmt.Sprintf("%s-err:%s", confs[i].Id, err.Error()), + } + return + } + } else { + continue } suit = nil @@ -101,13 +113,6 @@ func (this *apiComp) Equip(session comm.IUserSession, req *pb.EquipmentEquipReq) } } - lvnum[equipments[i].Lv]++ - for k, _ := range lvnum { - if k > equipments[i].Lv { - lvnum[k]++ - } - } - if suit == nil { suit = &pb.DB_EquipmentSuit{ Suitid: confs[i].Suittype, From 938eca12559ecab2a385b152b44f027b2847b7d7 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Thu, 1 Feb 2024 18:09:30 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/json/game_buriedcondi.json | 2 +- bin/json/game_buriedtype.json | 8 +- bin/json/game_equip.json | 96 ++++++++++++------------ sys/configure/structs/TEnum.EEquipPos.go | 1 - 4 files changed, 55 insertions(+), 52 deletions(-) diff --git a/bin/json/game_buriedcondi.json b/bin/json/game_buriedcondi.json index 4c7a5c92e..e3cdae2dc 100644 --- a/bin/json/game_buriedcondi.json +++ b/bin/json/game_buriedcondi.json @@ -5333,7 +5333,7 @@ }, "value": 1, "filter": [ - 1102008 + 1102009 ], "filter2": [] }, diff --git a/bin/json/game_buriedtype.json b/bin/json/game_buriedtype.json index ae82541dd..4a0c68923 100644 --- a/bin/json/game_buriedtype.json +++ b/bin/json/game_buriedtype.json @@ -1502,12 +1502,16 @@ { "id": 257, "insert": 2, - "filter": [] + "filter": [ + "eq" + ] }, { "id": 258, "insert": 2, - "filter": [] + "filter": [ + "eq" + ] }, { "id": 259, diff --git a/bin/json/game_equip.json b/bin/json/game_equip.json index a908f2c61..d5e59d18c 100644 --- a/bin/json/game_equip.json +++ b/bin/json/game_equip.json @@ -31764,7 +31764,7 @@ "key": "equip_equip_suitintr_649", "text": "攻击型秘宝" }, - "pos": 7, + "pos": 6, "initLv": 1, "color": 1, "Effects": "", @@ -31813,7 +31813,7 @@ "key": "equip_equip_suitintr_650", "text": "防御型秘宝" }, - "pos": 7, + "pos": 6, "initLv": 1, "color": 1, "Effects": "", @@ -31862,7 +31862,7 @@ "key": "equip_equip_suitintr_651", "text": "辅助型秘宝" }, - "pos": 7, + "pos": 6, "initLv": 1, "color": 1, "Effects": "", @@ -31911,7 +31911,7 @@ "key": "equip_equip_suitintr_652", "text": "控制型秘宝" }, - "pos": 7, + "pos": 6, "initLv": 1, "color": 1, "Effects": "", @@ -31960,7 +31960,7 @@ "key": "equip_equip_suitintr_653", "text": "攻击型秘宝" }, - "pos": 7, + "pos": 6, "initLv": 2, "color": 2, "Effects": "", @@ -32009,7 +32009,7 @@ "key": "equip_equip_suitintr_654", "text": "防御型秘宝" }, - "pos": 7, + "pos": 6, "initLv": 2, "color": 2, "Effects": "", @@ -32058,7 +32058,7 @@ "key": "equip_equip_suitintr_655", "text": "辅助型秘宝" }, - "pos": 7, + "pos": 6, "initLv": 2, "color": 2, "Effects": "", @@ -32107,7 +32107,7 @@ "key": "equip_equip_suitintr_656", "text": "控制型秘宝" }, - "pos": 7, + "pos": 6, "initLv": 2, "color": 2, "Effects": "", @@ -32156,7 +32156,7 @@ "key": "equip_equip_suitintr_657", "text": "攻击型秘宝" }, - "pos": 7, + "pos": 6, "initLv": 3, "color": 3, "Effects": "", @@ -32205,7 +32205,7 @@ "key": "equip_equip_suitintr_658", "text": "防御型秘宝" }, - "pos": 7, + "pos": 6, "initLv": 3, "color": 3, "Effects": "", @@ -32254,7 +32254,7 @@ "key": "equip_equip_suitintr_659", "text": "辅助型秘宝" }, - "pos": 7, + "pos": 6, "initLv": 3, "color": 3, "Effects": "", @@ -32303,7 +32303,7 @@ "key": "equip_equip_suitintr_660", "text": "控制型秘宝" }, - "pos": 7, + "pos": 6, "initLv": 3, "color": 3, "Effects": "", @@ -32352,7 +32352,7 @@ "key": "equip_equip_suitintr_661", "text": "攻击型秘宝" }, - "pos": 7, + "pos": 6, "initLv": 4, "color": 4, "Effects": "", @@ -32401,7 +32401,7 @@ "key": "equip_equip_suitintr_662", "text": "防御型秘宝" }, - "pos": 7, + "pos": 6, "initLv": 4, "color": 4, "Effects": "", @@ -32450,7 +32450,7 @@ "key": "equip_equip_suitintr_663", "text": "辅助型秘宝" }, - "pos": 7, + "pos": 6, "initLv": 4, "color": 4, "Effects": "", @@ -32499,7 +32499,7 @@ "key": "equip_equip_suitintr_664", "text": "控制型秘宝" }, - "pos": 7, + "pos": 6, "initLv": 4, "color": 4, "Effects": "", @@ -32548,7 +32548,7 @@ "key": "equip_equip_suitintr_665", "text": "攻击型秘宝" }, - "pos": 7, + "pos": 6, "initLv": 5, "color": 5, "Effects": "", @@ -32595,7 +32595,7 @@ "key": "equip_equip_suitintr_666", "text": "防御型秘宝" }, - "pos": 7, + "pos": 6, "initLv": 5, "color": 5, "Effects": "", @@ -32642,7 +32642,7 @@ "key": "equip_equip_suitintr_667", "text": "辅助型秘宝" }, - "pos": 7, + "pos": 6, "initLv": 5, "color": 5, "Effects": "", @@ -32689,7 +32689,7 @@ "key": "equip_equip_suitintr_668", "text": "控制型秘宝" }, - "pos": 7, + "pos": 6, "initLv": 5, "color": 5, "Effects": "", @@ -32736,7 +32736,7 @@ "key": "equip_equip_suitintr_669", "text": "攻击型秘宝" }, - "pos": 7, + "pos": 6, "initLv": 6, "color": 6, "Effects": "", @@ -32783,7 +32783,7 @@ "key": "equip_equip_suitintr_670", "text": "防御型秘宝" }, - "pos": 7, + "pos": 6, "initLv": 6, "color": 6, "Effects": "", @@ -32830,7 +32830,7 @@ "key": "equip_equip_suitintr_671", "text": "辅助型秘宝" }, - "pos": 7, + "pos": 6, "initLv": 6, "color": 6, "Effects": "", @@ -32877,7 +32877,7 @@ "key": "equip_equip_suitintr_672", "text": "控制型秘宝" }, - "pos": 7, + "pos": 6, "initLv": 6, "color": 6, "Effects": "", @@ -32924,7 +32924,7 @@ "key": "equip_equip_suitintr_673", "text": "火的热情护身符" }, - "pos": 8, + "pos": 7, "initLv": 1, "color": 1, "Effects": "", @@ -32973,7 +32973,7 @@ "key": "equip_equip_suitintr_674", "text": "林的感观护身符" }, - "pos": 8, + "pos": 7, "initLv": 1, "color": 1, "Effects": "", @@ -33022,7 +33022,7 @@ "key": "equip_equip_suitintr_675", "text": "水的包容护身符" }, - "pos": 8, + "pos": 7, "initLv": 1, "color": 1, "Effects": "", @@ -33071,7 +33071,7 @@ "key": "equip_equip_suitintr_676", "text": "光的荣耀护身符" }, - "pos": 8, + "pos": 7, "initLv": 1, "color": 1, "Effects": "", @@ -33120,7 +33120,7 @@ "key": "equip_equip_suitintr_677", "text": "火的热情护身符" }, - "pos": 8, + "pos": 7, "initLv": 2, "color": 2, "Effects": "", @@ -33169,7 +33169,7 @@ "key": "equip_equip_suitintr_678", "text": "林的感观护身符" }, - "pos": 8, + "pos": 7, "initLv": 2, "color": 2, "Effects": "", @@ -33218,7 +33218,7 @@ "key": "equip_equip_suitintr_679", "text": "水的包容护身符" }, - "pos": 8, + "pos": 7, "initLv": 2, "color": 2, "Effects": "", @@ -33267,7 +33267,7 @@ "key": "equip_equip_suitintr_680", "text": "光的荣耀护身符" }, - "pos": 8, + "pos": 7, "initLv": 2, "color": 2, "Effects": "", @@ -33316,7 +33316,7 @@ "key": "equip_equip_suitintr_681", "text": "火的热情护身符" }, - "pos": 8, + "pos": 7, "initLv": 3, "color": 3, "Effects": "", @@ -33365,7 +33365,7 @@ "key": "equip_equip_suitintr_682", "text": "林的感观护身符" }, - "pos": 8, + "pos": 7, "initLv": 3, "color": 3, "Effects": "", @@ -33414,7 +33414,7 @@ "key": "equip_equip_suitintr_683", "text": "水的包容护身符" }, - "pos": 8, + "pos": 7, "initLv": 3, "color": 3, "Effects": "", @@ -33463,7 +33463,7 @@ "key": "equip_equip_suitintr_684", "text": "光的荣耀护身符" }, - "pos": 8, + "pos": 7, "initLv": 3, "color": 3, "Effects": "", @@ -33512,7 +33512,7 @@ "key": "equip_equip_suitintr_685", "text": "火的热情护身符" }, - "pos": 8, + "pos": 7, "initLv": 4, "color": 4, "Effects": "", @@ -33561,7 +33561,7 @@ "key": "equip_equip_suitintr_686", "text": "林的感观护身符" }, - "pos": 8, + "pos": 7, "initLv": 4, "color": 4, "Effects": "", @@ -33610,7 +33610,7 @@ "key": "equip_equip_suitintr_687", "text": "水的包容护身符" }, - "pos": 8, + "pos": 7, "initLv": 4, "color": 4, "Effects": "", @@ -33659,7 +33659,7 @@ "key": "equip_equip_suitintr_688", "text": "光的荣耀护身符" }, - "pos": 8, + "pos": 7, "initLv": 4, "color": 4, "Effects": "", @@ -33708,7 +33708,7 @@ "key": "equip_equip_suitintr_689", "text": "火的热情护身符" }, - "pos": 8, + "pos": 7, "initLv": 5, "color": 5, "Effects": "", @@ -33755,7 +33755,7 @@ "key": "equip_equip_suitintr_690", "text": "林的感观护身符" }, - "pos": 8, + "pos": 7, "initLv": 5, "color": 5, "Effects": "", @@ -33802,7 +33802,7 @@ "key": "equip_equip_suitintr_691", "text": "水的包容护身符" }, - "pos": 8, + "pos": 7, "initLv": 5, "color": 5, "Effects": "", @@ -33849,7 +33849,7 @@ "key": "equip_equip_suitintr_692", "text": "光的荣耀护身符" }, - "pos": 8, + "pos": 7, "initLv": 5, "color": 5, "Effects": "", @@ -33896,7 +33896,7 @@ "key": "equip_equip_suitintr_693", "text": "火的热情护身符" }, - "pos": 8, + "pos": 7, "initLv": 6, "color": 6, "Effects": "", @@ -33943,7 +33943,7 @@ "key": "equip_equip_suitintr_694", "text": "林的感观护身符" }, - "pos": 8, + "pos": 7, "initLv": 6, "color": 6, "Effects": "", @@ -33990,7 +33990,7 @@ "key": "equip_equip_suitintr_695", "text": "水的包容护身符" }, - "pos": 8, + "pos": 7, "initLv": 6, "color": 6, "Effects": "", @@ -34037,7 +34037,7 @@ "key": "equip_equip_suitintr_696", "text": "光的荣耀护身符" }, - "pos": 8, + "pos": 7, "initLv": 6, "color": 6, "Effects": "", diff --git a/sys/configure/structs/TEnum.EEquipPos.go b/sys/configure/structs/TEnum.EEquipPos.go index d203fc09c..9ee15ed7f 100644 --- a/sys/configure/structs/TEnum.EEquipPos.go +++ b/sys/configure/structs/TEnum.EEquipPos.go @@ -18,5 +18,4 @@ const ( TEnumEEquipPos_Five = 5 TEnumEEquipPos_Six = 6 TEnumEEquipPos_Seven = 7 - TEnumEEquipPos_Eight = 8 ) From d6a510c993873eeb7cb338ca7e414f3c8a4c5de4 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Fri, 2 Feb 2024 10:03:11 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E8=A3=85=E5=A4=87?= =?UTF-8?q?=E5=8D=87=E7=BA=A7=E7=A5=9E=E5=99=A8=E6=97=A0=E5=A5=97=E8=A3=85?= =?UTF-8?q?=E6=95=88=E6=9E=9C=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/equipment/api_upgrade.go | 27 +++++++++++++++++---------- modules/viking/comp_configure.go | 1 - 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/modules/equipment/api_upgrade.go b/modules/equipment/api_upgrade.go index fe10facab..f5f28060b 100644 --- a/modules/equipment/api_upgrade.go +++ b/modules/equipment/api_upgrade.go @@ -209,25 +209,32 @@ func (this *apiComp) Upgrade(session comm.IUserSession, req *pb.EquipmentUpgrade } return } - if suitconfs[i], err = this.module.configure.getEquipSuit(confs[i].Suittype); err != nil { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_ConfigNoFound, - Title: pb.ErrorCode_ConfigNoFound.ToString(), - Message: err.Error(), + if confs[i].Suittype > 0 { + if suitconfs[i], err = this.module.configure.getEquipSuit(confs[i].Suittype); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ConfigNoFound, + Title: pb.ErrorCode_ConfigNoFound.ToString(), + Message: err.Error(), + } } } } else { equipments[i] = equipment confs[i] = conf - if suitconfs[i], err = this.module.configure.getEquipSuit(confs[i].Suittype); err != nil { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_ConfigNoFound, - Title: pb.ErrorCode_ConfigNoFound.ToString(), - Message: err.Error(), + if confs[i].Suittype > 0 { + if suitconfs[i], err = this.module.configure.getEquipSuit(confs[i].Suittype); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ConfigNoFound, + Title: pb.ErrorCode_ConfigNoFound.ToString(), + Message: err.Error(), + } } } } + if confs[i].Suittype == 0 { + continue + } suit = nil for _, _suit := range suits { if _suit.Suitid == confs[i].Suittype && !_suit.Effect { //找到一个未生效的套装 diff --git a/modules/viking/comp_configure.go b/modules/viking/comp_configure.go index 4843a33af..37b3bd633 100644 --- a/modules/viking/comp_configure.go +++ b/modules/viking/comp_configure.go @@ -148,5 +148,4 @@ func (this *configureComp) GetGameSweepData(id int32, round int32) (conf *cfg.Ga err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_sweep, id) return } - return }