diff --git a/bin/json/game_skillafteratk.json b/bin/json/game_skillafteratk.json index 44d34aea8..528fa902c 100644 --- a/bin/json/game_skillafteratk.json +++ b/bin/json/game_skillafteratk.json @@ -7963,9 +7963,7 @@ 2000 ], "FollowSK": [], - "SucFollowSK": [ - 224002313 - ], + "SucFollowSK": [], "FailFollowSK": [], "MustHit": false, "DpsRevisiType": 0, @@ -8012,9 +8010,7 @@ 2300 ], "FollowSK": [], - "SucFollowSK": [ - 224002313 - ], + "SucFollowSK": [], "FailFollowSK": [], "MustHit": false, "DpsRevisiType": 0, @@ -8037,9 +8033,7 @@ 2600 ], "FollowSK": [], - "SucFollowSK": [ - 224002313 - ], + "SucFollowSK": [], "FailFollowSK": [], "MustHit": false, "DpsRevisiType": 0, @@ -8062,9 +8056,7 @@ 2900 ], "FollowSK": [], - "SucFollowSK": [ - 224002313 - ], + "SucFollowSK": [], "FailFollowSK": [], "MustHit": false, "DpsRevisiType": 0, @@ -8087,9 +8079,7 @@ 3200 ], "FollowSK": [], - "SucFollowSK": [ - 224002313 - ], + "SucFollowSK": [], "FailFollowSK": [], "MustHit": false, "DpsRevisiType": 0, @@ -60097,8 +60087,8 @@ "Argu": [ 390001001, 1000, - 0, - 1 + 1, + 3 ], "FollowSK": [], "SucFollowSK": [], diff --git a/bin/json/game_skillatk.json b/bin/json/game_skillatk.json index 8429f3dcb..ce16dff45 100644 --- a/bin/json/game_skillatk.json +++ b/bin/json/game_skillatk.json @@ -37917,7 +37917,7 @@ "passSkill": [], "Desc": { "key": "skill_skill_atk_Desc_913003433_1", - "text": "消耗自身5%最大血量,对目标造成消耗血量50%的附加伤害(血量低于5%时无法触发)" + "text": "3技能消耗自身5%最大血量,对目标造成消耗血量50%的附加伤害(血量低于5%时无法触发)" }, "buffid": [], "map": "" diff --git a/bin/json/game_skillpassive.json b/bin/json/game_skillpassive.json index 8bcc6d29a..74b65d6fa 100644 --- a/bin/json/game_skillpassive.json +++ b/bin/json/game_skillpassive.json @@ -7466,9 +7466,9 @@ "When": 19, "FromCheck": "", "TargetCheck": "Target=2,HasBuff=1", - "MainSkillCheck": "SkillPos=3", + "MainSkillCheck": "MainSkillID=115002311", "AfterSkillCheck": "", - "BuffCheck": "", + "BuffCheck": "HasBuff=1,Succ=1", "DpsCheck": "", "AddCon": [], "PasPr": 1000, diff --git a/comm/imodule.go b/comm/imodule.go index cdac2064c..63b7321e5 100644 --- a/comm/imodule.go +++ b/comm/imodule.go @@ -105,8 +105,6 @@ type ( GetHeroList(uid string) []*pb.DBHero //清理玩家英雄数据 CleanData(uid string) - // 获取指定星级等级的英雄 - GetSpecifiedHero(session IUserSession, heroConfId string, star, lv int32) (errdata *pb.ErrorData) // 英雄加经验 AddHerosExp(session IUserSession, heroObjs []string, exp int32) (curAddExp []int32, errdata *pb.ErrorData) diff --git a/modules/hero/api_drawCard.go b/modules/hero/api_drawCard.go index 5c81986b3..5f621cb0e 100644 --- a/modules/hero/api_drawCard.go +++ b/modules/hero/api_drawCard.go @@ -31,7 +31,6 @@ func (this *apiComp) DrawCard(session comm.IUserSession, req *pb.HeroDrawCardReq heroRecord *pb.DBHeroRecord strPool []string // 10连跨多个卡池情况 update map[string]interface{} - normalDraw bool // 是否是普通抽 drawConf *cfg.GameDrawPoolData err error atno []*pb.UserAtno @@ -372,7 +371,6 @@ func (this *apiComp) DrawCard(session comm.IUserSession, req *pb.HeroDrawCardReq rsp.Data = append(rsp.Data, &pb.AtnoData{Atno: atno}) } - } // 发放许愿石奖励 @@ -382,11 +380,7 @@ func (this *apiComp) DrawCard(session comm.IUserSession, req *pb.HeroDrawCardReq rsp.FirstGet = firstGet this.module.modelRecord.ChangeHeroRecord(session.GetUserId(), update) session.SendMsg(string(this.module.GetType()), DrawCard, rsp) - normalDraw = true - if req.DrawCount == comm.DrawCardType1 || req.DrawCount == comm.DrawCardType2 || req.DrawCount == comm.DrawCardType3 || req.DrawCount == comm.DrawCardType4 { - normalDraw = false - } // 任务统计 - this.module.SendTaskMsg(session, szStar, req.DrawCount, normalDraw) + this.module.SendTaskMsg(session, szStar, req.DrawCount, req.DrawType) return } diff --git a/modules/hero/api_specified.go b/modules/hero/api_specified.go deleted file mode 100644 index 8c817f07c..000000000 --- a/modules/hero/api_specified.go +++ /dev/null @@ -1,55 +0,0 @@ -package hero - -import ( - "go_dreamfactory/comm" - "go_dreamfactory/lego/sys/log" - "go_dreamfactory/pb" -) - -//参数校验 -func (this *apiComp) GetSpecifiedCheck(session comm.IUserSession, req *pb.HeroGetSpecifiedReq) (errdata *pb.ErrorData) { - if req.HeroCoinfigID == "" || req.Star <= 0 || req.Lv <= 0 { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_ReqParameterError, - Title: pb.ErrorCode_ReqParameterError.ToString(), - } - return - } - - return -} - -/// 获取指定星级或等级的英雄 GM 协议 -func (this *apiComp) GetSpecified(session comm.IUserSession, req *pb.HeroGetSpecifiedReq) (errdata *pb.ErrorData) { - - if errdata = this.GetSpecifiedCheck(session, req); errdata != nil { - return - } - hero, err := this.module.modelHero.createSpecialHero(session.GetUserId(), req.HeroCoinfigID) - if err == nil { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_HeroNoExist, - Title: pb.ErrorCode_HeroNoExist.ToString(), - } - return - } - hero.Lv = req.Lv - hero.Star = req.Star - _heroMap := map[string]interface{}{ - "lv": hero.Lv, - "star": hero.Star, - } - // 保存数据 - err1 := this.module.modelHero.ChangeList(session.GetUserId(), hero.Id, _heroMap) - if err1 != nil { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_DBError, - Title: pb.ErrorCode_DBError.ToString(), - Message: err.Error(), - } - log.Errorf("GetSpecified failed:%v", err) - return - } - session.SendMsg(string(this.module.GetType()), "getspecified", &pb.HeroGetSpecifiedResp{Hero: hero}) - return -} diff --git a/modules/hero/model_hero.go b/modules/hero/model_hero.go index ad9a4a46e..799c8f065 100644 --- a/modules/hero/model_hero.go +++ b/modules/hero/model_hero.go @@ -92,7 +92,7 @@ func (this *ModelHero) initHeroSkill(hero *pb.DBHero) []*pb.SkillData { } // 创建一个指定的英雄 -func (this *ModelHero) createSpecialHero(uid string, heroCfgId string) (hero *pb.DBHero, err error) { +func (this *ModelHero) gmCreateSpecialHero(uid string, heroCfgId string) (hero *pb.DBHero, err error) { list := this.getHeroList(uid) for _, v := range list { if v.HeroID == heroCfgId { diff --git a/modules/hero/model_talent.go b/modules/hero/model_talent.go index 392357dc0..d8a52a579 100644 --- a/modules/hero/model_talent.go +++ b/modules/hero/model_talent.go @@ -70,9 +70,7 @@ func (this *ModelTalent) CreateHeroTalent(uid, heroId string) (talent *pb.DBHero } // gm 专用 清除所有的天赋 - func (this *ModelTalent) CleanAllHeroTalent(uid string) (talent *pb.DBHeroTalent, err error) { - err = this.DelByUId(uid) return } diff --git a/modules/hero/module.go b/modules/hero/module.go index 0d6e60924..2e09c2866 100644 --- a/modules/hero/module.go +++ b/modules/hero/module.go @@ -198,71 +198,6 @@ func (this *Hero) CleanData(uid string) { this.modelHero.cleanData(uid) } -// 创建一些特殊的英雄 -func (this *Hero) GetSpecifiedHero(session comm.IUserSession, heroConfId string, star, lv int32) (errdata *pb.ErrorData) { - if session.GetUserId() == "" || heroConfId == "" || star == 0 || lv == 0 { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_ReqParameterError, - Title: pb.ErrorCode_ReqParameterError.ToString(), - } - return - } - // 等级校验 - conf, _ := this.configure.GetHeroConfig(heroConfId) - if conf == nil { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_ReqParameterError, - Title: pb.ErrorCode_ReqParameterError.ToString(), - } - return - } - cid := heroConfId - maxStar := conf.Star - starConf, _ := this.configure.GetHeroStarupConfig(cid, conf.Star) - if starConf == nil { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_ReqParameterError, - Title: pb.ErrorCode_ReqParameterError.ToString(), - } - return - } - // 获取最大星级 - maxStar = this.configure.GetHeroMaxStar(cid, conf.Star) - - maxLv := this.configure.GetHeroMaxLv(maxStar) // 最大等级 - if star > maxStar || lv > maxLv { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_ReqParameterError, - Title: pb.ErrorCode_ReqParameterError.ToString(), - } - return - } - hero, err := this.modelHero.createSpecialHero(session.GetUserId(), heroConfId) - if err != nil { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_HeroCreate, - Title: pb.ErrorCode_HeroCreate.ToString(), - Message: err.Error(), - } - } - hero.Lv = lv - hero.Star = star - _heroMap := map[string]interface{}{ - "lv": hero.Lv, - "star": hero.Star, - "sameCount": 1, - } - // 保存数据 - err = this.modelHero.ChangeList(session.GetUserId(), hero.Id, _heroMap) - if err != nil { - log.Errorf("GetSpecified failed:%v", err) - return - } - // push change - session.SendMsg("hero", "change", &pb.HeroChangePush{List: []*pb.DBHero{hero}}) - return -} - // Event-------------------------------------------------------------------------------------------------玩家离线 func (this *Hero) EventUserOffline(uid, sessionid string) { this.modelHero.RemoveUserHeroInfo(uid) @@ -292,9 +227,9 @@ func (this *Hero) CreateRepeatHeros(session comm.IUserSession, heros map[string] } } if db.IsCross() { - this.moduleFetter.SendRpcAddHero(session.GetUserId(), szAddHero, session.GetServiecTag()) + go this.moduleFetter.SendRpcAddHero(session.GetUserId(), szAddHero, session.GetServiecTag()) } else { - this.moduleFetter.AddHerosFetterData(session.GetUserId(), szAddHero) + go this.moduleFetter.AddHerosFetterData(session.GetUserId(), szAddHero) } if bPush { //推送 if len(changeList) > 0 { @@ -653,7 +588,7 @@ func (this *Hero) GetAllMaxHero(session comm.IUserSession, bTalent bool) (errdat } // 开始创建英雄 - hero, err := this.modelHero.createSpecialHero(session.GetUserId(), v.Hid) + hero, err := this.modelHero.gmCreateSpecialHero(session.GetUserId(), v.Hid) if err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_HeroCreate, @@ -685,9 +620,6 @@ func (this *Hero) GetAllMaxHero(session comm.IUserSession, bTalent bool) (errdat } if bTalent { // 满天赋 - //var talent *pb.DBHeroTalent - //talent, _ := this.modelTalent.GetHerotalent(session.GetUserId()) - talent, _ := this.modelTalent.CreateHeroTalent(session.GetUserId(), hero.HeroID) data, err := this.configure.GMGetTalentByHeroId(hero.HeroID) if err == nil { @@ -724,12 +656,13 @@ func (this *Hero) GetAllMaxHero(session comm.IUserSession, bTalent bool) (errdat return } -func (this *Hero) SendTaskMsg(session comm.IUserSession, szStar []int32, drawCount int32, itype bool) { +func (this *Hero) SendTaskMsg(session comm.IUserSession, szStar []int32, drawCount int32, drawtype int32) { // 任务统计 var ( szTask []*pb.BuriedParam ) - if itype { //普通招募 + + if drawtype == comm.DrawCardType0 { //普通招募 if drawCount == 10 { sz := make(map[int32]int32, 0) for _, star := range szStar { @@ -850,31 +783,6 @@ func (this *Hero) RegisterInstructor(session comm.IUserSession, heroOid []string return } -// DrawCard_ContinuousRestriction_Camp -// func (this *Hero) DrawCardContinuousRestrictionCamp(cardId string, race map[int32]int32, sz []int32, data []*cfg.GameDrawCardData) (card string) { -// card = cardId -// cfgDraw := this.ModuleTools.GetGlobalConf() // 读取抽卡配置文件 -// if cfgDraw == nil || race == nil { -// return -// } -// iMaxCount := cfgDraw.DrawCardContinuousRestrictionCamp -// // 获取阵营 -// if heroConf, _ := this.configure.GetHeroConfig(cardId); heroConf != nil { -// if v1, ok := race[heroConf.Race]; ok && v1 > iMaxCount { // 满足条件 再随机获取一个英雄 -// for i := 0; i < int(iMaxCount); i++ { // 最多循环次数 -// randomIndex := comm.GetRandW(sz) -// if int32(len(sz)) > randomIndex { -// if v1, ok := race[heroConf.Race]; !ok && v1 <= iMaxCount { -// card = data[randomIndex].Id -// break -// } -// } -// } -// } -// } -// return card -// } - // 只通过唯一id 查询英雄信息 func (this *Hero) QueryCrossMultipleHeroinfo(oid []string) (hero []*pb.DBHero, err error) { if this.IsCross() { @@ -1116,9 +1024,9 @@ func (this *Hero) CreateOneHero(session comm.IUserSession, heroCfgId string, bPu firstGet = append(firstGet, heroCfgId) } if db.IsCross() { - this.moduleFetter.SendRpcAddHero(session.GetUserId(), szAddHero, session.GetServiecTag()) + go this.moduleFetter.SendRpcAddHero(session.GetUserId(), szAddHero, session.GetServiecTag()) } else { - this.moduleFetter.AddHerosFetterData(session.GetUserId(), szAddHero) + go this.moduleFetter.AddHerosFetterData(session.GetUserId(), szAddHero) // 异步调用 } if bPush { //推送 session.SendMsg("hero", "change", &pb.HeroChangePush{List: []*pb.DBHero{hero}}) diff --git a/modules/sys/model_sys.go b/modules/sys/model_sys.go index 729e5afec..ea828a5f8 100644 --- a/modules/sys/model_sys.go +++ b/modules/sys/model_sys.go @@ -30,6 +30,9 @@ func (this *ModelSys) validCond(uid string, condData *cfg.GameOpencondData) stri for _, conf := range condData.Main { switch conf.Key { case 1: //等级 + if conf.Param == 1 { // 等级为1 直接过 + continue + } iuser := this.moduleSys.ModuleUser user := iuser.GetUser(uid) if user == nil { diff --git a/modules/sys/module.go b/modules/sys/module.go index b1682a2eb..4d3bf5ea3 100644 --- a/modules/sys/module.go +++ b/modules/sys/module.go @@ -138,19 +138,6 @@ func (this *ModuleSys) CheckOpenCondCfgById(uid string, id string) (bOpen bool, return } -// func (this *ModuleSys) FriendCountChange(uid string, count int32) { -// if cond := this.configure.getFriendTask(count); len(cond) > 0 { -// if session, ok := this.GetUserSession(uid); ok { -// this.AutoActivate(session, cond) -// if err := session.Push(); err != nil { -// this.Errorln(err) -// } -// this.PutUserSession(session) -// } else { -// this.PutUserSession(session) -// } -// } -// } func (this *ModuleSys) QueryOpenCondData(uid string) (data map[string]int32, errdata *pb.ErrorData) { data = make(map[string]int32, 0) list, err := this.modelSys.GetOpenCondList(uid)