英雄加经验 返回给英雄唯一id
This commit is contained in:
parent
460725a94f
commit
39fe1e88c9
@ -146,7 +146,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.HuntingCha
|
||||
for _, v := range req.Report.Info.Redflist[0].Team {
|
||||
if cfgHunting.Heroexp > 0 && !v.Ishelp { // 助战英雄不加经验
|
||||
this.module.ModuleHero.AddHeroExp(session, v.Oid, cfgHunting.Heroexp)
|
||||
changExp[v.HeroID] = cfgHunting.Heroexp
|
||||
changExp[v.Oid] = cfgHunting.Heroexp
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -31,7 +31,9 @@ func (this *ModelSign) Init(service core.IService, module core.IModule, comp cor
|
||||
}
|
||||
|
||||
func (this *ModelSign) GetUserSign(uid string) (result *pb.DBSign, err error) {
|
||||
result = &pb.DBSign{}
|
||||
result = &pb.DBSign{
|
||||
Puzzle: make([]int32, 31),
|
||||
}
|
||||
if err = this.module.modelSign.Get(uid, result); err != nil {
|
||||
if mongo.ErrNoDocuments == err { // 创建一条新的数据
|
||||
_data := this.module.configure.GetSignConf(1, 1)
|
||||
|
@ -152,7 +152,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal
|
||||
for _, v := range req.Report.Info.Redflist[0].Team {
|
||||
if vikingCfg.Heroexp > 0 && !v.Ishelp { // 助战英雄不加经验
|
||||
this.module.ModuleHero.AddHeroExp(session, v.Oid, vikingCfg.Heroexp)
|
||||
changExp[v.HeroID] = vikingCfg.Heroexp
|
||||
changExp[v.Oid] = vikingCfg.Heroexp
|
||||
}
|
||||
if v.Ishelp {
|
||||
bHelp = true
|
||||
|
@ -8,8 +8,11 @@ package viking
|
||||
import (
|
||||
"context"
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/base"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/lego/sys/redis/pipe"
|
||||
"go_dreamfactory/utils"
|
||||
|
||||
"go_dreamfactory/modules"
|
||||
"go_dreamfactory/pb"
|
||||
"go_dreamfactory/sys/db"
|
||||
@ -27,7 +30,7 @@ type Viking struct {
|
||||
configure *configureComp
|
||||
modulerank *ModelRank
|
||||
battle comm.IBattle
|
||||
service core.IService
|
||||
service base.IRPCXService
|
||||
}
|
||||
|
||||
func NewModule() core.IModule {
|
||||
@ -40,7 +43,7 @@ func (this *Viking) GetType() core.M_Modules {
|
||||
|
||||
func (this *Viking) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
|
||||
err = this.ModuleBase.Init(service, module, options)
|
||||
this.service = service
|
||||
this.service = service.(base.IRPCXService)
|
||||
return
|
||||
}
|
||||
|
||||
@ -341,8 +344,6 @@ func (this *Viking) AutoBattleOver(session comm.IUserSession, Report *pb.BattleR
|
||||
}
|
||||
}
|
||||
// 随机任务统计
|
||||
// this.ModuleBuried.SendToRtask(session, comm.Rtype73, difficulty, bossId, 1)
|
||||
// this.ModuleBuried.SendToRtask(session, comm.Rtype78, difficulty, bossId, Report.Costtime)
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype73, 1, bossId, difficulty))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype78, difficulty, bossId, Report.Costtime))
|
||||
if Report != nil && Report.Info != nil && len(Report.Info.Redflist) > 0 {
|
||||
@ -367,3 +368,18 @@ func (this *Viking) CheckBattelParameter(session comm.IUserSession, battle *pb.B
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
// 检查当前赛季是在本服还是在跨服
|
||||
func (this *Viking) CheckSeasonData() (bLocal bool) {
|
||||
openTime := this.service.GetOpentime().Unix()
|
||||
this.Debugf("%d", openTime)
|
||||
|
||||
// 获取第一个赛季结束的时间
|
||||
endSeasonTime := utils.GetTodayZeroTime(openTime) + int64((7-this.service.GetOpentime().Day())*3600*24)
|
||||
this.Debugf("%d", endSeasonTime)
|
||||
|
||||
// 校验是否过了一个月
|
||||
openTime = openTime + 30*3600*24
|
||||
// 第三个赛季
|
||||
return true
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user