Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
958d1a8939
@ -1690,7 +1690,7 @@
|
||||
"valid": 0,
|
||||
"NPC": 10071,
|
||||
"data1": 1,
|
||||
"data2": 1001,
|
||||
"data2": 1,
|
||||
"data3": 1,
|
||||
"data4": 0,
|
||||
"data5": 0
|
||||
@ -1754,7 +1754,7 @@
|
||||
"valid": 0,
|
||||
"NPC": 70022,
|
||||
"data1": 1,
|
||||
"data2": 1001,
|
||||
"data2": 1,
|
||||
"data3": 1,
|
||||
"data4": 0,
|
||||
"data5": 0
|
||||
@ -1770,7 +1770,7 @@
|
||||
"valid": 0,
|
||||
"NPC": 70032,
|
||||
"data1": 1,
|
||||
"data2": 1001,
|
||||
"data2": 1,
|
||||
"data3": 1,
|
||||
"data4": 0,
|
||||
"data5": 0
|
||||
|
@ -34,7 +34,7 @@ func (this *apiComp) PotionSynthesis(session comm.IUserSession, req *pb.ItemsPot
|
||||
N: v.N * req.Num,
|
||||
}
|
||||
}
|
||||
if code = this.module.ConsumeRes(session, configure.Material, true); code != pb.ErrorCode_Success {
|
||||
if code = this.module.ConsumeRes(session, need, true); code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
give = make([]*cfg.Gameatn, 0)
|
||||
|
@ -88,6 +88,17 @@ func (this *apiComp) Loot(session comm.IUserSession, req *pb.PracticeLootReq) (c
|
||||
this.module.modelPandata.Change(session.GetUserId(), map[string]interface{}{
|
||||
"knapsack": room.Knapsack,
|
||||
})
|
||||
|
||||
if _session, ok := this.module.GetUserSession(req.Friend); ok {
|
||||
_session.SendMsg(string(this.module.GetType()), "rommchange", &pb.PracticeRommChangePush{Info: froom})
|
||||
if err = _session.Push(); err != nil {
|
||||
this.module.Errorln(err)
|
||||
}
|
||||
this.module.PutUserSession(_session)
|
||||
} else {
|
||||
this.module.PutUserSession(_session)
|
||||
}
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), "loot", &pb.PracticeLootResp{Friend: req.Friend, Pillar: froom.Pillarf})
|
||||
return
|
||||
}
|
||||
|
@ -236,6 +236,17 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.PracticeReceiveR
|
||||
this.module.modelPandata.Change(req.Friend, map[string]interface{}{
|
||||
filed: pillar,
|
||||
})
|
||||
|
||||
if _session, ok := this.module.GetUserSession(req.Friend); ok {
|
||||
_session.SendMsg(string(this.module.GetType()), "rommchange", &pb.PracticeRommChangePush{Info: froom})
|
||||
|
||||
if err = _session.Push(); err != nil {
|
||||
this.module.Errorln(err)
|
||||
}
|
||||
this.module.PutUserSession(_session)
|
||||
} else {
|
||||
this.module.PutUserSession(_session)
|
||||
}
|
||||
}
|
||||
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype135, minutes))
|
||||
session.SendMsg(string(this.module.GetType()), "receive", &pb.PracticeReceiveResp{Pillar: pillar, Knapsack: room.Knapsack})
|
||||
|
@ -181,9 +181,9 @@ func (this *ModuleRtask) getHandle(tt comm.TaskType) (condis []*rtaskCondi) {
|
||||
case comm.Rtype7, comm.Rtype12, comm.Rtype13, comm.Rtype14, comm.Rtype15,
|
||||
comm.Rtype19, comm.Rtype21, comm.Rtype24,
|
||||
comm.Rtype26, comm.Rtype27, comm.Rtype28, comm.Rtype38,
|
||||
comm.Rtype39, comm.Rtype50, comm.Rtype51, comm.Rtype53,
|
||||
comm.Rtype39, comm.Rtype51, comm.Rtype53,
|
||||
comm.Rtype54, comm.Rtype57, comm.Rtype58, comm.Rtype60,
|
||||
comm.Rtype62, comm.Rtype64, comm.Rtype69, comm.Rtype72, comm.Rtype73, comm.Rtype88, comm.Rtype104,
|
||||
comm.Rtype62, comm.Rtype64, comm.Rtype69, comm.Rtype72, comm.Rtype88, comm.Rtype104,
|
||||
comm.Rtype96, comm.Rtype105, comm.Rtype128, comm.Rtype130, comm.Rtype131,
|
||||
comm.Rtype141, comm.Rtype142, comm.Rtype143, comm.Rtype144, comm.Rtype145, comm.Rtype146,
|
||||
comm.Rtype147, comm.Rtype149, comm.Rtype153, comm.Rtype154, comm.Rtype155, comm.Rtype156:
|
||||
@ -195,6 +195,15 @@ func (this *ModuleRtask) getHandle(tt comm.TaskType) (condis []*rtaskCondi) {
|
||||
}
|
||||
condis = append(condis, condi)
|
||||
this.registerVerifyHandle(v.Id, condi)
|
||||
case comm.Rtype50, comm.Rtype73:
|
||||
condi := &rtaskCondi{
|
||||
condId: v.Id,
|
||||
find: this.modelRtaskRecord.lessEqualFirstParam,
|
||||
verify: this.modelRtaskRecord.verifyFromDb,
|
||||
update: this.modelRtaskRecord.addUpdate,
|
||||
}
|
||||
condis = append(condis, condi)
|
||||
this.registerVerifyHandle(v.Id, condi)
|
||||
case comm.Rtype20:
|
||||
condi := &rtaskCondi{
|
||||
condId: v.Id,
|
||||
|
@ -9,7 +9,7 @@ import (
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
// 参数校验
|
||||
func (this *apiComp) ChallengeOverCheck(session comm.IUserSession, req *pb.VikingChallengeOverReq) (code pb.ErrorCode) {
|
||||
if req.BossId <= 0 && req.Difficulty > 0 {
|
||||
code = pb.ErrorCode_ReqParameterError
|
||||
@ -18,7 +18,7 @@ func (this *apiComp) ChallengeOverCheck(session comm.IUserSession, req *pb.Vikin
|
||||
return
|
||||
}
|
||||
|
||||
///挑战完成
|
||||
// /挑战完成
|
||||
func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChallengeOverReq) (code pb.ErrorCode, data proto.Message) {
|
||||
var (
|
||||
mapData map[string]interface{}
|
||||
@ -142,9 +142,9 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal
|
||||
}
|
||||
// 随机任务统计
|
||||
var szTask []*comm.TaskParam
|
||||
szTask = append(szTask, comm.GettaskParam(comm.Rtype73, 1, req.Difficulty, req.BossId))
|
||||
szTask = append(szTask, comm.GettaskParam(comm.Rtype74, req.Difficulty, req.BossId))
|
||||
szTask = append(szTask, comm.GettaskParam(comm.Rtype78, req.Difficulty, req.BossId, req.Report.Costtime))
|
||||
szTask = append(szTask, comm.GettaskParam(comm.Rtype73, 1, req.BossId, req.Difficulty))
|
||||
szTask = append(szTask, comm.GettaskParam(comm.Rtype74, req.BossId, req.Difficulty))
|
||||
szTask = append(szTask, comm.GettaskParam(comm.Rtype78, req.BossId, req.Difficulty, req.Report.Costtime))
|
||||
|
||||
if req.Report != nil && req.Report.Info != nil && len(req.Report.Info.Redflist) > 0 {
|
||||
for _, v := range req.Report.Info.Redflist[0].Team {
|
||||
|
Loading…
Reference in New Issue
Block a user