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/pb"
|
||||
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 {
|
||||
for _, v := range c {
|
||||
if mp, e := this.module.configure.GetIntegralBUff(v); e == nil {
|
||||
bFound := false
|
||||
for _, v := range mp {
|
||||
bFound := false
|
||||
// 必须是一样的
|
||||
if len(req.Report.Info.Buffer) == len(mp) {
|
||||
skillgroup = v
|
||||
for _, v1 := range req.Report.Info.Buffer {
|
||||
if v1 == v {
|
||||
bFound = true
|
||||
if _, ok := mp[v1]; !ok {
|
||||
skillgroup = 0
|
||||
break
|
||||
}
|
||||
}
|
||||
if !bFound {
|
||||
skillgroup = 0
|
||||
break
|
||||
}
|
||||
}
|
||||
if bFound {
|
||||
skillgroup = v
|
||||
if skillgroup != 0 {
|
||||
break
|
||||
}
|
||||
}
|
||||
@ -220,7 +214,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.IntegralCh
|
||||
}
|
||||
}
|
||||
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) {
|
||||
|
@ -237,15 +237,17 @@ func (this *configureComp) GetIntegralAchieveByKey(id int32) (result *cfg.GameIn
|
||||
return
|
||||
}
|
||||
|
||||
func (this *configureComp) GetIntegralBUff(group int32) (szSkillId []int32, err error) {
|
||||
func (this *configureComp) GetIntegralBUff(group int32) (szSkillId map[int32]struct{}, err error) {
|
||||
var (
|
||||
v interface{}
|
||||
)
|
||||
szSkillId = make(map[int32]struct{})
|
||||
if v, err = this.GetConfigure(game_integralbuffgroup); err == nil {
|
||||
if configure, ok := v.(*cfg.GameIntegralBuffGroup); ok {
|
||||
if result := configure.Get(group); result != nil {
|
||||
for _, v := range result.Skillid {
|
||||
szSkillId = append(szSkillId, v)
|
||||
//szSkillId = append(szSkillId, v)
|
||||
szSkillId[v] = struct{}{}
|
||||
}
|
||||
return
|
||||
}
|
||||
@ -265,6 +267,7 @@ func (this *configureComp) GetIntegralBUffSkillGroup() (sz []int32, err error) {
|
||||
for _, v := range configure.GetDataList() {
|
||||
sz = append(sz, v.Skillgroup)
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_integralbuffgroup, "")
|
||||
|
Loading…
Reference in New Issue
Block a user