This commit is contained in:
meixiongfeng 2023-06-08 11:39:48 +08:00
commit 9bb4a1e7ed
12 changed files with 5698 additions and 6097 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1022,7 +1022,9 @@
{ {
"id": 169, "id": 169,
"insert": 1, "insert": 1,
"filter": [] "filter": [
"eq"
]
}, },
{ {
"id": 170, "id": 170,

File diff suppressed because it is too large Load Diff

View File

@ -19469,8 +19469,8 @@
"Type": 2, "Type": 2,
"Argu": [ "Argu": [
424009012, 424009012,
1, -1,
1 -1
], ],
"FollowSK": [], "FollowSK": [],
"SucFollowSK": [], "SucFollowSK": [],
@ -19536,12 +19536,12 @@
"Where": [], "Where": [],
"Order": "", "Order": "",
"Limit": 10, "Limit": 10,
"ExecuteCnt": 3, "ExecuteCnt": 6,
"Type": 1, "Type": 1,
"Argu": [ "Argu": [
1, 1,
4, 4,
1350 1000
], ],
"FollowSK": [], "FollowSK": [],
"SucFollowSK": [], "SucFollowSK": [],

View File

@ -11968,8 +11968,8 @@
"ChildSkill": { "ChildSkill": {
"Id": [ "Id": [
224009311, 224009311,
224009313, 224009312,
224009312 224009313
] ]
}, },
"Desc": { "Desc": {

View File

@ -180,5 +180,122 @@
"t": "exp", "t": "exp",
"n": 1000 "n": 1000
} }
},
{
"id": 115,
"FormatList": [
700025
],
"BattleReadyID": 101,
"EventList": [],
"playexp": {
"a": "attr",
"t": "exp",
"n": 1001
}
},
{
"id": 116,
"FormatList": [
700026
],
"BattleReadyID": 102,
"EventList": [],
"playexp": {
"a": "attr",
"t": "exp",
"n": 1002
}
},
{
"id": 117,
"FormatList": [
700027
],
"BattleReadyID": 103,
"EventList": [],
"playexp": {
"a": "attr",
"t": "exp",
"n": 1003
}
},
{
"id": 118,
"FormatList": [
700028
],
"BattleReadyID": 104,
"EventList": [],
"playexp": {
"a": "attr",
"t": "exp",
"n": 1004
}
},
{
"id": 119,
"FormatList": [
700029
],
"BattleReadyID": 105,
"EventList": [],
"playexp": {
"a": "attr",
"t": "exp",
"n": 1005
}
},
{
"id": 120,
"FormatList": [
700030
],
"BattleReadyID": 106,
"EventList": [],
"playexp": {
"a": "attr",
"t": "exp",
"n": 1006
}
},
{
"id": 121,
"FormatList": [
700031
],
"BattleReadyID": 107,
"EventList": [],
"playexp": {
"a": "attr",
"t": "exp",
"n": 1007
}
},
{
"id": 122,
"FormatList": [
700032
],
"BattleReadyID": 108,
"EventList": [],
"playexp": {
"a": "attr",
"t": "exp",
"n": 1008
}
},
{
"id": 123,
"FormatList": [
700033
],
"BattleReadyID": 109,
"EventList": [],
"playexp": {
"a": "attr",
"t": "exp",
"n": 1009
}
} }
] ]

File diff suppressed because it is too large Load Diff

View File

@ -191,7 +191,7 @@ func (this *apiComp) Upgrade(session comm.IUserSession, req *pb.EquipmentUpgrade
errdata = &pb.ErrorData{ errdata = &pb.ErrorData{
Code: pb.ErrorCode_EquipmentOnFoundEquipment, Code: pb.ErrorCode_EquipmentOnFoundEquipment,
Title: pb.ErrorCode_EquipmentOnFoundEquipment.ToString(), Title: pb.ErrorCode_EquipmentOnFoundEquipment.ToString(),
Message: fmt.Sprintf("未找到装备 uid:%s id:%d", session.GetUserId(), v), Message: fmt.Sprintf("未找到装备 uid:%s id:%s", session.GetUserId(), v),
} }
return return
} }

View File

