diff --git a/bin/json/game_daddy.json b/bin/json/game_daddy.json index 0d3e88987..71da4b9fc 100644 --- a/bin/json/game_daddy.json +++ b/bin/json/game_daddy.json @@ -718,5 +718,95 @@ "n": 1 } ] + }, + { + "index": "51", + "var": [ + { + "a": "hero", + "t": "43901", + "n": 50 + } + ] + }, + { + "index": "52", + "var": [ + { + "a": "hero", + "t": "43902", + "n": 50 + } + ] + }, + { + "index": "53", + "var": [ + { + "a": "hero", + "t": "43903", + "n": 50 + } + ] + }, + { + "index": "54", + "var": [ + { + "a": "hero", + "t": "43921", + "n": 50 + } + ] + }, + { + "index": "55", + "var": [ + { + "a": "hero", + "t": "44921", + "n": 50 + } + ] + }, + { + "index": "56", + "var": [ + { + "a": "hero", + "t": "42911", + "n": 50 + } + ] + }, + { + "index": "57", + "var": [ + { + "a": "hero", + "t": "43911", + "n": 50 + } + ] + }, + { + "index": "58", + "var": [ + { + "a": "hero", + "t": "44911", + "n": 50 + } + ] + }, + { + "index": "59", + "var": [ + { + "a": "hero", + "t": "45921", + "n": 50 + } + ] } ] \ No newline at end of file diff --git a/comm/const.go b/comm/const.go index 999fe8fec..6657fa8c1 100644 --- a/comm/const.go +++ b/comm/const.go @@ -372,8 +372,8 @@ const ( Rtype11 TaskType = 11 //赠送X次友情点 Rtype12 TaskType = 12 //使用好友助战英雄xx次 Rtype13 TaskType = 13 //更换X次助战英雄 - Rtype14 TaskType = 14 //累计xx次普通招募 - Rtype15 TaskType = 15 //累计xx次阵营招募 + //Rtype14 TaskType = 14 //累计xx次普通招募 + //Rtype15 TaskType = 15 //累计xx次阵营招募 Rtype16 TaskType = 16 //招募获得xx品质英雄xx个 Rtype17 TaskType = 17 //普通招募十连,获得xx个以上xx星英雄 Rtype18 TaskType = 18 //xx次普通招募 @@ -441,16 +441,16 @@ const ( Rtype81 TaskType = 81 //通关A难度狩猎BOOS(检查最高难度记录是否达到了此难度,达到则完成) Rtype82 TaskType = 82 //通关狩猎指定BOOSN次(历史)(从创号开始记录登陆天数,通关任意难度进度都+1) //Rtype83 TaskType = 83 //通关难度A及以上指定狩猎BOOSN次(从接到任务开始,若通关难度大于等于设定难度,则进度+1) - Rtype84 TaskType = 84 //普通塔达到XX层(检查最高难度记录是否达到了此难度,达到则完成) - Rtype85 TaskType = 85 //赛季塔达到XX层(检查最高难度记录是否达到了此难度,达到则完成) - Rtype86 TaskType = 86 //本赛季的赛季塔达到XX层(检查本赛季最高难度记录是否达到了此难度,达到则完成) - Rtype87 TaskType = 87 //发现月之秘境N次(从接到任务开始,发现一次则进度+1) - Rtype88 TaskType = 88 //完成月之秘境N次(从接到任务开始,打完一个月之秘境则进度+1(耗尽BOSS挑战次数)) - Rtype89 TaskType = 89 //任意招募N次(从接到任务开始,普通招募和阵营招募都算,单抽1次,10连抽算10次) - Rtype90 TaskType = 90 //进行N次普通招募10连抽(从接到任务开始,单抽点10次不算,10连抽才进度+1) - Rtype91 TaskType = 91 //进行N次阵营招募10连抽(从接到任务开始,单抽点10次不算,10连抽才进度+1) - Rtype92 TaskType = 92 //强化装备N次(从接到任务开始,强化任意装备,失败和成功进度都+1) - Rtype93 TaskType = 93 //拥有一套强化到N级的A套装(记录A套装中每个部位的最高强化等级,并将这些强化等级中最低的数值计入进度,如果达到了任务所需的强化等级则完成任务。) + Rtype84 TaskType = 84 //普通塔达到XX层(检查最高难度记录是否达到了此难度,达到则完成) + Rtype85 TaskType = 85 //赛季塔达到XX层(检查最高难度记录是否达到了此难度,达到则完成) + Rtype86 TaskType = 86 //本赛季的赛季塔达到XX层(检查本赛季最高难度记录是否达到了此难度,达到则完成) + Rtype87 TaskType = 87 //发现月之秘境N次(从接到任务开始,发现一次则进度+1) + Rtype88 TaskType = 88 //完成月之秘境N次(从接到任务开始,打完一个月之秘境则进度+1(耗尽BOSS挑战次数)) + Rtype89 TaskType = 89 //任意招募N次(从接到任务开始,普通招募和阵营招募都算,单抽1次,10连抽算10次) + Rtype90 TaskType = 90 //进行N次普通招募10连抽(从接到任务开始,单抽点10次不算,10连抽才进度+1) + Rtype91 TaskType = 91 //进行N次阵营招募10连抽(从接到任务开始,单抽点10次不算,10连抽才进度+1) + Rtype92 TaskType = 92 //强化装备N次(从接到任务开始,强化任意装备,失败和成功进度都+1) + // Rtype93 TaskType = 93 //拥有一套强化到N级的A套装(记录A套装中每个部位的最高强化等级,并将这些强化等级中最低的数值计入进度,如果达到了任务所需的强化等级则完成任务。) Rtype94 TaskType = 94 //装备附魔N次(历史)(从创号开始记录,附魔成功进度+1) Rtype95 TaskType = 95 //装备洗练N次(历史)(从创号开始记录,洗练成功进度+1) Rtype96 TaskType = 96 //强化失败N次(从接到任务开始,强化失败进度+1) diff --git a/modules/equipment/api_equip.go b/modules/equipment/api_equip.go index 5582831b3..60a013c9b 100644 --- a/modules/equipment/api_equip.go +++ b/modules/equipment/api_equip.go @@ -177,9 +177,11 @@ func (this *apiComp) Equip(session comm.IUserSession, req *pb.EquipmentEquipReq) } if hero.SuiteId != 0 { this.module.ModuleRtask.SendToRtask(session, comm.Rtype49, 1, hero.Suite1Star, hero.Suite1Lv) + this.module.ModuleRtask.SendToRtask(session, comm.Rtype98, 1, hero.Suite1Lv) } if hero.SuiteExtId != 0 { this.module.ModuleRtask.SendToRtask(session, comm.Rtype48, 1, hero.Suite2Star, hero.Suite2Lv) + this.module.ModuleRtask.SendToRtask(session, comm.Rtype98, 1, hero.Suite1Lv) } session.SendMsg(string(this.module.GetType()), "equip", &pb.EquipmentEquipResp{Equipments: updatequipment}) diff --git a/modules/equipment/api_upgrade.go b/modules/equipment/api_upgrade.go index 3c8014dbe..ff0450b17 100644 --- a/modules/equipment/api_upgrade.go +++ b/modules/equipment/api_upgrade.go @@ -181,6 +181,11 @@ func (this *apiComp) Upgrade(session comm.IUserSession, req *pb.EquipmentUpgrade this.module.ModuleRtask.SendToRtask(session, comm.Rtype43, 1, equipment.Lv) this.module.ModuleRtask.SendToRtask(session, comm.Rtype44, equipment.Lv) this.module.ModuleRtask.SendToRtask(session, comm.Rtype47, 1) + if conf.Pos == 7 { + this.module.ModuleRtask.SendToRtask(session, comm.Rtype102, 1) + } else if conf.Pos == 6 { + this.module.ModuleRtask.SendToRtask(session, comm.Rtype100, 1) + } //聊天系统通知 if user = this.module.ModuleUser.GetUser(session.GetUserId()); user != nil { // var color *cfg.GameGameColorData diff --git a/modules/equipment/modelEquipment.go b/modules/equipment/modelEquipment.go index 7075139e4..68830a407 100644 --- a/modules/equipment/modelEquipment.go +++ b/modules/equipment/modelEquipment.go @@ -110,6 +110,21 @@ func (this *modelEquipmentComp) AddEquipments(session comm.IUserSession, cIds ma } else { //随机任务 this.module.ModuleRtask.SendToRtask(session, comm.Rtype50, 1, c.Star) + this.module.ModuleRtask.SendToRtask(session, comm.Rtype97, 1, c.Suittype, c.Star) + unm := int32(1) + if equipment.AdverbEntry != nil { + unm += int32(len(equipment.AdverbEntry)) + } + if equipment.Adverbskill != nil { + unm += int32(len(equipment.Adverbskill)) + } + this.module.ModuleRtask.SendToRtask(session, comm.Rtype99, 1, unm, c.Star) + if c.Pos == 7 { + this.module.ModuleRtask.SendToRtask(session, comm.Rtype103, 1, c.Star) + } else if c.Pos == 6 { + this.module.ModuleRtask.SendToRtask(session, comm.Rtype101, 1, c.Star) + } + add[equipment.Id] = equipment change = append(change, equipment) } diff --git a/modules/gm/module.go b/modules/gm/module.go index d1ea770f1..4869d730a 100644 --- a/modules/gm/module.go +++ b/modules/gm/module.go @@ -62,6 +62,7 @@ func (this *GM) OnInstallComp() { //bingo:Iamyoudad func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (code pb.ErrorCode) { code = pb.ErrorCode_ReqParameterError + cmd = strings.Replace(cmd, " ", "", -1) // 去空格 keys := strings.Split(cmd, ":") if len(keys) == 2 { if keys[0] == "bingo" { diff --git a/modules/gourmet/api_getlist.go b/modules/gourmet/api_getlist.go index 4d61f3d9c..2205c35b8 100644 --- a/modules/gourmet/api_getlist.go +++ b/modules/gourmet/api_getlist.go @@ -29,5 +29,7 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.GourmetGetListRe // 计算订单信息 this.module.modelGourmet.CalculationGourmet(session.GetUserId(), _gourmet) session.SendMsg(string(this.module.GetType()), GourmetGetListResp, &pb.GourmetGetListResp{Data: _gourmet}) + + this.module.ModuleRtask.SendToRtask(session, comm.Rtype136, _gourmet.TotalTime) return } diff --git a/modules/gourmet/model_gourmet.go b/modules/gourmet/model_gourmet.go index 0febbcdd7..95b2cf91d 100644 --- a/modules/gourmet/model_gourmet.go +++ b/modules/gourmet/model_gourmet.go @@ -97,6 +97,9 @@ func (this *modelGourmet) CalculationGourmet(uid string, gourmet *pb.DBGourmet) for _, order := range gourmet.Foods { _gourmetcfg := this.module.configure.GetGourmetConfigData(order.FoodType, gourmet.Skill[order.FoodType]) // 美食家配置表 if order.FoodCount > 0 { + if gourmet.CookingFood.ETime > configure.Now().Unix() { + break + } order.FoodCount-- if order.FoodCount == 0 { order.CookTime = 0 @@ -127,7 +130,8 @@ func (this *modelGourmet) CalculationGourmet(uid string, gourmet *pb.DBGourmet) gourmet.Ctime = gourmet.CookingFood.ETime mapData["ctime"] = gourmet.Ctime bRet = true - break + gourmet.TotalTime += szTime[order.FoodType] + mapData["totalTime"] = gourmet.TotalTime } } if !bRet { // 没有订单可以做 diff --git a/modules/hero/api_drawCard.go b/modules/hero/api_drawCard.go index c39231f49..d32421668 100644 --- a/modules/hero/api_drawCard.go +++ b/modules/hero/api_drawCard.go @@ -241,10 +241,10 @@ func (this *apiComp) DrawCard(session comm.IUserSession, req *pb.HeroDrawCardReq this.module.ModuleRtask.SendToRtask(session, comm.Rtype17, 1, k) } } - this.module.ModuleRtask.SendToRtask(session, comm.Rtype14, req.DrawCount) + //this.module.ModuleRtask.SendToRtask(session, comm.Rtype14, req.DrawCount) this.module.ModuleRtask.SendToRtask(session, comm.Rtype18, req.DrawCount) } else { // 阵营招募 - this.module.ModuleRtask.SendToRtask(session, comm.Rtype15, req.DrawCount) + //this.module.ModuleRtask.SendToRtask(session, comm.Rtype15, req.DrawCount) this.module.ModuleRtask.SendToRtask(session, comm.Rtype19, req.DrawCount) if drawCount == 10 { this.module.ModuleRtask.SendToRtask(session, comm.Rtype91, 1) // 阵营10连 diff --git a/modules/hero/api_fusion.go b/modules/hero/api_fusion.go index 718ae94df..dea8498a0 100644 --- a/modules/hero/api_fusion.go +++ b/modules/hero/api_fusion.go @@ -3,6 +3,7 @@ package hero import ( "go_dreamfactory/comm" "go_dreamfactory/pb" + "go_dreamfactory/utils" "google.golang.org/protobuf/proto" ) @@ -80,5 +81,7 @@ func (this *apiComp) Fusion(session comm.IUserSession, req *pb.HeroFusionReq) (c code = pb.ErrorCode_HeroCreate // 创建新英雄失败 } session.SendMsg(string(this.module.GetType()), HeroFusionResp, &pb.HeroFusionResp{Heroid: conf.Hero}) + // 通过融合获得指定英雄 + this.module.ModuleRtask.SendToRtask(session, comm.Rtype139, utils.ToInt32(conf.Hero)) return } diff --git a/modules/smithy/api_getlist.go b/modules/smithy/api_getlist.go index c1f4e6a91..f95832ef1 100644 --- a/modules/smithy/api_getlist.go +++ b/modules/smithy/api_getlist.go @@ -20,14 +20,15 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.SmithyGetListReq if code != pb.ErrorCode_Success { return // 参数校验失败直接返回 } - _gourmet, err := this.module.modelSmithy.getSmithyList(session.GetUserId()) + _smithy, err := this.module.modelSmithy.getSmithyList(session.GetUserId()) if err != nil { code = pb.ErrorCode_DBError return } // 计算订单信息 - this.module.modelSmithy.CalculationSmithy(session.GetUserId(), _gourmet) - session.SendMsg(string(this.module.GetType()), SmithyGetListResp, &pb.SmithyGetListResp{Data: _gourmet}) + this.module.modelSmithy.CalculationSmithy(session.GetUserId(), _smithy) + session.SendMsg(string(this.module.GetType()), SmithyGetListResp, &pb.SmithyGetListResp{Data: _smithy}) + this.module.ModuleRtask.SendToRtask(session, comm.Rtype137, _smithy.TotalTime) return } diff --git a/modules/smithy/model_smithy.go b/modules/smithy/model_smithy.go index 6bce20640..f0e21bad6 100644 --- a/modules/smithy/model_smithy.go +++ b/modules/smithy/model_smithy.go @@ -87,7 +87,11 @@ func (this *modelSmithy) CalculationSmithy(uid string, smithy *pb.DBSmithy) { bRet := false for _, order := range smithy.Orders { _gourmetcfg := this.module.configure.GetSmithyConfigData(order.DeskType, smithy.Skill[order.DeskType]) // 美食家配置表 + if order.Count > 0 { + if smithy.Clang.ETime > configure.Now().Unix() { + break + } order.Count-- if order.Count == 0 { order.NeedTime = 0 @@ -118,7 +122,8 @@ func (this *modelSmithy) CalculationSmithy(uid string, smithy *pb.DBSmithy) { smithy.Ctime = smithy.Clang.ETime mapData["ctime"] = smithy.Ctime bRet = true - break + smithy.TotalTime += szTime[order.DeskType] + mapData["totalTime"] = smithy.TotalTime } } if !bRet { // 没有订单可以做 @@ -147,6 +152,7 @@ func (this *modelSmithy) CalculationSmithy(uid string, smithy *pb.DBSmithy) { mapData["clang"] = smithy.Clang // 正在做的 this.module.ModifySmithyData(uid, mapData) // 同步数据 + } func (this *modelSmithy) CalculationDeskSkillLv(uid string, Smithy *pb.DBSmithy) {