上传配置

This commit is contained in:
liwei 2023-08-10 15:46:33 +08:00
parent 959a467d3a
commit 972b5a4df7
7 changed files with 109 additions and 47 deletions

View File

@ -26331,7 +26331,7 @@
"key": "buried_buried_condi_tasktxt_938", "key": "buried_buried_condi_tasktxt_938",
"text": "当日消耗100点体力" "text": "当日消耗100点体力"
}, },
"type": 303, "type": 213,
"valid": 0, "valid": 0,
"head": { "head": {
"a": "attr", "a": "attr",
@ -26397,7 +26397,7 @@
"key": "buried_buried_condi_tasktxt_941", "key": "buried_buried_condi_tasktxt_941",
"text": "当日消耗30点体力" "text": "当日消耗30点体力"
}, },
"type": 303, "type": 213,
"valid": 0, "valid": 0,
"head": { "head": {
"a": "attr", "a": "attr",
@ -26551,7 +26551,7 @@
"key": "buried_buried_condi_tasktxt_941", "key": "buried_buried_condi_tasktxt_941",
"text": "当日消耗100点体力" "text": "当日消耗100点体力"
}, },
"type": 303, "type": 213,
"valid": 0, "valid": 0,
"head": { "head": {
"a": "attr", "a": "attr",
@ -26705,7 +26705,7 @@
"key": "buried_buried_condi_tasktxt_941", "key": "buried_buried_condi_tasktxt_941",
"text": "当日消耗300点体力" "text": "当日消耗300点体力"
}, },
"type": 303, "type": 213,
"valid": 0, "valid": 0,
"head": { "head": {
"a": "attr", "a": "attr",

View File

@ -1196,29 +1196,34 @@
] ]
}, },
{ {
"id": 300, "id": 210,
"insert": 1, "insert": 1,
"filter": [ "filter": [
"eq" "eq"
] ]
}, },
{ {
"id": 301, "id": 211,
"insert": 1, "insert": 1,
"filter": [ "filter": [
"eq" "eq"
] ]
}, },
{ {
"id": 302, "id": 212,
"insert": 1, "insert": 1,
"filter": [ "filter": [
"eq" "eq"
] ]
}, },
{ {
"id": 303, "id": 213,
"insert": 1, "insert": 2,
"filter": []
},
{
"id": 214,
"insert": 2,
"filter": [] "filter": []
} }
] ]

View File

