Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
94aff2223e
@ -22,7 +22,10 @@ func (this *apiComp) Activate(session comm.IUserSession, req *pb.AtlasActivateRe
|
|||||||
atlasConf, err := this.module.configure.GetPandoAtlasConf(req.Id)
|
atlasConf, err := this.module.configure.GetPandoAtlasConf(req.Id)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
code = pb.ErrorCode_ConfigNoFound // 返回错误码
|
code = pb.ErrorCode_ConfigNoFound // 返回错误码
|
||||||
data.Message = err.Error()
|
data = &pb.ErrorData{
|
||||||
|
Title: pb.GetErrorCodeMsg(code),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
list, _ := this.module.modelPandaAtlas.getPandaAtlasList(session.GetUserId())
|
list, _ := this.module.modelPandaAtlas.getPandaAtlasList(session.GetUserId())
|
||||||
|
@ -21,6 +21,7 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.CaravanBuyOrSe
|
|||||||
cityInfo *pb.CityInfo
|
cityInfo *pb.CityInfo
|
||||||
ok bool
|
ok bool
|
||||||
upperLimit int32 // 单个物品堆叠上限
|
upperLimit int32 // 单个物品堆叠上限
|
||||||
|
|
||||||
)
|
)
|
||||||
update = make(map[string]interface{})
|
update = make(map[string]interface{})
|
||||||
if code = this.BuyOrSellCheck(session, req); code != pb.ErrorCode_Success {
|
if code = this.BuyOrSellCheck(session, req); code != pb.ErrorCode_Success {
|
||||||
@ -37,7 +38,10 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.CaravanBuyOrSe
|
|||||||
if err == nil {
|
if err == nil {
|
||||||
upperLimit = c.Bagtagnum // 获取单个格子堆叠数
|
upperLimit = c.Bagtagnum // 获取单个格子堆叠数
|
||||||
} else {
|
} else {
|
||||||
data.Message = err.Error()
|
data = &pb.ErrorData{
|
||||||
|
Title: pb.GetErrorCodeMsg(code),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
code = pb.ErrorCode_ConfigNoFound
|
code = pb.ErrorCode_ConfigNoFound
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -62,7 +66,10 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.CaravanBuyOrSe
|
|||||||
price = cityConf.Specialnum * price / 1000
|
price = cityConf.Specialnum * price / 1000
|
||||||
bFound = true
|
bFound = true
|
||||||
} else {
|
} else {
|
||||||
data.Message = err.Error()
|
data = &pb.ErrorData{
|
||||||
|
Title: pb.GetErrorCodeMsg(code),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
code = pb.ErrorCode_ConfigNoFound
|
code = pb.ErrorCode_ConfigNoFound
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -99,7 +106,10 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.CaravanBuyOrSe
|
|||||||
update["lv"] = curLv
|
update["lv"] = curLv
|
||||||
update["baglimit"] = c.Bagtop
|
update["baglimit"] = c.Bagtop
|
||||||
} else {
|
} else {
|
||||||
data.Message = err.Error()
|
data = &pb.ErrorData{
|
||||||
|
Title: pb.GetErrorCodeMsg(code),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
code = pb.ErrorCode_ConfigNoFound
|
code = pb.ErrorCode_ConfigNoFound
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -149,7 +159,10 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.CaravanBuyOrSe
|
|||||||
update["city"] = caravan.City
|
update["city"] = caravan.City
|
||||||
addScore -= price * v
|
addScore -= price * v
|
||||||
} else {
|
} else {
|
||||||
data.Message = err.Error()
|
data = &pb.ErrorData{
|
||||||
|
Title: pb.GetErrorCodeMsg(code),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
code = pb.ErrorCode_ConfigNoFound
|
code = pb.ErrorCode_ConfigNoFound
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,10 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.CaravanGetListRe
|
|||||||
if conf, err := this.module.configure.GetCaravanLv(list.Lv); err == nil {
|
if conf, err := this.module.configure.GetCaravanLv(list.Lv); err == nil {
|
||||||
this.module.ModuleItems.CleanItemById(session, conf.Tickettop.T) // 清理之前的门票数据
|
this.module.ModuleItems.CleanItemById(session, conf.Tickettop.T) // 清理之前的门票数据
|
||||||
} else {
|
} else {
|
||||||
data.Message = err.Error()
|
data = &pb.ErrorData{
|
||||||
|
Title: pb.GetErrorCodeMsg(code),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
code = pb.ErrorCode_ConfigNoFound
|
code = pb.ErrorCode_ConfigNoFound
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,10 @@ func (this *apiComp) GetStory(session comm.IUserSession, req *pb.CaravanGetStory
|
|||||||
|
|
||||||
conf, err := this.module.configure.GetCaravanEventById(req.Cid)
|
conf, err := this.module.configure.GetCaravanEventById(req.Cid)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
data.Message = err.Error()
|
data = &pb.ErrorData{
|
||||||
|
Title: pb.GetErrorCodeMsg(code),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
code = pb.ErrorCode_ConfigNoFound
|
code = pb.ErrorCode_ConfigNoFound
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,10 @@ func (this *apiComp) GotoCity(session comm.IUserSession, req *pb.CaravanGotoCity
|
|||||||
bNewTask = false
|
bNewTask = false
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
data.Message = err.Error()
|
data = &pb.ErrorData{
|
||||||
|
Title: pb.GetErrorCodeMsg(code),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
code = pb.ErrorCode_ConfigNoFound
|
code = pb.ErrorCode_ConfigNoFound
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -73,7 +76,10 @@ func (this *apiComp) GotoCity(session comm.IUserSession, req *pb.CaravanGotoCity
|
|||||||
N: req.Ticket,
|
N: req.Ticket,
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
data.Message = err.Error()
|
data = &pb.ErrorData{
|
||||||
|
Title: pb.GetErrorCodeMsg(code),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
code = pb.ErrorCode_ConfigNoFound
|
code = pb.ErrorCode_ConfigNoFound
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,6 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.EnchantChallen
|
|||||||
if code != pb.ErrorCode_Success {
|
if code != pb.ErrorCode_Success {
|
||||||
return // 参数校验失败直接返回
|
return // 参数校验失败直接返回
|
||||||
}
|
}
|
||||||
|
|
||||||
enchant, err := this.module.modelEnchant.getEnchantList(session.GetUserId())
|
enchant, err := this.module.modelEnchant.getEnchantList(session.GetUserId())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
code = pb.ErrorCode_PagodaNotFound
|
code = pb.ErrorCode_PagodaNotFound
|
||||||
@ -32,7 +31,10 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.EnchantChallen
|
|||||||
cfgData, err := this.module.configure.GetEnchantBossConfigData(req.BossType)
|
cfgData, err := this.module.configure.GetEnchantBossConfigData(req.BossType)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
code = pb.ErrorCode_ConfigNoFound
|
code = pb.ErrorCode_ConfigNoFound
|
||||||
data.Message = err.Error()
|
data = &pb.ErrorData{
|
||||||
|
Title: pb.GetErrorCodeMsg(code),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if len(cfgData) <= 0 {
|
if len(cfgData) <= 0 {
|
||||||
|
@ -37,7 +37,10 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.EnchantCha
|
|||||||
cfgEnchant, err := this.module.configure.GetEnchantBossConfigData(req.BossType)
|
cfgEnchant, err := this.module.configure.GetEnchantBossConfigData(req.BossType)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
code = pb.ErrorCode_ConfigNoFound
|
code = pb.ErrorCode_ConfigNoFound
|
||||||
data.Message = err.Error()
|
data = &pb.ErrorData{
|
||||||
|
Title: pb.GetErrorCodeMsg(code),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,7 +24,10 @@ func (this *apiComp) ActivateAtlas(session comm.IUserSession, req *pb.GourmetAct
|
|||||||
conf, err := this.configure.GetGrormetCookBookConf(req.Cid)
|
conf, err := this.configure.GetGrormetCookBookConf(req.Cid)
|
||||||
if err != nil { // 配置校验
|
if err != nil { // 配置校验
|
||||||
code = pb.ErrorCode_ConfigNoFound
|
code = pb.ErrorCode_ConfigNoFound
|
||||||
data.Message = err.Error()
|
data = &pb.ErrorData{
|
||||||
|
Title: pb.GetErrorCodeMsg(code),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
_gourmet, err := this.module.modelAtlas.getGourmetAtlasList(session.GetUserId())
|
_gourmet, err := this.module.modelAtlas.getGourmetAtlasList(session.GetUserId())
|
||||||
|
@ -28,7 +28,10 @@ func (this *apiComp) CreateFood(session comm.IUserSession, req *pb.GourmetCreate
|
|||||||
conf, err := this.configure.GetGrormetCookBookConf(req.Cid)
|
conf, err := this.configure.GetGrormetCookBookConf(req.Cid)
|
||||||
if err != nil { // 配置校验
|
if err != nil { // 配置校验
|
||||||
code = pb.ErrorCode_ConfigNoFound
|
code = pb.ErrorCode_ConfigNoFound
|
||||||
data.Message = err.Error()
|
data = &pb.ErrorData{
|
||||||
|
Title: pb.GetErrorCodeMsg(code),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,7 +42,10 @@ func (this *apiComp) Awaken(session comm.IUserSession, req *pb.HeroAwakenReq) (c
|
|||||||
awakenData, err = this.module.configure.GetHeroAwakenConfig(_hero.HeroID, _hero.JuexingLv+1)
|
awakenData, err = this.module.configure.GetHeroAwakenConfig(_hero.HeroID, _hero.JuexingLv+1)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
code = pb.ErrorCode_ConfigNoFound
|
code = pb.ErrorCode_ConfigNoFound
|
||||||
data.Message = err.Error()
|
data = &pb.ErrorData{
|
||||||
|
Title: pb.GetErrorCodeMsg(code),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if len(awakenData.Phasebonus) < 2 { // 配置校验
|
if len(awakenData.Phasebonus) < 2 { // 配置校验
|
||||||
@ -140,7 +143,10 @@ func (this *apiComp) Awaken(session comm.IUserSession, req *pb.HeroAwakenReq) (c
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
code = pb.ErrorCode_ConfigNoFound
|
code = pb.ErrorCode_ConfigNoFound
|
||||||
data.Message = err.Error()
|
data = &pb.ErrorData{
|
||||||
|
Title: pb.GetErrorCodeMsg(code),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), szTask...)
|
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), szTask...)
|
||||||
|
@ -42,7 +42,10 @@ func (this *apiComp) Buy(session comm.IUserSession, req *pb.HeroBuyReq) (code pb
|
|||||||
|
|
||||||
if conf, err = this.module.configure.GetShopItemsConfigureByGroups(req.BuyType, udata); err != nil { // 找配置
|
if conf, err = this.module.configure.GetShopItemsConfigureByGroups(req.BuyType, udata); err != nil { // 找配置
|
||||||
code = pb.ErrorCode_ConfigNoFound
|
code = pb.ErrorCode_ConfigNoFound
|
||||||
data.Message = err.Error()
|
data = &pb.ErrorData{
|
||||||
|
Title: pb.GetErrorCodeMsg(code),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -269,7 +269,10 @@ func (this *apiComp) DrawCard(session comm.IUserSession, req *pb.HeroDrawCardReq
|
|||||||
_data, err := this.module.configure.GetPollByType(strPool[index])
|
_data, err := this.module.configure.GetPollByType(strPool[index])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
code = pb.ErrorCode_ConfigNoFound
|
code = pb.ErrorCode_ConfigNoFound
|
||||||
data.Message = err.Error()
|
data = &pb.ErrorData{
|
||||||
|
Title: pb.GetErrorCodeMsg(code),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
sz := make([]int32, 0)
|
sz := make([]int32, 0)
|
||||||
|
@ -31,7 +31,10 @@ func (this *apiComp) Fusion(session comm.IUserSession, req *pb.HeroFusionReq) (c
|
|||||||
conf, err := this.module.configure.GetHeroFucionConfig(req.HeroId)
|
conf, err := this.module.configure.GetHeroFucionConfig(req.HeroId)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
code = pb.ErrorCode_ConfigNoFound // 配置没找到
|
code = pb.ErrorCode_ConfigNoFound // 配置没找到
|
||||||
data.Message = err.Error()
|
data = &pb.ErrorData{
|
||||||
|
Title: pb.GetErrorCodeMsg(code),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
for _, v := range req.Heros {
|
for _, v := range req.Heros {
|
||||||
|
@ -25,7 +25,6 @@ func (this *apiComp) StrengthenUpSkill(session comm.IUserSession, req *pb.HeroSt
|
|||||||
cost []*cfg.Gameatn // 技能升级消耗
|
cost []*cfg.Gameatn // 技能升级消耗
|
||||||
lvUpCount int32 // 技能升级的次数
|
lvUpCount int32 // 技能升级的次数
|
||||||
)
|
)
|
||||||
|
|
||||||
code = this.StrengthenUpSkillCheck(session, req) // check
|
code = this.StrengthenUpSkillCheck(session, req) // check
|
||||||
if code != pb.ErrorCode_Success {
|
if code != pb.ErrorCode_Success {
|
||||||
return
|
return
|
||||||
@ -38,7 +37,10 @@ func (this *apiComp) StrengthenUpSkill(session comm.IUserSession, req *pb.HeroSt
|
|||||||
heroCfg, err := this.module.configure.GetHeroConfig(_hero.HeroID)
|
heroCfg, err := this.module.configure.GetHeroConfig(_hero.HeroID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
code = pb.ErrorCode_ConfigNoFound
|
code = pb.ErrorCode_ConfigNoFound
|
||||||
data.Message = err.Error()
|
data = &pb.ErrorData{
|
||||||
|
Title: pb.GetErrorCodeMsg(code),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
for _, v1 := range req.Item {
|
for _, v1 := range req.Item {
|
||||||
@ -80,7 +82,10 @@ func (this *apiComp) StrengthenUpSkill(session comm.IUserSession, req *pb.HeroSt
|
|||||||
skillData, err := this.module.configure.GetHeroSkillUpConfig(skill.SkillID)
|
skillData, err := this.module.configure.GetHeroSkillUpConfig(skill.SkillID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
code = pb.ErrorCode_ConfigNoFound
|
code = pb.ErrorCode_ConfigNoFound
|
||||||
data.Message = err.Error()
|
data = &pb.ErrorData{
|
||||||
|
Title: pb.GetErrorCodeMsg(code),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
sz = append(sz, skillData.Probability[skill.SkillLv])
|
sz = append(sz, skillData.Probability[skill.SkillLv])
|
||||||
|
@ -23,7 +23,6 @@ func (this *apiComp) StrengthenUpStar(session comm.IUserSession, req *pb.HeroStr
|
|||||||
_hero *pb.DBHero // 目标英雄
|
_hero *pb.DBHero // 目标英雄
|
||||||
err error
|
err error
|
||||||
)
|
)
|
||||||
|
|
||||||
code = this.StrengthenUpStarCheck(session, req) // check
|
code = this.StrengthenUpStarCheck(session, req) // check
|
||||||
if code != pb.ErrorCode_Success {
|
if code != pb.ErrorCode_Success {
|
||||||
return
|
return
|
||||||
@ -37,13 +36,19 @@ func (this *apiComp) StrengthenUpStar(session comm.IUserSession, req *pb.HeroStr
|
|||||||
starConf, err = this.module.configure.GetHeroStarupConfig(_hero.HeroID, _hero.Star)
|
starConf, err = this.module.configure.GetHeroStarupConfig(_hero.HeroID, _hero.Star)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
code = pb.ErrorCode_ConfigNoFound
|
code = pb.ErrorCode_ConfigNoFound
|
||||||
data.Message = err.Error()
|
data = &pb.ErrorData{
|
||||||
|
Title: pb.GetErrorCodeMsg(code),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
heroConf, err := this.module.configure.GetHeroConfig(_hero.HeroID)
|
heroConf, err := this.module.configure.GetHeroConfig(_hero.HeroID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
code = pb.ErrorCode_ConfigNoFound
|
code = pb.ErrorCode_ConfigNoFound
|
||||||
data.Message = err.Error()
|
data = &pb.ErrorData{
|
||||||
|
Title: pb.GetErrorCodeMsg(code),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
nextHeroConfig, _ := this.module.configure.GetHeroStarupConfig(_hero.HeroID, _hero.Star+1)
|
nextHeroConfig, _ := this.module.configure.GetHeroStarupConfig(_hero.HeroID, _hero.Star+1)
|
||||||
|
@ -49,7 +49,10 @@ func (this *apiComp) StrengthenUplv(session comm.IUserSession, req *pb.HeroStren
|
|||||||
costGold += expConf.Needgold * v
|
costGold += expConf.Needgold * v
|
||||||
} else {
|
} else {
|
||||||
code = pb.ErrorCode_ConfigNoFound
|
code = pb.ErrorCode_ConfigNoFound
|
||||||
data.Message = err.Error()
|
data = &pb.ErrorData{
|
||||||
|
Title: pb.GetErrorCodeMsg(code),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,7 @@ func (this *apiComp) TalentLearn(session comm.IUserSession, req *pb.HeroTalentLe
|
|||||||
chanegCard []*pb.DBHero // 推送属性变化
|
chanegCard []*pb.DBHero // 推送属性变化
|
||||||
res []*cfg.Gameatn // 学习天赋需要消耗的道具
|
res []*cfg.Gameatn // 学习天赋需要消耗的道具
|
||||||
)
|
)
|
||||||
|
|
||||||
chanegCard = make([]*pb.DBHero, 0)
|
chanegCard = make([]*pb.DBHero, 0)
|
||||||
if code = this.TalentLearnCheck(session, req); code != pb.ErrorCode_Success {
|
if code = this.TalentLearnCheck(session, req); code != pb.ErrorCode_Success {
|
||||||
return
|
return
|
||||||
@ -61,7 +62,10 @@ func (this *apiComp) TalentLearn(session comm.IUserSession, req *pb.HeroTalentLe
|
|||||||
talentConf, err := this.module.configure.GetHeroTalent(req.TalentID)
|
talentConf, err := this.module.configure.GetHeroTalent(req.TalentID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
code = pb.ErrorCode_ConfigNoFound
|
code = pb.ErrorCode_ConfigNoFound
|
||||||
data.Message = err.Error()
|
data = &pb.ErrorData{
|
||||||
|
Title: pb.GetErrorCodeMsg(code),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 校验
|
// 校验
|
||||||
|
@ -46,7 +46,10 @@ func (this *apiComp) TalentReset(session comm.IUserSession, req *pb.HeroTalentRe
|
|||||||
talentPoint += conf.Point // 获取当前英雄的天赋点数
|
talentPoint += conf.Point // 获取当前英雄的天赋点数
|
||||||
} else {
|
} else {
|
||||||
code = pb.ErrorCode_ConfigNoFound
|
code = pb.ErrorCode_ConfigNoFound
|
||||||
data.Message = err.Error()
|
data = &pb.ErrorData{
|
||||||
|
Title: pb.GetErrorCodeMsg(code),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -42,6 +42,7 @@ func (this *modelHunting) getHuntingList(uid string) (result *pb.DBHunting, err
|
|||||||
Uid: uid,
|
Uid: uid,
|
||||||
Boss: make(map[int32]int32),
|
Boss: make(map[int32]int32),
|
||||||
BossTime: make(map[string]int32),
|
BossTime: make(map[string]int32),
|
||||||
|
Ps: map[int32]int32{},
|
||||||
}
|
}
|
||||||
|
|
||||||
this.Add(uid, result)
|
this.Add(uid, result)
|
||||||
|
@ -36,7 +36,10 @@ func (this *apiComp) GetStoryReward(session comm.IUserSession, req *pb.LibraryGe
|
|||||||
favorConf, err := this.module.configure.GetFavorability(_heroFetter.Heroid, 1) // 取1级的就可以
|
favorConf, err := this.module.configure.GetFavorability(_heroFetter.Heroid, 1) // 取1级的就可以
|
||||||
if err != nil {
|
if err != nil {
|
||||||
code = pb.ErrorCode_ConfigNoFound
|
code = pb.ErrorCode_ConfigNoFound
|
||||||
data.Message = err.Error()
|
data = &pb.ErrorData{
|
||||||
|
Title: pb.GetErrorCodeMsg(code),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 领取传记往事id
|
// 领取传记往事id
|
||||||
|
@ -41,7 +41,10 @@ func (this *apiComp) LvReward(session comm.IUserSession, req *pb.LibraryLvReward
|
|||||||
confData, err := this.module.configure.GetFavorability(_heroFetter.Heroid, req.Lv)
|
confData, err := this.module.configure.GetFavorability(_heroFetter.Heroid, req.Lv)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
code = pb.ErrorCode_ReqParameterError
|
code = pb.ErrorCode_ReqParameterError
|
||||||
data.Message = err.Error()
|
data = &pb.ErrorData{
|
||||||
|
Title: pb.GetErrorCodeMsg(code),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,7 +42,10 @@ func (this *apiComp) UseGift(session comm.IUserSession, req *pb.LibraryUseGiftRe
|
|||||||
_exp, err := this.module.configure.GetFavorabilityExp(_heroObj.Heroid)
|
_exp, err := this.module.configure.GetFavorabilityExp(_heroObj.Heroid)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
code = pb.ErrorCode_ConfigNoFound
|
code = pb.ErrorCode_ConfigNoFound
|
||||||
data.Message = err.Error()
|
data = &pb.ErrorData{
|
||||||
|
Title: pb.GetErrorCodeMsg(code),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
maxLv = int32(len(_exp)) // 获取当前星级羁绊最大等级
|
maxLv = int32(len(_exp)) // 获取当前星级羁绊最大等级
|
||||||
@ -74,7 +77,10 @@ func (this *apiComp) UseGift(session comm.IUserSession, req *pb.LibraryUseGiftRe
|
|||||||
_c, err := this.module.configure.GetFavorability(_heroObj.Heroid, _heroObj.Favorlv)
|
_c, err := this.module.configure.GetFavorability(_heroObj.Heroid, _heroObj.Favorlv)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
code = pb.ErrorCode_ConfigNoFound
|
code = pb.ErrorCode_ConfigNoFound
|
||||||
data.Message = err.Error()
|
data = &pb.ErrorData{
|
||||||
|
Title: pb.GetErrorCodeMsg(code),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
for _, v := range _c.LikesFood { // 喜欢的食物
|
for _, v := range _c.LikesFood { // 喜欢的食物
|
||||||
@ -157,7 +163,10 @@ func (this *apiComp) UseGift(session comm.IUserSession, req *pb.LibraryUseGiftRe
|
|||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
code = pb.ErrorCode_ConfigNoFound
|
code = pb.ErrorCode_ConfigNoFound
|
||||||
data.Message = err.Error()
|
data = &pb.ErrorData{
|
||||||
|
Title: pb.GetErrorCodeMsg(code),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,10 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.MlineGetListReq)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
code = pb.ErrorCode_ConfigNoFound
|
code = pb.ErrorCode_ConfigNoFound
|
||||||
data.Message = err.Error()
|
data = &pb.ErrorData{
|
||||||
|
Title: pb.GetErrorCodeMsg(code),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -61,24 +61,16 @@ func (this *apiComp) Upgrade(session comm.IUserSession, req *pb.PracticeUpgradeR
|
|||||||
}
|
}
|
||||||
switch pillar.Lv {
|
switch pillar.Lv {
|
||||||
case 2:
|
case 2:
|
||||||
if err := this.module.atlas.CheckActivatePandaAtlasCollect(session.GetUserId(), "100002"); err != nil {
|
this.module.atlas.CheckActivatePandaAtlasCollect(session.GetUserId(), "100002")
|
||||||
data.Message = err.Error()
|
|
||||||
}
|
|
||||||
break
|
break
|
||||||
case 3:
|
case 3:
|
||||||
if this.module.atlas.CheckActivatePandaAtlasCollect(session.GetUserId(), "100003"); err != nil {
|
this.module.atlas.CheckActivatePandaAtlasCollect(session.GetUserId(), "100003")
|
||||||
data.Message = err.Error()
|
|
||||||
}
|
|
||||||
break
|
break
|
||||||
case 4:
|
case 4:
|
||||||
if this.module.atlas.CheckActivatePandaAtlasCollect(session.GetUserId(), "100004"); err != nil {
|
this.module.atlas.CheckActivatePandaAtlasCollect(session.GetUserId(), "100004")
|
||||||
data.Message = err.Error()
|
|
||||||
}
|
|
||||||
break
|
break
|
||||||
case 5:
|
case 5:
|
||||||
if this.module.atlas.CheckActivatePandaAtlasCollect(session.GetUserId(), "100005"); err != nil {
|
this.module.atlas.CheckActivatePandaAtlasCollect(session.GetUserId(), "100005")
|
||||||
data.Message = err.Error()
|
|
||||||
}
|
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
this.module.modelPandata.Change(session.GetUserId(), map[string]interface{}{
|
this.module.modelPandata.Change(session.GetUserId(), map[string]interface{}{
|
||||||
|
@ -172,7 +172,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal
|
|||||||
var szTask []*pb.BuriedParam
|
var szTask []*pb.BuriedParam
|
||||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype73, 1, req.BossId, req.Difficulty))
|
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype73, 1, req.BossId, req.Difficulty))
|
||||||
//szTask = append(szTask, comm.GetBuriedParam(comm.Rtype74, req.BossId, req.Difficulty))
|
//szTask = append(szTask, comm.GetBuriedParam(comm.Rtype74, req.BossId, req.Difficulty))
|
||||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype78, req.BossId, req.Difficulty, req.Report.Costtime))
|
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype78, req.BossId, req.Report.Costtime/1000, req.Difficulty))
|
||||||
|
|
||||||
if req.Report != nil && req.Report.Info != nil && len(req.Report.Info.Redflist) > 0 {
|
if req.Report != nil && req.Report.Info != nil && len(req.Report.Info.Redflist) > 0 {
|
||||||
for _, v := range req.Report.Info.Redflist[0].Team {
|
for _, v := range req.Report.Info.Redflist[0].Team {
|
||||||
|
@ -37,6 +37,7 @@ func (this *modelViking) getVikingList(uid string) (result *pb.DBViking, err err
|
|||||||
Uid: uid,
|
Uid: uid,
|
||||||
Boss: make(map[int32]int32),
|
Boss: make(map[int32]int32),
|
||||||
BossTime: make(map[string]int32),
|
BossTime: make(map[string]int32),
|
||||||
|
Ps: make(map[int32]int32),
|
||||||
}
|
}
|
||||||
err = nil
|
err = nil
|
||||||
this.module.modelViking.Add(uid, result)
|
this.module.modelViking.Add(uid, result)
|
||||||
|
Loading…
Reference in New Issue
Block a user