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,
"insert": 1,
"filter": []
"filter": [
"eq"
]
},
{
"id": 170,

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

@ -180,5 +180,122 @@
"t": "exp",
"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{
Code: pb.ErrorCode_EquipmentOnFoundEquipment,
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
}

View File

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

View File

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

View File

@ -116,52 +116,101 @@ func (this *apiComp) Useitem(session comm.IUserSession, req *pb.ItemsUseItemReq)
if errdata = this.module.DispenseRes(session, sale, true); errdata != nil {
return
}
case itemuse_synthesis: //合成
user := this.module.ModuleUser.GetUser(session.GetUserId())
reward := this.module.ModuleTools.GetGroupDataByLottery(itemcf.BoxId, user.Vip, user.Lv) // 走新的掉落
if reward == nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ConfigNoFound,
Title: pb.ErrorCode_ConfigNoFound.ToString(),
Message: fmt.Sprintf("掉落组未找到:%d", itemcf.BoxId),
case itemuse_synthesis: //合成/分解
if req.Select == 0 { // 合成
user := this.module.ModuleUser.GetUser(session.GetUserId())
reward := this.module.ModuleTools.GetGroupDataByLottery(itemcf.BoxId, user.Vip, user.Lv) // 走新的掉落
if reward == nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ConfigNoFound,
Title: pb.ErrorCode_ConfigNoFound.ToString(),
Message: fmt.Sprintf("掉落组未找到:%d", itemcf.BoxId),
}
return
}
return
}
if itemcf.SynthetizeNum*int32(req.Amount) > int32(item.Amount) { //碎片数量不够
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ItemsNoEnough,
Title: pb.ErrorCode_ItemsNoEnough.ToString(),
Message: fmt.Sprintf("道具Id:%d", itemcf.Id),
if itemcf.SynthetizeNum*int32(req.Amount) > int32(item.Amount) { //碎片数量不够
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ItemsNoEnough,
Title: pb.ErrorCode_ItemsNoEnough.ToString(),
Message: fmt.Sprintf("道具Id:%s", itemcf.Id),
}
return
}
sale := make([]*cfg.Gameatn, 0, len(itemcf.SynthetizeDeplete))
for _, v := range itemcf.SynthetizeDeplete {
sale = append(sale, &cfg.Gameatn{
A: v.A,
T: v.T,
N: v.N * int32(req.Amount),
})
}
if errdata = this.module.ConsumeRes(session, sale, true); errdata != nil {
return
}
return
}
sale := make([]*cfg.Gameatn, 0, len(itemcf.SynthetizeDeplete))
for _, v := range itemcf.SynthetizeDeplete {
sale = append(sale, &cfg.Gameatn{
A: v.A,
T: v.T,
N: v.N * int32(req.Amount),
})
}
if errdata = this.module.ConsumeRes(session, sale, true); errdata != nil {
return
}
if errdata = this.module.AddItemforGrid(session, req.GridId, -1*itemcf.SynthetizeNum*int32(req.Amount), true); errdata != nil {
return
}
sale = make([]*cfg.Gameatn, 0, len(prop))
for _, v1 := range reward {
sale = append(sale, &cfg.Gameatn{
A: v1.A,
T: v1.T,
N: v1.N * int32(req.Amount),
})
}
if errdata = this.module.DispenseRes(session, sale, true); errdata != nil {
return
}
if errdata = this.module.AddItemforGrid(session, req.GridId, -1*itemcf.SynthetizeNum*int32(req.Amount), true); errdata != nil {
return
}
sale = make([]*cfg.Gameatn, 0, len(prop))
for _, v1 := range reward {
sale = append(sale, &cfg.Gameatn{
A: v1.A,
T: v1.T,
N: v1.N * int32(req.Amount),
})
}
if errdata = this.module.DispenseRes(session, sale, true); errdata != nil {
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:
errdata = &pb.ErrorData{
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})
continue
}
unlockLevelIds = append(unlockLevelIds, level.Lid)
}
}
}