Merge branch 'meixiongfeng' of http://git.legu.cc/liwei_3d/go_dreamfactory into meixiongfeng

This commit is contained in:
meixiongfeng 2022-11-23 10:29:27 +08:00
commit 5219a997b0
12 changed files with 148 additions and 19 deletions

View File

@ -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
}
]
}
]

View File

@ -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次普通招募
@ -450,7 +450,7 @@ const (
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套装中每个部位的最高强化等级并将这些强化等级中最低的数值计入进度如果达到了任务所需的强化等级则完成任务。)
// Rtype93 TaskType = 93 //拥有一套强化到N级的A套装(记录A套装中每个部位的最高强化等级并将这些强化等级中最低的数值计入进度如果达到了任务所需的强化等级则完成任务。)
Rtype94 TaskType = 94 //装备附魔N次历史(从创号开始记录,附魔成功进度+1)
Rtype95 TaskType = 95 //装备洗练N次历史(从创号开始记录,洗练成功进度+1)
Rtype96 TaskType = 96 //强化失败N次(从接到任务开始,强化失败进度+1)

View File

@ -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})

View File

@ -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

View File

@ -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)
}

View File

@ -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" {

View File

@ -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
}

View File

@ -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 { // 没有订单可以做

View File

@ -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连

View File

@ -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
}

View File

@ -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
}

View File

@ -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) {