Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
4532be4350
@ -4,7 +4,6 @@ import (
|
|||||||
"go_dreamfactory/comm"
|
"go_dreamfactory/comm"
|
||||||
"go_dreamfactory/pb"
|
"go_dreamfactory/pb"
|
||||||
cfg "go_dreamfactory/sys/configure/structs"
|
cfg "go_dreamfactory/sys/configure/structs"
|
||||||
"strconv"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
//参数校验
|
//参数校验
|
||||||
@ -190,22 +189,17 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.IntegralCh
|
|||||||
if c, e := this.module.configure.GetIntegralBUffSkillGroup(); e == nil {
|
if c, e := this.module.configure.GetIntegralBUffSkillGroup(); e == nil {
|
||||||
for _, v := range c {
|
for _, v := range c {
|
||||||
if mp, e := this.module.configure.GetIntegralBUff(v); e == nil {
|
if mp, e := this.module.configure.GetIntegralBUff(v); e == nil {
|
||||||
bFound := false
|
// 必须是一样的
|
||||||
for _, v := range mp {
|
if len(req.Report.Info.Buffer) == len(mp) {
|
||||||
bFound := false
|
skillgroup = v
|
||||||
for _, v1 := range req.Report.Info.Buffer {
|
for _, v1 := range req.Report.Info.Buffer {
|
||||||
if v1 == v {
|
if _, ok := mp[v1]; !ok {
|
||||||
bFound = true
|
skillgroup = 0
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if !bFound {
|
|
||||||
skillgroup = 0
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if bFound {
|
if skillgroup != 0 {
|
||||||
skillgroup = v
|
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -220,7 +214,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.IntegralCh
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if skillgroup != 0 { // 统计型任务 来统计积分boss难度对应的异化值
|
if skillgroup != 0 { // 统计型任务 来统计积分boss难度对应的异化值
|
||||||
tasks = append(tasks, comm.GetBuriedParam2(comm.Rtype259, strconv.Itoa(int(skillgroup)), skillgroup)) // 改任意难度
|
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype259, 1, skillgroup)) // 改任意难度
|
||||||
}
|
}
|
||||||
|
|
||||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||||
|
@ -237,15 +237,17 @@ func (this *configureComp) GetIntegralAchieveByKey(id int32) (result *cfg.GameIn
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *configureComp) GetIntegralBUff(group int32) (szSkillId []int32, err error) {
|
func (this *configureComp) GetIntegralBUff(group int32) (szSkillId map[int32]struct{}, err error) {
|
||||||
var (
|
var (
|
||||||
v interface{}
|
v interface{}
|
||||||
)
|
)
|
||||||
|
szSkillId = make(map[int32]struct{})
|
||||||
if v, err = this.GetConfigure(game_integralbuffgroup); err == nil {
|
if v, err = this.GetConfigure(game_integralbuffgroup); err == nil {
|
||||||
if configure, ok := v.(*cfg.GameIntegralBuffGroup); ok {
|
if configure, ok := v.(*cfg.GameIntegralBuffGroup); ok {
|
||||||
if result := configure.Get(group); result != nil {
|
if result := configure.Get(group); result != nil {
|
||||||
for _, v := range result.Skillid {
|
for _, v := range result.Skillid {
|
||||||
szSkillId = append(szSkillId, v)
|
//szSkillId = append(szSkillId, v)
|
||||||
|
szSkillId[v] = struct{}{}
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -265,6 +267,7 @@ func (this *configureComp) GetIntegralBUffSkillGroup() (sz []int32, err error) {
|
|||||||
for _, v := range configure.GetDataList() {
|
for _, v := range configure.GetDataList() {
|
||||||
sz = append(sz, v.Skillgroup)
|
sz = append(sz, v.Skillgroup)
|
||||||
}
|
}
|
||||||
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_integralbuffgroup, "")
|
err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_integralbuffgroup, "")
|
||||||
|
Loading…
Reference in New Issue
Block a user