@ -413,6 +413,9 @@ func (this *modelEquipmentComp) upgradeEquipment(equipment *pb.DB_Equipment, equ
} }
if equip.EquipId == 1 { if equip.EquipId == 1 {
if len(equipment.AdverbEntry) <= 0 {
return
}
var attrlibrary *cfg.GameEquipAttrlibrarySData var attrlibrary *cfg.GameEquipAttrlibrarySData
r := rand.New(rand.NewSource(configure.Now().Unix())) r := rand.New(rand.NewSource(configure.Now().Unix()))
index := r.Perm(len(equipment.AdverbEntry))[0] index := r.Perm(len(equipment.AdverbEntry))[0]

View File

@ -54,24 +54,24 @@ func (this *apiComp) Decompose(session comm.IUserSession, req *pb.ItemsDecompose
} }
return return
} }
sale = make([]*cfg.Gameatn, 0, len(itemcf.DecomposeDeplete)) // sale = make([]*cfg.Gameatn, 0, len(itemcf.DecomposeDeplete))
for _, v := range itemcf.DecomposeDeplete { // for _, v := range itemcf.DecomposeDeplete {
sale = append(sale, &cfg.Gameatn{ // sale = append(sale, &cfg.Gameatn{
A: v.A, // A: v.A,
T: v.T, // T: v.T,
N: v.N * int32(req.Amount), // N: v.N * int32(req.Amount),
}) // })
} // }
if errdata = this.module.ConsumeRes(session, sale, true); errdata != nil { // if errdata = this.module.ConsumeRes(session, sale, true); errdata != nil {
return // return
} // }
if req.Amount > item.Amount { if req.Amount > item.Amount {
this.module.Errorf("SellItemCheck over all amount:[%d:%d]", req.Amount, item.Amount) this.module.Errorf("SellItemCheck over all amount:[%d:%d]", req.Amount, item.Amount)
errdata = &pb.ErrorData{ errdata = &pb.ErrorData{
Code: pb.ErrorCode_ReqParameterError, Code: pb.ErrorCode_ReqParameterError,
Title: pb.ErrorCode_ReqParameterError.ToString(), Title: pb.ErrorCode_ReqParameterError.ToString(),
Message: fmt.Sprintf("道具数量不足! 道具数量:%s", item.Amount), Message: fmt.Sprintf("道具数量不足! 道具数量:%d", item.Amount),
} }
return return
} }

View File

@ -116,7 +116,8 @@ func (this *apiComp) Useitem(session comm.IUserSession, req *pb.ItemsUseItemReq)
if errdata = this.module.DispenseRes(session, sale, true); errdata != nil { if errdata = this.module.DispenseRes(session, sale, true); errdata != nil {
return return
} }
case itemuse_synthesis: //合成 case itemuse_synthesis: //合成/分解
if req.Select == 0 { // 合成
user := this.module.ModuleUser.GetUser(session.GetUserId()) user := this.module.ModuleUser.GetUser(session.GetUserId())
reward := this.module.ModuleTools.GetGroupDataByLottery(itemcf.BoxId, user.Vip, user.Lv) // 走新的掉落 reward := this.module.ModuleTools.GetGroupDataByLottery(itemcf.BoxId, user.Vip, user.Lv) // 走新的掉落
if reward == nil { if reward == nil {
@ -131,7 +132,7 @@ func (this *apiComp) Useitem(session comm.IUserSession, req *pb.ItemsUseItemReq)
errdata = &pb.ErrorData{ errdata = &pb.ErrorData{
Code: pb.ErrorCode_ItemsNoEnough, Code: pb.ErrorCode_ItemsNoEnough,
Title: pb.ErrorCode_ItemsNoEnough.ToString(), Title: pb.ErrorCode_ItemsNoEnough.ToString(),
Message: fmt.Sprintf("道具Id:%d", itemcf.Id), Message: fmt.Sprintf("道具Id:%s", itemcf.Id),
} }
return return
} }
@ -161,7 +162,55 @@ func (this *apiComp) Useitem(session comm.IUserSession, req *pb.ItemsUseItemReq)
if errdata = this.module.DispenseRes(session, sale, true); errdata != nil { if errdata = this.module.DispenseRes(session, sale, true); errdata != nil {
return return
} }
} else {
if item, err = this.module.modelItems.QueryUserPackByGridId(session.GetUserId(), req.GridId); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ReqParameterError,
Title: pb.ErrorCode_ReqParameterError.ToString(),
Message: err.Error(),
}
return
}
if itemcf, err = this.module.configure.GetItemConfigure(item.ItemId); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ConfigurationException,
Title: pb.ErrorCode_ConfigurationException.ToString(),
Message: err.Error(),
}
return
}
if itemcf.DecomposeDeplete == nil || len(itemcf.DecomposeDeplete) == 0 {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ItemsUseNoCanSell,
Title: pb.ErrorCode_ItemsUseNoCanSell.ToString(),
Message: fmt.Sprintf("道具分解配置未配置! 道具id:%s", itemcf.Id),
}
return
}
if req.Amount > item.Amount {
this.module.Errorf("SellItemCheck over all amount:[%d:%d]", req.Amount, item.Amount)
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ReqParameterError,
Title: pb.ErrorCode_ReqParameterError.ToString(),
Message: fmt.Sprintf("道具数量不足! 道具数量:%d", item.Amount),
}
return
}
sale := make([]*cfg.Gameatn, len(itemcf.Sale))
for i, v := range itemcf.DecomposeDeplete {
temp := *v
sale[i] = &temp
sale[i].N = v.N * int32(req.Amount)
}
if errdata = this.module.DispenseRes(session, sale, true); errdata != nil {
return
}
item.Amount = item.Amount - req.Amount
if errdata = this.module.AddItemforGrid(session, req.GridId, -1*int32(req.Amount), true); errdata != nil {
return
}
}
default: default:
errdata = &pb.ErrorData{ errdata = &pb.ErrorData{
Code: pb.ErrorCode_ItemsUseNotSupported, Code: pb.ErrorCode_ItemsUseNotSupported,

View File

@ -48,7 +48,6 @@ func (this *apiComp) Getall(session comm.IUserSession, req *pb.OldtimesGetallReq
log.Field{Key: "uid", Value: uid}) log.Field{Key: "uid", Value: uid})
continue continue
} }
unlockLevelIds = append(unlockLevelIds, level.Lid)
} }
} }
} }