@ -10,10 +10,10 @@
"text": "月末狂欢,冰点特价" "text": "月末狂欢,冰点特价"
}, },
"resource": "", "resource": "",
"integral": [ "condition": [
3000 60000004
], ],
"condition": 60000004, "condition_or": [],
"lbid": [ "lbid": [
{ {
"a": "attr", "a": "attr",
@ -38,10 +38,10 @@
"text": "月末狂欢,冰点特价" "text": "月末狂欢,冰点特价"
}, },
"resource": "", "resource": "",
"integral": [ "condition": [
3000 60000005
], ],
"condition": 60000005, "condition_or": [],
"lbid": [ "lbid": [
{ {
"a": "attr", "a": "attr",
@ -66,10 +66,10 @@
"text": "月末狂欢,冰点特价" "text": "月末狂欢,冰点特价"
}, },
"resource": "", "resource": "",
"integral": [ "condition": [
3000 60000006
], ],
"condition": 60000006, "condition_or": [],
"lbid": [ "lbid": [
{ {
"a": "attr", "a": "attr",
@ -94,10 +94,10 @@
"text": "月末狂欢,冰点特价" "text": "月末狂欢,冰点特价"
}, },
"resource": "", "resource": "",
"integral": [ "condition": [
3000 60000007
], ],
"condition": 60000007, "condition_or": [],
"lbid": [ "lbid": [
{ {
"a": "attr", "a": "attr",
@ -122,10 +122,10 @@
"text": "月末狂欢,冰点特价" "text": "月末狂欢,冰点特价"
}, },
"resource": "", "resource": "",
"integral": [ "condition": [
3000 60000008
], ],
"condition": 60000008, "condition_or": [],
"lbid": [ "lbid": [
{ {
"a": "attr", "a": "attr",
@ -150,10 +150,10 @@
"text": "月末狂欢,冰点特价" "text": "月末狂欢,冰点特价"
}, },
"resource": "", "resource": "",
"integral": [ "condition": [
3000 60000009
], ],
"condition": 60000009, "condition_or": [],
"lbid": [ "lbid": [
{ {
"a": "attr", "a": "attr",
@ -178,10 +178,10 @@
"text": "月末狂欢,冰点特价" "text": "月末狂欢,冰点特价"
}, },
"resource": "", "resource": "",
"integral": [ "condition": [
3000 70000001
], ],
"condition": 70000001, "condition_or": [],
"lbid": [ "lbid": [
{ {
"a": "attr", "a": "attr",

View File

@ -99,7 +99,9 @@ func (this *PushGiftbag) BuriedsNotify(session comm.IUserSession, condis []*pb.C
info *pb.DBPushGiftbag info *pb.DBPushGiftbag
user *pb.DBUser user *pb.DBUser
condisMap map[int32]*pb.ConIProgress = make(map[int32]*pb.ConIProgress) condisMap map[int32]*pb.ConIProgress = make(map[int32]*pb.ConIProgress)
comdisScils []int32 = make([]int32, 0)
targets map[int32]*cfg.GamePushGiftData = make(map[int32]*cfg.GamePushGiftData) targets map[int32]*cfg.GamePushGiftData = make(map[int32]*cfg.GamePushGiftData)
conIProgress *pb.ConIProgress
item []*pb.DBPushGiftbagItem item []*pb.DBPushGiftbagItem
ok bool ok bool
err error err error
@ -122,8 +124,44 @@ func (this *PushGiftbag) BuriedsNotify(session comm.IUserSession, condis []*pb.C
} }
for _, v := range confs { for _, v := range confs {
if _, ok = condisMap[v.Condition]; ok && user.Integral >= int64(v.Integral[0]) && user.Integral <= int64(v.Integral[1]) { for _, v1 := range v.Condition {
if _, ok = condisMap[v1]; ok {
targets[v.Id] = v targets[v.Id] = v
comdisScils = append(comdisScils, v.Condition...)
break
}
}
}
for _, v := range comdisScils {
if _, ok = condisMap[v]; !ok { //条件不全需要查询全部条件
if condis, err = this.ModuleBuried.CheckCondition(session.GetUserId(), comdisScils...); err != nil {
this.Error("校验玩家子任务进度数据 失败", log.Field{Key: "err", Value: err.Error()})
return
}
condisMap = make(map[int32]*pb.ConIProgress)
for _, v := range condis {
condisMap[v.Conid] = v
}
break
}
}
for k, v := range targets {
for _, cid := range v.Condition {
if conIProgress, ok = condisMap[cid]; !ok || conIProgress.State == pb.BuriedItemFinishState_buried_unfinish { //未完成
delete(targets, k)
}
}
for _, cid := range v.ConditionOr {
if conIProgress, ok = condisMap[cid]; ok && conIProgress.State == pb.BuriedItemFinishState_buried_finish { //完成一个即可
ok = true
break
}
ok = false
}
if !ok {
delete(targets, k)
} }
} }

View File

@ -86,4 +86,9 @@ const (
GameBuffType_SHILED_CAN_ADD = 93 GameBuffType_SHILED_CAN_ADD = 93
GameBuffType_SPECIAL_SHIELD = 94 GameBuffType_SPECIAL_SHIELD = 94
GameBuffType_PROB_RESISTBUFF = 95 GameBuffType_PROB_RESISTBUFF = 95
GameBuffType_HAS_BUFF_MODIFY_EFFECT_RESIST = 96
GameBuffType_ADJUST_PRO_BY_DMG = 97
GameBuffType_BE_DMG_ADD_ONCE_PER_PERSON = 98
GameBuffType_IGNORE_EFFECT_RESIST = 99
GameBuffType_IGNORE_IMMUNITY = 100
) )

View File

@ -118,5 +118,6 @@ const (
GamePropertyType_Shield_Per = 106 GamePropertyType_Shield_Per = 106
GamePropertyType_Base_Shield = 107 GamePropertyType_Base_Shield = 107
GamePropertyType_Ext_Shield = 108 GamePropertyType_Ext_Shield = 108
GamePropertyType_Max = 109 GamePropertyType_TreCrit = 109
GamePropertyType_Max = 110
) )

View File

@ -15,8 +15,8 @@ type GamePushGiftData struct {
Name string Name string
Title string Title string
Resource string Resource string
Integral []int32 Condition []int32
Condition int32 ConditionOr []int32
Lbid []*Gameatn Lbid []*Gameatn
Time int32 Time int32
Rebate int32 Rebate int32
@ -39,18 +39,31 @@ func (_v *GamePushGiftData)Deserialize(_buf map[string]interface{}) (err error)
{ {
var _arr_ []interface{} var _arr_ []interface{}
var _ok_ bool var _ok_ bool
if _arr_, _ok_ = _buf["integral"].([]interface{}); !_ok_ { err = errors.New("integral error"); return } if _arr_, _ok_ = _buf["condition"].([]interface{}); !_ok_ { err = errors.New("condition error"); return }
_v.Integral = make([]int32, 0, len(_arr_)) _v.Condition = make([]int32, 0, len(_arr_))
for _, _e_ := range _arr_ { for _, _e_ := range _arr_ {
var _list_v_ int32 var _list_v_ int32
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) } { var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) }
_v.Integral = append(_v.Integral, _list_v_) _v.Condition = append(_v.Condition, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["condition_or"].([]interface{}); !_ok_ { err = errors.New("condition_or error"); return }
_v.ConditionOr = make([]int32, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ int32
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) }
_v.ConditionOr = append(_v.ConditionOr, _list_v_)
} }
} }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["condition"].(float64); !_ok_ { err = errors.New("condition error"); return }; _v.Condition = int32(_tempNum_) }
{ {
var _arr_ []interface{} var _arr_ []interface{}
var _ok_ bool var _ok_ bool