上传配置
This commit is contained in:
parent
959a467d3a
commit
972b5a4df7
@ -26331,7 +26331,7 @@
|
||||
"key": "buried_buried_condi_tasktxt_938",
|
||||
"text": "当日消耗100点体力"
|
||||
},
|
||||
"type": 303,
|
||||
"type": 213,
|
||||
"valid": 0,
|
||||
"head": {
|
||||
"a": "attr",
|
||||
@ -26397,7 +26397,7 @@
|
||||
"key": "buried_buried_condi_tasktxt_941",
|
||||
"text": "当日消耗30点体力"
|
||||
},
|
||||
"type": 303,
|
||||
"type": 213,
|
||||
"valid": 0,
|
||||
"head": {
|
||||
"a": "attr",
|
||||
@ -26551,7 +26551,7 @@
|
||||
"key": "buried_buried_condi_tasktxt_941",
|
||||
"text": "当日消耗100点体力"
|
||||
},
|
||||
"type": 303,
|
||||
"type": 213,
|
||||
"valid": 0,
|
||||
"head": {
|
||||
"a": "attr",
|
||||
@ -26705,7 +26705,7 @@
|
||||
"key": "buried_buried_condi_tasktxt_941",
|
||||
"text": "当日消耗300点体力"
|
||||
},
|
||||
"type": 303,
|
||||
"type": 213,
|
||||
"valid": 0,
|
||||
"head": {
|
||||
"a": "attr",
|
||||
|
@ -1196,29 +1196,34 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 300,
|
||||
"id": 210,
|
||||
"insert": 1,
|
||||
"filter": [
|
||||
"eq"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 301,
|
||||
"id": 211,
|
||||
"insert": 1,
|
||||
"filter": [
|
||||
"eq"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 302,
|
||||
"id": 212,
|
||||
"insert": 1,
|
||||
"filter": [
|
||||
"eq"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 303,
|
||||
"insert": 1,
|
||||
"id": 213,
|
||||
"insert": 2,
|
||||
"filter": []
|
||||
},
|
||||
{
|
||||
"id": 214,
|
||||
"insert": 2,
|
||||
"filter": []
|
||||
}
|
||||
]
|
@ -10,10 +10,10 @@
|
||||
"text": "月末狂欢,冰点特价"
|
||||
},
|
||||
"resource": "",
|
||||
"integral": [
|
||||
3000
|
||||
"condition": [
|
||||
60000004
|
||||
],
|
||||
"condition": 60000004,
|
||||
"condition_or": [],
|
||||
"lbid": [
|
||||
{
|
||||
"a": "attr",
|
||||
@ -38,10 +38,10 @@
|
||||
"text": "月末狂欢,冰点特价"
|
||||
},
|
||||
"resource": "",
|
||||
"integral": [
|
||||
3000
|
||||
"condition": [
|
||||
60000005
|
||||
],
|
||||
"condition": 60000005,
|
||||
"condition_or": [],
|
||||
"lbid": [
|
||||
{
|
||||
"a": "attr",
|
||||
@ -66,10 +66,10 @@
|
||||
"text": "月末狂欢,冰点特价"
|
||||
},
|
||||
"resource": "",
|
||||
"integral": [
|
||||
3000
|
||||
"condition": [
|
||||
60000006
|
||||
],
|
||||
"condition": 60000006,
|
||||
"condition_or": [],
|
||||
"lbid": [
|
||||
{
|
||||
"a": "attr",
|
||||
@ -94,10 +94,10 @@
|
||||
"text": "月末狂欢,冰点特价"
|
||||
},
|
||||
"resource": "",
|
||||
"integral": [
|
||||
3000
|
||||
"condition": [
|
||||
60000007
|
||||
],
|
||||
"condition": 60000007,
|
||||
"condition_or": [],
|
||||
"lbid": [
|
||||
{
|
||||
"a": "attr",
|
||||
@ -122,10 +122,10 @@
|
||||
"text": "月末狂欢,冰点特价"
|
||||
},
|
||||
"resource": "",
|
||||
"integral": [
|
||||
3000
|
||||
"condition": [
|
||||
60000008
|
||||
],
|
||||
"condition": 60000008,
|
||||
"condition_or": [],
|
||||
"lbid": [
|
||||
{
|
||||
"a": "attr",
|
||||
@ -150,10 +150,10 @@
|
||||
"text": "月末狂欢,冰点特价"
|
||||
},
|
||||
"resource": "",
|
||||
"integral": [
|
||||
3000
|
||||
"condition": [
|
||||
60000009
|
||||
],
|
||||
"condition": 60000009,
|
||||
"condition_or": [],
|
||||
"lbid": [
|
||||
{
|
||||
"a": "attr",
|
||||
@ -178,10 +178,10 @@
|
||||
"text": "月末狂欢,冰点特价"
|
||||
},
|
||||
"resource": "",
|
||||
"integral": [
|
||||
3000
|
||||
"condition": [
|
||||
70000001
|
||||
],
|
||||
"condition": 70000001,
|
||||
"condition_or": [],
|
||||
"lbid": [
|
||||
{
|
||||
"a": "attr",
|
||||
|
@ -95,14 +95,16 @@ func (this *PushGiftbag) Delivery(session comm.IUserSession, pid string) (errdat
|
||||
// 埋点通知
|
||||
func (this *PushGiftbag) BuriedsNotify(session comm.IUserSession, condis []*pb.ConIProgress) {
|
||||
var (
|
||||
confs []*cfg.GamePushGiftData
|
||||
info *pb.DBPushGiftbag
|
||||
user *pb.DBUser
|
||||
condisMap map[int32]*pb.ConIProgress = make(map[int32]*pb.ConIProgress)
|
||||
targets map[int32]*cfg.GamePushGiftData = make(map[int32]*cfg.GamePushGiftData)
|
||||
item []*pb.DBPushGiftbagItem
|
||||
ok bool
|
||||
err error
|
||||
confs []*cfg.GamePushGiftData
|
||||
info *pb.DBPushGiftbag
|
||||
user *pb.DBUser
|
||||
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)
|
||||
conIProgress *pb.ConIProgress
|
||||
item []*pb.DBPushGiftbagItem
|
||||
ok bool
|
||||
err error
|
||||
)
|
||||
this.Debug("收到子任务进度变化推送", log.Field{Key: "uid", Value: session.GetUserId()}, log.Field{Key: "condis", Value: condis})
|
||||
if confs, err = this.configure.getGamePushGift(); err != nil {
|
||||
@ -122,8 +124,44 @@ func (this *PushGiftbag) BuriedsNotify(session comm.IUserSession, condis []*pb.C
|
||||
}
|
||||
|
||||
for _, v := range confs {
|
||||
if _, ok = condisMap[v.Condition]; ok && user.Integral >= int64(v.Integral[0]) && user.Integral <= int64(v.Integral[1]) {
|
||||
targets[v.Id] = v
|
||||
for _, v1 := range v.Condition {
|
||||
if _, ok = condisMap[v1]; ok {
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -86,4 +86,9 @@ const (
|
||||
GameBuffType_SHILED_CAN_ADD = 93
|
||||
GameBuffType_SPECIAL_SHIELD = 94
|
||||
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
|
||||
)
|
||||
|
@ -118,5 +118,6 @@ const (
|
||||
GamePropertyType_Shield_Per = 106
|
||||
GamePropertyType_Base_Shield = 107
|
||||
GamePropertyType_Ext_Shield = 108
|
||||
GamePropertyType_Max = 109
|
||||
GamePropertyType_TreCrit = 109
|
||||
GamePropertyType_Max = 110
|
||||
)
|
||||
|
@ -15,8 +15,8 @@ type GamePushGiftData struct {
|
||||
Name string
|
||||
Title string
|
||||
Resource string
|
||||
Integral []int32
|
||||
Condition int32
|
||||
Condition []int32
|
||||
ConditionOr []int32
|
||||
Lbid []*Gameatn
|
||||
Time int32
|
||||
Rebate int32
|
||||
@ -39,18 +39,31 @@ func (_v *GamePushGiftData)Deserialize(_buf map[string]interface{}) (err error)
|
||||
{
|
||||
var _arr_ []interface{}
|
||||
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_ {
|
||||
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.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 _ok_ bool
|
||||
|
Loading…
Reference in New Issue
Block a user