上传埋点配置代码优化
This commit is contained in:
parent
670ee97952
commit
2ffc185bc0
@ -9,6 +9,7 @@ import (
|
||||
"reflect"
|
||||
"strings"
|
||||
|
||||
"go_dreamfactory/lego/base"
|
||||
"go_dreamfactory/lego/core"
|
||||
|
||||
"google.golang.org/protobuf/proto"
|
||||
@ -50,6 +51,12 @@ type ErrorCode struct {
|
||||
Data interface{}
|
||||
}
|
||||
|
||||
type IService interface {
|
||||
base.IRPCXService
|
||||
GetUserSession() (session IUserSession)
|
||||
PutUserSession(session IUserSession)
|
||||
}
|
||||
|
||||
// 用户会话
|
||||
type IUserSession interface {
|
||||
SetSession(ip, sessionId, stag, sid, uid string)
|
||||
@ -66,7 +73,7 @@ type IUserSession interface {
|
||||
Push() (err error) //警告 api传递过来的会话禁用此接口
|
||||
Close() (err error)
|
||||
Reset()
|
||||
Clone() (clone *UserSession) //克隆
|
||||
Clone() (session IUserSession) //克隆
|
||||
ToString() string
|
||||
}
|
||||
|
||||
|
@ -516,7 +516,7 @@ type (
|
||||
//埋点中心
|
||||
IBuried interface {
|
||||
//埋点中心触发
|
||||
TriggerBuried(uid string, burieds ...*pb.BuriedParam)
|
||||
TriggerBuried(session IUserSession, burieds ...*pb.BuriedParam)
|
||||
//校验条件是否达成 返回未完成列表
|
||||
CheckCondition(uid string, condiIds ...int32) (condis []*pb.ConIProgress, err error)
|
||||
//激活条件
|
||||
|
@ -5,7 +5,6 @@ import (
|
||||
"fmt"
|
||||
"go_dreamfactory/pb"
|
||||
|
||||
"go_dreamfactory/lego/base"
|
||||
"go_dreamfactory/lego/sys/log"
|
||||
|
||||
"google.golang.org/protobuf/proto"
|
||||
@ -16,7 +15,7 @@ import (
|
||||
用户会话对象 跨服操作用户的对象
|
||||
*/
|
||||
|
||||
func NewUserSessionByPools(service base.IRPCXService) IUserSession {
|
||||
func NewUserSessionByPools(service IService) IUserSession {
|
||||
return &UserSession{
|
||||
msgqueue: make([]*pb.UserMessage, 0),
|
||||
service: service,
|
||||
@ -29,7 +28,7 @@ type UserSession struct {
|
||||
ServiceTag string
|
||||
GatewayServiceId string //用户所在网关服务
|
||||
UserId string
|
||||
service base.IRPCXService
|
||||
service IService
|
||||
msgqueue []*pb.UserMessage
|
||||
}
|
||||
|
||||
@ -158,16 +157,9 @@ func (this *UserSession) Push() (err error) {
|
||||
}
|
||||
|
||||
// 克隆
|
||||
func (this *UserSession) Clone() (clone *UserSession) {
|
||||
clone = &UserSession{
|
||||
msgqueue: make([]*pb.UserMessage, 0),
|
||||
service: this.service,
|
||||
IP: this.IP,
|
||||
SessionId: this.SessionId,
|
||||
GatewayServiceId: this.GatewayServiceId,
|
||||
ServiceTag: this.ServiceTag,
|
||||
UserId: this.UserId,
|
||||
}
|
||||
func (this *UserSession) Clone() (session IUserSession) {
|
||||
session = this.service.GetUserSession()
|
||||
session.SetSession(this.IP, this.SessionId, this.ServiceTag, this.GatewayServiceId, this.UserId)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -6,13 +6,13 @@ import (
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
// 参数校验
|
||||
func (this *apiComp) ReceiveCheck(session comm.IUserSession, req *pb.AcademyReceiveReq) (errdata *pb.ErrorData) {
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
///奖励领取
|
||||
// /奖励领取
|
||||
func (this *apiComp) Receive(session comm.IUserSession, req *pb.AcademyReceiveReq) (errdata *pb.ErrorData) {
|
||||
var (
|
||||
iswin bool
|
||||
@ -66,7 +66,7 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.AcademyReceiveRe
|
||||
}
|
||||
|
||||
this.module.DispenseRes(session, level.Award, true)
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype151, 1))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype151, 1))
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), "receive", &pb.AcademyReceiveResp{Issucc: true})
|
||||
return
|
||||
|
@ -76,7 +76,7 @@ func (this *apiComp) ChallengeReward(session comm.IUserSession, req *pb.ArenaCha
|
||||
bulestate = pb.BattleRecordState_DefendLost
|
||||
}
|
||||
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype131, 1)
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype131, 1))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype131, 1))
|
||||
} else {
|
||||
info.Streak = 0
|
||||
if req.Revengeid != "" {
|
||||
@ -290,6 +290,6 @@ func (this *apiComp) ChallengeReward(session comm.IUserSession, req *pb.ArenaCha
|
||||
}
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), "challengereward", &pb.ArenaChallengeRewardResp{Issucc: true, Integral: info.Integral, Dan: info.Dan})
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype128, red.Integral), comm.GetBuriedParam(comm.Rtype129, red.Dan))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype128, red.Integral), comm.GetBuriedParam(comm.Rtype129, red.Dan))
|
||||
return
|
||||
}
|
||||
|
@ -158,7 +158,7 @@ func (this *Battle) CreatePveBattle(session comm.IUserSession, req *pb.BattlePVE
|
||||
if v != "" {
|
||||
flag = true
|
||||
// this.ModuleBuried.SendToRtask(session, comm.Rtype108, 1)
|
||||
go this.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype108, 1))
|
||||
go this.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype108, 1))
|
||||
break
|
||||
}
|
||||
}
|
||||
@ -167,7 +167,7 @@ func (this *Battle) CreatePveBattle(session comm.IUserSession, req *pb.BattlePVE
|
||||
return
|
||||
}
|
||||
if flag {
|
||||
go this.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype12, 1))
|
||||
go this.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype12, 1))
|
||||
}
|
||||
return
|
||||
}
|
||||
@ -305,7 +305,7 @@ func (this *Battle) CreateLPVEBattle(session comm.IUserSession, req *pb.BattleLP
|
||||
if v != "" {
|
||||
flag = true
|
||||
// this.ModuleBuried.SendToRtask(session, comm.Rtype108, 1)
|
||||
go this.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype108, 1))
|
||||
go this.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype108, 1))
|
||||
break
|
||||
}
|
||||
}
|
||||
@ -314,7 +314,7 @@ func (this *Battle) CreateLPVEBattle(session comm.IUserSession, req *pb.BattleLP
|
||||
return
|
||||
}
|
||||
if flag {
|
||||
go this.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype12, 1))
|
||||
go this.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype12, 1))
|
||||
}
|
||||
return
|
||||
}
|
||||
@ -461,7 +461,7 @@ func (this *Battle) CheckBattleReport(session comm.IUserSession, report *pb.Batt
|
||||
this.moonfantasy.Trigger(session, report)
|
||||
for _, v := range report.Completetask {
|
||||
// this.ModuleBuried.SendToRtask(session, comm.Rtype157, int32(report.Info.Ptype), v)
|
||||
go this.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype157, int32(report.Info.Ptype), v))
|
||||
go this.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype157, int32(report.Info.Ptype), v))
|
||||
}
|
||||
|
||||
if (report.WinSide == 1 && report.Info.RedCompId == session.GetUserId()) || (report.WinSide == 2 && report.Info.BlueCompId == session.GetUserId()) {
|
||||
|
@ -4,7 +4,6 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/base"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/lego/sys/event"
|
||||
"go_dreamfactory/lego/sys/log"
|
||||
@ -27,7 +26,7 @@ const moduleName = "埋点统计中心"
|
||||
|
||||
type Buried struct {
|
||||
modules.ModuleBase
|
||||
service base.IRPCXService
|
||||
service comm.IService
|
||||
configure *configureComp
|
||||
modelBuried *modelBuried
|
||||
}
|
||||
@ -42,7 +41,7 @@ func (this *Buried) GetType() core.M_Modules {
|
||||
|
||||
func (this *Buried) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
|
||||
err = this.ModuleBase.Init(service, module, options)
|
||||
this.service = service.(base.IRPCXService)
|
||||
this.service = service.(comm.IService)
|
||||
return
|
||||
}
|
||||
|
||||
@ -61,9 +60,11 @@ func (this *Buried) OnInstallComp() {
|
||||
}
|
||||
|
||||
// 跨服埋点触发
|
||||
func (this *Buried) Rpc_ModuleBuriedTrigger(ctx context.Context, args *pb.Rpc_ModuleBuriedTriggerReq, reply *pb.Rpc_ModuleBuriedTriggerResp) (err error) {
|
||||
this.Debug("跨服埋点触发!", log.Field{Key: "uid", Value: args.Uid}, log.Field{Key: "burieds", Value: args.Burieds})
|
||||
this.trigger(args.Uid, args.Burieds...)
|
||||
func (this *Buried) Rpc_ModuleBuriedTrigger(ctx context.Context, req *pb.Rpc_ModuleBuriedTriggerReq, reply *pb.Rpc_ModuleBuriedTriggerResp) (err error) {
|
||||
this.Debug("跨服埋点触发!", log.Field{Key: "uid", Value: req.UserId}, log.Field{Key: "burieds", Value: req.Burieds})
|
||||
session := this.service.GetUserSession()
|
||||
session.SetSession(req.Ip, req.UserSessionId, req.ServiceTag, req.GatewayServiceId, req.UserId)
|
||||
this.trigger(session, req.Burieds...)
|
||||
return
|
||||
}
|
||||
|
||||
@ -403,15 +404,15 @@ func (this *Buried) FinishConditionAndCheck(uid string, finishcondiIds []int32,
|
||||
}
|
||||
|
||||
// 触发埋点
|
||||
func (this *Buried) TriggerBuried(uid string, burieds ...*pb.BuriedParam) {
|
||||
func (this *Buried) TriggerBuried(session comm.IUserSession, burieds ...*pb.BuriedParam) {
|
||||
|
||||
if db.IsCross() {
|
||||
var (
|
||||
stag string
|
||||
err error
|
||||
)
|
||||
if stag, err = comm.UidToSTag(uid); err != nil {
|
||||
this.Error("远程触发埋点错误!", log.Field{Key: "uid", Value: uid}, log.Field{Key: "err", Value: err.Error()})
|
||||
if stag, err = comm.UidToSTag(session.GetUserId()); err != nil {
|
||||
this.Error("远程触发埋点错误!", log.Field{Key: "uid", Value: session.GetUserId()}, log.Field{Key: "err", Value: err.Error()})
|
||||
return
|
||||
}
|
||||
if _, err = this.service.AcrossClusterRpcGo(
|
||||
@ -420,19 +421,23 @@ func (this *Buried) TriggerBuried(uid string, burieds ...*pb.BuriedParam) {
|
||||
comm.Service_Worker,
|
||||
string(comm.Rpc_ModuleBuriedTrigger),
|
||||
pb.Rpc_ModuleBuriedTriggerReq{
|
||||
Uid: uid,
|
||||
Burieds: burieds,
|
||||
Ip: session.GetIP(),
|
||||
UserSessionId: session.GetSessionId(),
|
||||
ServiceTag: session.GetServiecTag(),
|
||||
GatewayServiceId: session.GetGatewayServiceId(),
|
||||
UserId: session.GetUserId(),
|
||||
Burieds: burieds,
|
||||
},
|
||||
nil); err != nil {
|
||||
this.Error("远程触发埋点错误!", log.Field{Key: "burieds", Value: burieds}, log.Field{Key: "err", Value: err.Error()})
|
||||
return
|
||||
}
|
||||
} else {
|
||||
this.trigger(uid, burieds...)
|
||||
this.trigger(session, burieds...)
|
||||
}
|
||||
}
|
||||
|
||||
func (this *Buried) trigger(uid string, burieds ...*pb.BuriedParam) {
|
||||
func (this *Buried) trigger(session comm.IUserSession, burieds ...*pb.BuriedParam) {
|
||||
var (
|
||||
pass map[*pb.BuriedParam][]*cfg.GameBuriedCondiData = make(map[*pb.BuriedParam][]*cfg.GameBuriedCondiData)
|
||||
bconf *cfg.GameBuriedTypeData
|
||||
@ -448,10 +453,10 @@ func (this *Buried) trigger(uid string, burieds ...*pb.BuriedParam) {
|
||||
err error
|
||||
)
|
||||
this.Debug("触发埋点!", log.Field{Key: "burieds", Value: burieds})
|
||||
lock, _ := this.modelBuried.userlock(uid)
|
||||
lock, _ := this.modelBuried.userlock(session.GetUserId())
|
||||
err = lock.Lock()
|
||||
if err != nil {
|
||||
this.Error("埋点分布式锁失效 err!", log.Field{Key: "uid", Value: uid}, log.Field{Key: "err", Value: err.Error()})
|
||||
this.Error("埋点分布式锁失效 err!", log.Field{Key: "uid", Value: session.GetUserId()}, log.Field{Key: "err", Value: err.Error()})
|
||||
return
|
||||
}
|
||||
defer lock.Unlock()
|
||||
@ -473,7 +478,7 @@ func (this *Buried) trigger(uid string, burieds ...*pb.BuriedParam) {
|
||||
}
|
||||
}
|
||||
if len(pass) > 0 {
|
||||
if bdatas, err = this.modelBuried.getUserBurieds(uid); err != nil {
|
||||
if bdatas, err = this.modelBuried.getUserBurieds(session.GetUserId()); err != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
@ -527,7 +532,7 @@ func (this *Buried) trigger(uid string, burieds ...*pb.BuriedParam) {
|
||||
}
|
||||
|
||||
if len(changes) > 0 { //同步数据
|
||||
if err = this.modelBuried.updateUserBurieds(uid, bdatas); err != nil {
|
||||
if err = this.modelBuried.updateUserBurieds(session.GetUserId(), bdatas); err != nil {
|
||||
this.Error("更新用户埋点数据错误!", log.Field{Key: "err", Value: err.Error()})
|
||||
return
|
||||
}
|
||||
@ -544,14 +549,14 @@ func (this *Buried) trigger(uid string, burieds ...*pb.BuriedParam) {
|
||||
continue
|
||||
}
|
||||
//异步通知指定模块
|
||||
go nmodule.BuriedsNotify(uid, v)
|
||||
go nmodule.BuriedsNotify(session.GetUserId(), v)
|
||||
}
|
||||
}
|
||||
|
||||
//通知事件
|
||||
if len(changes) > 0 {
|
||||
this.Debug("条件变化通知", log.Field{Key: "ConIds", Value: changes})
|
||||
event.TriggerEvent(comm.EventBuriedComplete, uid, changes)
|
||||
event.TriggerEvent(comm.EventBuriedComplete, session.GetUserId(), changes)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,7 @@ import (
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
// 参数校验
|
||||
func (this *apiComp) SendCheck(session comm.IUserSession, req *pb.ChatSendReq) (errdata *pb.ErrorData) {
|
||||
if (req.Channel == pb.ChatChannel_Union && req.TargetId == "") || (req.Channel == pb.ChatChannel_Private && req.TargetId == "") {
|
||||
errdata = &pb.ErrorData{
|
||||
@ -22,7 +22,7 @@ func (this *apiComp) SendCheck(session comm.IUserSession, req *pb.ChatSendReq) (
|
||||
return
|
||||
}
|
||||
|
||||
///消息发送请求
|
||||
// /消息发送请求
|
||||
func (this *apiComp) Send(session comm.IUserSession, req *pb.ChatSendReq) (errdata *pb.ErrorData) {
|
||||
var (
|
||||
err error
|
||||
@ -82,7 +82,7 @@ func (this *apiComp) Send(session comm.IUserSession, req *pb.ChatSendReq) (errda
|
||||
}
|
||||
go this.module.modelChat.sendChatToWorld(msg, max_chat)
|
||||
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype62, 1)
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype62, 1))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype62, 1))
|
||||
break
|
||||
case pb.ChatChannel_Union:
|
||||
if msg.Ctype == pb.ChatType_Text { //过滤敏感词
|
||||
@ -122,7 +122,7 @@ func (this *apiComp) Send(session comm.IUserSession, req *pb.ChatSendReq) (errda
|
||||
|
||||
go this.module.modelChat.sendChatToCrossServer(msg, max_chat)
|
||||
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype106, 1)
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype106, 1))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype106, 1))
|
||||
break
|
||||
default:
|
||||
this.module.Errorf("不存在的聊天频道类型channel:%d ", req.Channel)
|
||||
|
@ -109,7 +109,7 @@ func (this *apiComp) Do(session comm.IUserSession, req *pb.DispatchDoReq) (errda
|
||||
return
|
||||
}
|
||||
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype186, 1))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype186, 1))
|
||||
|
||||
//扣除门票
|
||||
this.module.ConsumeRes(session, []*cfg.Gameatn{ticketAtn}, true)
|
||||
|
@ -9,7 +9,7 @@ import (
|
||||
"math/rand"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
// 参数校验
|
||||
func (this *apiComp) EnchCheck(session comm.IUserSession, req *pb.EquipmentEnchReq) (errdata *pb.ErrorData) {
|
||||
if req.Eid == "" {
|
||||
errdata = &pb.ErrorData{
|
||||
@ -20,7 +20,7 @@ func (this *apiComp) EnchCheck(session comm.IUserSession, req *pb.EquipmentEnchR
|
||||
return
|
||||
}
|
||||
|
||||
//附魔
|
||||
// 附魔
|
||||
func (this *apiComp) Ench(session comm.IUserSession, req *pb.EquipmentEnchReq) (errdata *pb.ErrorData) {
|
||||
var (
|
||||
equip *pb.DB_Equipment
|
||||
@ -112,7 +112,7 @@ func (this *apiComp) Ench(session comm.IUserSession, req *pb.EquipmentEnchReq) (
|
||||
}
|
||||
}
|
||||
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype94, 1)
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype94, 1))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype94, 1))
|
||||
session.SendMsg(string(this.module.GetType()), "ench", &pb.EquipmentEnchResp{Issucc: true, Equipment: equip})
|
||||
return
|
||||
}
|
||||
|
@ -214,7 +214,7 @@ func (this *apiComp) Equip(session comm.IUserSession, req *pb.EquipmentEquipReq)
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype5, equipNum, utils.ToInt32(hero.HeroID)))
|
||||
|
||||
if len(tasks) > 0 {
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), tasks...)
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), tasks...)
|
||||
}
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), "equip", &pb.EquipmentEquipResp{Equipments: updatequipment, Suits: suits})
|
||||
|
@ -289,7 +289,7 @@ func (this *apiComp) Upgrade(session comm.IUserSession, req *pb.EquipmentUpgrade
|
||||
}
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype92, 1))
|
||||
if len(tasks) > 0 {
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), tasks...)
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), tasks...)
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), "upgrade", &pb.EquipmentUpgradeResp{IsSucc: issucc, Equipment: modifyequipments})
|
||||
return
|
||||
|
@ -79,7 +79,7 @@ func (this *apiComp) Wash(session comm.IUserSession, req *pb.EquipmentWashReq) (
|
||||
}
|
||||
}
|
||||
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype95, 1)
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype95, 1))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype95, 1))
|
||||
session.SendMsg(string(this.module.GetType()), "wash", &pb.EquipmentWashResp{Eid: req.Eid, AdverbEntry: adverbEntry})
|
||||
return
|
||||
}
|
||||
|
@ -139,7 +139,7 @@ func (this *modelEquipmentComp) AddEquipments(session comm.IUserSession, cIds ma
|
||||
|
||||
//异步出发任务启动
|
||||
if len(tasks) > 0 {
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), tasks...)
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), tasks...)
|
||||
}
|
||||
|
||||
if len(add) > 0 {
|
||||
|
@ -261,7 +261,7 @@ func (this *Equipment) AddEquipment(session comm.IUserSession, equip *pb.DB_Equi
|
||||
} else if configure.Pos == 6 {
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype101, 1, configure.Color))
|
||||
}
|
||||
go this.ModuleBuried.TriggerBuried(session.GetUserId(), tasks...)
|
||||
go this.ModuleBuried.TriggerBuried(session.Clone(), tasks...)
|
||||
this.equipmentsChangePush(session, []*pb.DB_Equipment{equip})
|
||||
return
|
||||
}
|
||||
|
@ -163,7 +163,7 @@ func (this *apiComp) Agree(session comm.IUserSession, req *pb.FriendAgreeReq) (e
|
||||
sz = append(sz, comm.GetBuriedParam2(comm.Rtype10, v))
|
||||
}
|
||||
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), sz...)
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), sz...)
|
||||
resp := &pb.FriendAgreeResp{
|
||||
Num: optNum,
|
||||
}
|
||||
|
@ -113,6 +113,6 @@ func (this *apiComp) Assisthero(session comm.IUserSession, req *pb.FriendAssisth
|
||||
|
||||
// 随机任务Rtype13
|
||||
// this.moduleFriend.ModuleRtask.SendToRtask(session, comm.Rtype13, 1)
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype13, 1))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype13, 1))
|
||||
return
|
||||
}
|
||||
|
@ -122,6 +122,6 @@ func (this *apiComp) Zan(session comm.IUserSession, req *pb.FriendZanReq) (errda
|
||||
|
||||
// 赠送X次友情点
|
||||
// this.moduleFriend.ModuleRtask.SendToRtask(session, comm.Rtype11, 1)
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype11, 1))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype11, 1))
|
||||
return
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
// 参数校验
|
||||
func (this *apiComp) CreateFoodCheck(session comm.IUserSession, req *pb.GourmetCreateFoodReq) (errdata *pb.ErrorData) {
|
||||
if req.Cid == "" || len(req.Material) == 0 {
|
||||
errdata = &pb.ErrorData{
|
||||
@ -18,7 +18,7 @@ func (this *apiComp) CreateFoodCheck(session comm.IUserSession, req *pb.GourmetC
|
||||
return
|
||||
}
|
||||
|
||||
///获取美食城基本信息
|
||||
// /获取美食城基本信息
|
||||
func (this *apiComp) CreateFood(session comm.IUserSession, req *pb.GourmetCreateFoodReq) (errdata *pb.ErrorData) {
|
||||
var (
|
||||
res []*cfg.Gameatn
|
||||
@ -94,6 +94,6 @@ func (this *apiComp) CreateFood(session comm.IUserSession, req *pb.GourmetCreate
|
||||
Cid: curFood,
|
||||
FirstGet: bFirst,
|
||||
})
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype150, 1))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype150, 1))
|
||||
return
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
"strconv"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
// 参数校验
|
||||
func (this *apiComp) AwakenCheck(session comm.IUserSession, req *pb.HeroAwakenReq) (errdata *pb.ErrorData) {
|
||||
if req.HeroObjID == "" {
|
||||
errdata = &pb.ErrorData{
|
||||
@ -21,7 +21,7 @@ func (this *apiComp) AwakenCheck(session comm.IUserSession, req *pb.HeroAwakenRe
|
||||
return
|
||||
}
|
||||
|
||||
/// 英雄觉醒
|
||||
// / 英雄觉醒
|
||||
func (this *apiComp) Awaken(session comm.IUserSession, req *pb.HeroAwakenReq) (errdata *pb.ErrorData) {
|
||||
var (
|
||||
awakenData *cfg.GameHeroAwakenData
|
||||
@ -169,6 +169,6 @@ func (this *apiComp) Awaken(session comm.IUserSession, req *pb.HeroAwakenReq) (e
|
||||
|
||||
return
|
||||
}
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), szTask...)
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), szTask...)
|
||||
return
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
"math"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
// 参数校验
|
||||
func (this *apiComp) BuyCheck(session comm.IUserSession, req *pb.HeroBuyReq) (errdata *pb.ErrorData) {
|
||||
if req.BuyType == 0 || req.BuyCount == 0 {
|
||||
errdata = &pb.ErrorData{
|
||||
@ -19,7 +19,7 @@ func (this *apiComp) BuyCheck(session comm.IUserSession, req *pb.HeroBuyReq) (er
|
||||
return
|
||||
}
|
||||
|
||||
///获取用户商品列表
|
||||
// /获取用户商品列表
|
||||
func (this *apiComp) Buy(session comm.IUserSession, req *pb.HeroBuyReq) (errdata *pb.ErrorData) {
|
||||
var (
|
||||
err error
|
||||
@ -135,7 +135,7 @@ func (this *apiComp) Buy(session comm.IUserSession, req *pb.HeroBuyReq) (errdata
|
||||
}
|
||||
}
|
||||
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), tasks...)
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), tasks...)
|
||||
session.SendMsg(string(this.module.GetType()), "buy", &pb.HeroBuyResp{
|
||||
IsSucc: true,
|
||||
Onebuy: record.Onebuy + req.BuyCount,
|
||||
|
@ -94,6 +94,6 @@ package hero
|
||||
// session.SendMsg(string(this.module.GetType()), HeroFusionResp, &pb.HeroFusionResp{Heroid: conf.Hero})
|
||||
// // 通过融合获得指定英雄
|
||||
// // this.module.ModuleRtask.SendToRtask(session, comm.Rtype139, utils.ToInt32(conf.Hero))
|
||||
// go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype139, utils.ToInt32(conf.Hero)))
|
||||
// go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype139, utils.ToInt32(conf.Hero)))
|
||||
// return
|
||||
// }
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
"go_dreamfactory/utils"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
// 参数校验
|
||||
func (this *apiComp) StrengthenUpSkillCheck(session comm.IUserSession, req *pb.HeroStrengthenUpSkillReq) (errdata *pb.ErrorData) {
|
||||
if req.HeroObjID == "" || len(req.Item) == 0 {
|
||||
errdata = &pb.ErrorData{
|
||||
@ -20,7 +20,7 @@ func (this *apiComp) StrengthenUpSkillCheck(session comm.IUserSession, req *pb.H
|
||||
return
|
||||
}
|
||||
|
||||
/// 英雄技能升级
|
||||
// / 英雄技能升级
|
||||
func (this *apiComp) StrengthenUpSkill(session comm.IUserSession, req *pb.HeroStrengthenUpSkillReq) (errdata *pb.ErrorData) {
|
||||
var (
|
||||
upSkillPos int32 // 升级的技能位置
|
||||
@ -153,6 +153,6 @@ func (this *apiComp) StrengthenUpSkill(session comm.IUserSession, req *pb.HeroSt
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype116, lvUpCount, cfg.Race))
|
||||
}
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype117, lvUpCount, utils.ToInt32(_hero.HeroID)))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), szTask...)
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), szTask...)
|
||||
return
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
"go_dreamfactory/utils"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
// 参数校验
|
||||
func (this *apiComp) StrengthenUpStarCheck(session comm.IUserSession, req *pb.HeroStrengthenUpStarReq) (errdata *pb.ErrorData) {
|
||||
if req.HeroObjID == "" {
|
||||
errdata = &pb.ErrorData{
|
||||
@ -19,7 +19,7 @@ func (this *apiComp) StrengthenUpStarCheck(session comm.IUserSession, req *pb.He
|
||||
return
|
||||
}
|
||||
|
||||
/// 英雄升星
|
||||
// / 英雄升星
|
||||
func (this *apiComp) StrengthenUpStar(session comm.IUserSession, req *pb.HeroStrengthenUpStarReq) (errdata *pb.ErrorData) {
|
||||
var (
|
||||
starConf *cfg.GameHeroStarupData // 配置表目标升星英雄信息
|
||||
@ -114,6 +114,6 @@ func (this *apiComp) StrengthenUpStar(session comm.IUserSession, req *pb.HeroStr
|
||||
}
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype114, _hero.Star, utils.ToInt32(_hero.HeroID)))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype115, 1, _hero.Star))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), szTask...)
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), szTask...)
|
||||
return
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
"go_dreamfactory/utils"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
// 参数校验
|
||||
func (this *apiComp) TalentLearnCheck(session comm.IUserSession, req *pb.HeroTalentLearnReq) (errdata *pb.ErrorData) {
|
||||
if req.TalentID <= 0 {
|
||||
errdata = &pb.ErrorData{
|
||||
@ -205,7 +205,7 @@ func (this *apiComp) TalentLearn(session comm.IUserSession, req *pb.HeroTalentLe
|
||||
}
|
||||
}
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype199, 1))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), szTask...)
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), szTask...)
|
||||
}
|
||||
|
||||
return
|
||||
|
@ -599,7 +599,7 @@ func (this *ModelHero) AddCardExp(session comm.IUserSession, hero *pb.DBHero, ex
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype33, 1, 1, hero.Lv))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype118, hero.Lv, hero.JuexingLv))
|
||||
go this.module.passon.HeroUpLv(session.GetUserId(), hero.HeroID, curLv)
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), szTask...)
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), szTask...)
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ func (this *Hero) createRepeatHero(session comm.IUserSession, heroCfgId string,
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype1, 1, utils.ToInt32(heroCfgId)))
|
||||
szTask = append(szTask, comm.GetBuriedParam2(comm.Rtype30, heroCfgId, cfg.Color))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype31, 1, cfg.Color))
|
||||
go this.ModuleBuried.TriggerBuried(session.GetUserId(), szTask...)
|
||||
go this.ModuleBuried.TriggerBuried(session.Clone(), szTask...)
|
||||
}
|
||||
|
||||
return
|
||||
@ -791,7 +791,7 @@ func (this *Hero) SendTaskMsg(session comm.IUserSession, szStar []int32, drawCou
|
||||
}
|
||||
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype89, drawCount))
|
||||
go this.ModuleBuried.TriggerBuried(session.GetUserId(), szTask...)
|
||||
go this.ModuleBuried.TriggerBuried(session.Clone(), szTask...)
|
||||
}
|
||||
|
||||
func (this *Hero) RegisterInstructor(session comm.IUserSession, heroOid []string, fulllvenr int32) (errdata *pb.ErrorData) {
|
||||
|
@ -6,13 +6,13 @@ import (
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
// 参数校验
|
||||
func (this *apiComp) UpgradeCheck(session comm.IUserSession, req *pb.HoroscopeUpgradeReq) (errdata *pb.ErrorData) {
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
///获取自己的排行榜信息
|
||||
// /获取自己的排行榜信息
|
||||
func (this *apiComp) Upgrade(session comm.IUserSession, req *pb.HoroscopeUpgradeReq) (errdata *pb.ErrorData) {
|
||||
var (
|
||||
info *pb.DBHoroscope
|
||||
@ -71,7 +71,7 @@ func (this *apiComp) Upgrade(session comm.IUserSession, req *pb.HoroscopeUpgrade
|
||||
}
|
||||
info.Nodes[conf.NodeId] = conf.Lv + 1
|
||||
if info.Nodes[conf.NodeId] == 1 { //解锁
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype173, 1))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype173, 1))
|
||||
}
|
||||
if err = this.module.modelHoroscope.updateInfo(session, info); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
"strconv"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
// 参数校验
|
||||
func (this *apiComp) ChallengeOverCheck(session comm.IUserSession, req *pb.HuntingChallengeOverReq) (errdata *pb.ErrorData) {
|
||||
if req.BossType <= 0 && req.Difficulty > 0 {
|
||||
errdata = &pb.ErrorData{
|
||||
@ -19,7 +19,7 @@ func (this *apiComp) ChallengeOverCheck(session comm.IUserSession, req *pb.Hunti
|
||||
return
|
||||
}
|
||||
|
||||
///挑战主线关卡
|
||||
// /挑战主线关卡
|
||||
func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.HuntingChallengeOverReq) (errdata *pb.ErrorData) {
|
||||
var (
|
||||
mapData map[string]interface{}
|
||||
@ -182,6 +182,6 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.HuntingCha
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype83, 1, req.BossType, req.Difficulty))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype202, consumPs))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype200, 1))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), tasks...)
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), tasks...)
|
||||
return
|
||||
}
|
||||
|
@ -218,7 +218,7 @@ func (this *Items) AddItems(session comm.IUserSession, items map[string]int32, b
|
||||
}
|
||||
}
|
||||
if len(tasks) > 0 {
|
||||
go this.ModuleBuried.TriggerBuried(session.GetUserId(), tasks...)
|
||||
go this.ModuleBuried.TriggerBuried(session.Clone(), tasks...)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
"go_dreamfactory/utils"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
// 参数校验
|
||||
func (this *apiComp) UseGiftCheck(session comm.IUserSession, req *pb.LibraryUseGiftReq) (errdata *pb.ErrorData) {
|
||||
if req.Heroid == "" || req.Items == "" || req.Counts == 0 {
|
||||
errdata = &pb.ErrorData{
|
||||
@ -192,7 +192,7 @@ func (this *apiComp) UseGift(session comm.IUserSession, req *pb.LibraryUseGiftRe
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype133, _heroObj.Favorlv, utils.ToInt32(_heroObj.Heroid)))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype134, upLv))
|
||||
szTask = append(szTask, comm.GetBuriedParam2(comm.Rtype132, _heroObj.Heroid, _heroObj.Favorlv))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), szTask...)
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), szTask...)
|
||||
}
|
||||
|
||||
return
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
// 参数校验
|
||||
func (this *apiComp) ChallengeOverCheck(session comm.IUserSession, req *pb.MlineChallengeOverReq) (errdata *pb.ErrorData) {
|
||||
if req.StageId == 0 {
|
||||
errdata = &pb.ErrorData{
|
||||
@ -19,7 +19,7 @@ func (this *apiComp) ChallengeOverCheck(session comm.IUserSession, req *pb.Mline
|
||||
return
|
||||
}
|
||||
|
||||
///挑战主线关卡
|
||||
// /挑战主线关卡
|
||||
func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.MlineChallengeOverReq) (errdata *pb.ErrorData) {
|
||||
var (
|
||||
curChapter *pb.DBMline // 当前章节信息
|
||||
@ -248,6 +248,6 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.MlineChall
|
||||
}
|
||||
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype160, allStar)
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype160, allStar, stageConf.Chapterid))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), tasks...)
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), tasks...)
|
||||
return
|
||||
}
|
||||
|
@ -407,7 +407,7 @@ func (this *ModuleBase) ConsumeRes(session comm.IUserSession, res []*cfg.Gameatn
|
||||
this.Debug("消耗玩家资源", log.Field{Key: "uid", Value: session.GetUserId()}, log.Field{Key: "attrs", Value: attrs})
|
||||
if count, ok := attrs[comm.ResDiamond]; ok {
|
||||
// this.ModuleBuried.SendToRtask(session, comm.Rtype104, -count)
|
||||
go this.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype104, -count))
|
||||
go this.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype104, -count))
|
||||
}
|
||||
}
|
||||
if len(items) > 0 {
|
||||
|
@ -6,12 +6,12 @@ import (
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
// 参数校验
|
||||
func (this *apiComp) BattleCheck(session comm.IUserSession, req *pb.MoonfantasyBattleReq) (errdata *pb.ErrorData) {
|
||||
return
|
||||
}
|
||||
|
||||
///挑战怪物请求
|
||||
// /挑战怪物请求
|
||||
func (this *apiComp) Battle(session comm.IUserSession, req *pb.MoonfantasyBattleReq) (errdata *pb.ErrorData) {
|
||||
var (
|
||||
boss *cfg.GameDreamlandBoosData
|
||||
@ -118,7 +118,7 @@ func (this *apiComp) Battle(session comm.IUserSession, req *pb.MoonfantasyBattle
|
||||
"record": mdata.Record,
|
||||
})
|
||||
session.SendMsg(string(this.module.GetType()), "battle", &pb.MoonfantasyBattleResp{
|
||||
Mid: mdata.Monster,
|
||||
Mid: mdata.Monster,
|
||||
Info: &pb.BattleInfo{
|
||||
Id: record.Id,
|
||||
Title: record.Title,
|
||||
@ -131,6 +131,6 @@ func (this *apiComp) Battle(session comm.IUserSession, req *pb.MoonfantasyBattle
|
||||
Buleflist: record.Buleflist,
|
||||
},
|
||||
})
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype88, 1))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype88, 1))
|
||||
return
|
||||
}
|
||||
|
@ -17,13 +17,13 @@ import (
|
||||
"go.mongodb.org/mongo-driver/x/bsonx"
|
||||
)
|
||||
|
||||
///论坛 数据组件
|
||||
// /论坛 数据组件
|
||||
type modelDreamComp struct {
|
||||
modules.MCompModel
|
||||
module *Moonfantasy
|
||||
}
|
||||
|
||||
//组件初始化接口
|
||||
// 组件初始化接口
|
||||
func (this *modelDreamComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, opt core.IModuleOptions) (err error) {
|
||||
this.MCompModel.Init(service, module, comp, opt)
|
||||
this.module = module.(*Moonfantasy)
|
||||
@ -39,7 +39,7 @@ func (this *modelDreamComp) newDreamLock(mid string) (result *redis.RedisMutex,
|
||||
return this.module.modelDream.NewRedisMutex(fmt.Sprintf("%s-%s_lock", this.TableName, mid), 5)
|
||||
}
|
||||
|
||||
///查询月之秘境记录
|
||||
// /查询月之秘境记录
|
||||
func (this *modelDreamComp) querymfantasy(mid string) (result *pb.DBMoonFantasy, err error) {
|
||||
result = &pb.DBMoonFantasy{}
|
||||
if err = this.GetListObj("", mid, result); err != nil && err != mongo.ErrNilDocument {
|
||||
@ -48,7 +48,7 @@ func (this *modelDreamComp) querymfantasy(mid string) (result *pb.DBMoonFantasy,
|
||||
return
|
||||
}
|
||||
|
||||
///插叙用户秘境列表
|
||||
// /插叙用户秘境列表
|
||||
func (this *modelDreamComp) querymfantasys(uid string) (result []*pb.DBMoonFantasy, err error) {
|
||||
fantasys := make([]*pb.DBMoonFantasy, 0)
|
||||
if err = this.GetList("", &fantasys); err != nil {
|
||||
@ -65,7 +65,7 @@ func (this *modelDreamComp) querymfantasys(uid string) (result []*pb.DBMoonFanta
|
||||
return
|
||||
}
|
||||
|
||||
///添加月之秘境记录
|
||||
// /添加月之秘境记录
|
||||
func (this *modelDreamComp) addDreamData(user *pb.UserInfo, boss *cfg.GameDreamlandBoosData) (result *pb.DBMoonFantasy, err error) {
|
||||
result = &pb.DBMoonFantasy{
|
||||
Id: primitive.NewObjectID().Hex(),
|
||||
@ -84,7 +84,7 @@ func (this *modelDreamComp) addDreamData(user *pb.UserInfo, boss *cfg.GameDreaml
|
||||
return
|
||||
}
|
||||
|
||||
//触发月之秘境
|
||||
// 触发月之秘境
|
||||
func (this *modelDreamComp) trigger(session comm.IUserSession) {
|
||||
var (
|
||||
user *pb.DBUser
|
||||
@ -135,11 +135,11 @@ func (this *modelDreamComp) trigger(session comm.IUserSession) {
|
||||
this.module.modelDream.noticeuserfriend(session, mdata.Id, chat)
|
||||
session.SendMsg(string(this.module.GetType()), "trigger", &pb.MoonfantasyTriggerPush{Issucc: true, Mid: mdata.Id, Monster: mdata.Monster})
|
||||
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype87, 1)
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype87, 1))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype87, 1))
|
||||
return
|
||||
}
|
||||
|
||||
//触发月之秘境
|
||||
// 触发月之秘境
|
||||
func (this *modelDreamComp) triggerbyid(session comm.IUserSession, boosid string) (err error) {
|
||||
var (
|
||||
user *pb.DBUser
|
||||
@ -189,11 +189,11 @@ func (this *modelDreamComp) triggerbyid(session comm.IUserSession, boosid string
|
||||
this.module.modelDream.noticeuserfriend(session, mdata.Id, chat)
|
||||
session.SendMsg(string(this.module.GetType()), "trigger", &pb.MoonfantasyTriggerPush{Issucc: true, Mid: mdata.Id, Monster: mdata.Monster})
|
||||
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype87, 1)
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype87, 1))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype87, 1))
|
||||
return
|
||||
}
|
||||
|
||||
///查询好友数据
|
||||
// /查询好友数据
|
||||
func (this *modelDreamComp) noticeuserfriend(session comm.IUserSession, mid string, chat *pb.DBChat) (errdata *pb.ErrorData) {
|
||||
var (
|
||||
// model *db.DBModel
|
||||
@ -230,7 +230,7 @@ func (this *modelDreamComp) noticeuserfriend(session comm.IUserSession, mid stri
|
||||
return
|
||||
}
|
||||
|
||||
//延迟推送到 世界聊天频道
|
||||
// 延迟推送到 世界聊天频道
|
||||
func (this *modelDreamComp) delaynoticeWorld(mid string, chat *pb.DBChat) {
|
||||
timewheel.Add(time.Minute*15, func(t *timewheel.Task, i ...interface{}) {
|
||||
_mid := i[0].(string)
|
||||
|
@ -11,7 +11,7 @@ import (
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
// 参数校验
|
||||
func (this *apiComp) ChallengeOverCheck(session comm.IUserSession, req *pb.PagodaChallengeOverReq) (errdata *pb.ErrorData) {
|
||||
if req.Cid <= 0 {
|
||||
errdata = &pb.ErrorData{
|
||||
@ -23,7 +23,7 @@ func (this *apiComp) ChallengeOverCheck(session comm.IUserSession, req *pb.Pagod
|
||||
return
|
||||
}
|
||||
|
||||
///挑战主线关卡
|
||||
// /挑战主线关卡
|
||||
func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.PagodaChallengeOverReq) (errdata *pb.ErrorData) {
|
||||
var (
|
||||
mapData map[string]interface{}
|
||||
@ -178,6 +178,6 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.PagodaChal
|
||||
return
|
||||
}
|
||||
// 任务相关
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype168, pagoda.Data[conf.Tab], conf.Tab))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype168, pagoda.Data[conf.Tab], conf.Tab))
|
||||
return
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
"go_dreamfactory/sys/configure"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
// 参数校验
|
||||
func (this *apiComp) ChallengeRaceOverCheck(session comm.IUserSession, req *pb.PagodaChallengeRaceOverReq) (errdata *pb.ErrorData) {
|
||||
if req.Cid <= 0 {
|
||||
errdata = &pb.ErrorData{
|
||||
@ -18,7 +18,7 @@ func (this *apiComp) ChallengeRaceOverCheck(session comm.IUserSession, req *pb.P
|
||||
return
|
||||
}
|
||||
|
||||
///挑战主线关卡
|
||||
// /挑战主线关卡
|
||||
func (this *apiComp) ChallengeRaceOver(session comm.IUserSession, req *pb.PagodaChallengeRaceOverReq) (errdata *pb.ErrorData) {
|
||||
var (
|
||||
mapData map[string]interface{}
|
||||
@ -141,6 +141,6 @@ func (this *apiComp) ChallengeRaceOver(session comm.IUserSession, req *pb.Pagoda
|
||||
})
|
||||
|
||||
// 任务相关
|
||||
//go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype168, pagoda.Data[conf.Tab], conf.Tab))
|
||||
//go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype168, pagoda.Data[conf.Tab], conf.Tab))
|
||||
return
|
||||
}
|
||||
|
@ -121,6 +121,6 @@ func (this *apiComp) InRoom(session comm.IUserSession, req *pb.PassonInRoomReq)
|
||||
}
|
||||
return
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), "inroom", &pb.PassonInRoomResp{Heroid: req.Heroid})
|
||||
session.SendMsg(string(this.module.GetType()), "inroom", &pb.PassonInRoomResp{Heroid: req.Heroid, Index: req.Index})
|
||||
return
|
||||
}
|
||||
|
@ -131,6 +131,7 @@ func (this *apiComp) Accept(session comm.IUserSession, req *pb.PracticeAcceptReq
|
||||
|
||||
this.module.SendMsgToUser(string(this.module.GetType()), "qiecuonotify",
|
||||
&pb.PracticeQiecuonotifyPush{Uid: session.GetUserId(), NotifyType: 2}, req.Uid)
|
||||
go this.module.ModuleBuried.TriggerBuried(req.Uid, comm.GetBuriedParam(comm.Rtype183, 1))
|
||||
_session, _ := this.module.GetUserSession(req.Uid)
|
||||
go this.module.ModuleBuried.TriggerBuried(_session, comm.GetBuriedParam(comm.Rtype183, 1))
|
||||
return
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ func (this *apiComp) GetGymBuff(session comm.IUserSession, req *pb.PracticeGetGy
|
||||
}
|
||||
return
|
||||
}
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype185, 1))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype185, 1))
|
||||
|
||||
if room, err = this.module.modelPandata.queryUserMartialhall(session.GetUserId()); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
|
@ -33,7 +33,7 @@ func (this *apiComp) GymInfo(session comm.IUserSession, req *pb.PracticeGymInfoR
|
||||
"gymrefresh": room.Gymrefresh,
|
||||
})
|
||||
}
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype185, 1))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype185, 1))
|
||||
session.SendMsg(string(this.module.GetType()), "gyminfo", &pb.PracticeGymInfoResp{Lastaction: room.Gymaction, Refreshnum: room.Gymrefresh})
|
||||
return
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ func (this *apiComp) Loot(session comm.IUserSession, req *pb.PracticeLootReq) (e
|
||||
} else {
|
||||
this.module.PutUserSession(_session)
|
||||
}
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype184, 1))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype184, 1))
|
||||
session.SendMsg(string(this.module.GetType()), "loot", &pb.PracticeLootResp{Friend: req.Friend, Pillar: froom.Pillarf})
|
||||
return
|
||||
}
|
||||
|
@ -7,13 +7,13 @@ import (
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
// 参数校验
|
||||
func (this *apiComp) NPCBattkleFinishCheck(session comm.IUserSession, req *pb.PracticeNPCBattkleFinishReq) (errdata *pb.ErrorData) {
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
///npc 战斗结果请求
|
||||
// /npc 战斗结果请求
|
||||
func (this *apiComp) NPCBattkleFinish(session comm.IUserSession, req *pb.PracticeNPCBattkleFinishReq) (errdata *pb.ErrorData) {
|
||||
var (
|
||||
err error
|
||||
@ -59,7 +59,7 @@ func (this *apiComp) NPCBattkleFinish(session comm.IUserSession, req *pb.Practic
|
||||
"refresh": room.Refresh,
|
||||
})
|
||||
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype182, 1))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype182, 1))
|
||||
} else {
|
||||
room.Npcstate = 1
|
||||
room.Battlenum++
|
||||
|
@ -234,7 +234,7 @@ func (this *apiComp) Practice(session comm.IUserSession, req *pb.PracticePractic
|
||||
"knapsack": room.Knapsack,
|
||||
filed: pillar,
|
||||
})
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype149, 1))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype149, 1))
|
||||
session.SendMsg(string(this.module.GetType()), "practice", &pb.PracticePracticeResp{Pillar: pillar})
|
||||
return
|
||||
}
|
||||
|
@ -277,7 +277,7 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.PracticeReceiveR
|
||||
this.module.PutUserSession(_session)
|
||||
}
|
||||
}
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype135, minutes))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype135, minutes))
|
||||
session.SendMsg(string(this.module.GetType()), "receive", &pb.PracticeReceiveResp{Pillar: pillar, Knapsack: room.Knapsack})
|
||||
return
|
||||
}
|
||||
|
@ -5,13 +5,13 @@ import (
|
||||
"go_dreamfactory/pb"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
// 参数校验
|
||||
func (this *apiComp) UnLockCheck(session comm.IUserSession, req *pb.PracticeUnLockReq) (errdata *pb.ErrorData) {
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
///练功请求 解锁木桩
|
||||
// /练功请求 解锁木桩
|
||||
func (this *apiComp) UnLock(session comm.IUserSession, req *pb.PracticeUnLockReq) (errdata *pb.ErrorData) {
|
||||
var (
|
||||
err error
|
||||
@ -72,7 +72,7 @@ func (this *apiComp) UnLock(session comm.IUserSession, req *pb.PracticeUnLockReq
|
||||
filed: pillar,
|
||||
"pillarf": room.Pillarf,
|
||||
})
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype152, 1))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype152, 1))
|
||||
session.SendMsg(string(this.module.GetType()), "unlock", &pb.PracticeUnLockResp{Info: room})
|
||||
return
|
||||
}
|
||||
|
@ -383,7 +383,8 @@ func (this *Practice) RPC_ModulePracticeUnLockPillar(ctx context.Context, args *
|
||||
this.atlas.CheckActivatePandaAtlasCollect(args.Param1, "100001")
|
||||
break
|
||||
}
|
||||
go this.ModuleBuried.TriggerBuried(args.Param1, comm.GetBuriedParam(comm.Rtype152, 1))
|
||||
_session, _ := this.GetUserSession(args.Param1)
|
||||
go this.ModuleBuried.TriggerBuried(_session, comm.GetBuriedParam(comm.Rtype152, 1))
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
"math"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
// 参数校验
|
||||
func (this *apiComp) BuyCheck(session comm.IUserSession, req *pb.ShopBuyReq) (errdata *pb.ErrorData) {
|
||||
if req.ShopType == 0 || req.GoodsId == 0 || req.BuyNum <= 0 {
|
||||
errdata = &pb.ErrorData{
|
||||
@ -19,7 +19,7 @@ func (this *apiComp) BuyCheck(session comm.IUserSession, req *pb.ShopBuyReq) (er
|
||||
return
|
||||
}
|
||||
|
||||
///获取用户商品列表
|
||||
// /获取用户商品列表
|
||||
func (this *apiComp) Buy(session comm.IUserSession, req *pb.ShopBuyReq) (errdata *pb.ErrorData) {
|
||||
var (
|
||||
err error
|
||||
@ -200,7 +200,7 @@ func (this *apiComp) Buy(session comm.IUserSession, req *pb.ShopBuyReq) (errdata
|
||||
}
|
||||
}
|
||||
if len(tasks) > 0 {
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), tasks...)
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), tasks...)
|
||||
}
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), "buy", &pb.ShopBuyResp{IsSucc: true})
|
||||
|
@ -185,7 +185,7 @@ func (this *apiComp) Getlist(session comm.IUserSession, req *pb.ShopGetListReq)
|
||||
}
|
||||
goods = transGoods(items, sdata)
|
||||
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype105, 1)
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype105, 1))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype105, 1))
|
||||
this.module.modelShop.Change(session.GetUserId(), map[string]interface{}{"refreshnumgoldShop": shopData.RefreshnumgoldShop, "refreshtimegoldShop": shopData.RefreshtimegoldShop, filed: sdata})
|
||||
} else if !req.IsManualRefresh {
|
||||
// refresh := int(this.module.privilege.GetCountByPrivilegeId(session.GetUserId(), comm.PrivilegeType2))
|
||||
@ -232,7 +232,7 @@ func (this *apiComp) Getlist(session comm.IUserSession, req *pb.ShopGetListReq)
|
||||
goods = transGoods(items, sdata)
|
||||
this.module.modelShop.Change(session.GetUserId(), map[string]interface{}{filed: sdata})
|
||||
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype105, 1)
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype105, 1))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype105, 1))
|
||||
} else { //返回以前的商品列表
|
||||
if items, err = this.module.configure.GetShopItemsConfigureByIds(sdata.Items...); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"go_dreamfactory/pb"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
// 参数校验
|
||||
func (this *apiComp) AtlasActivateCheck(session comm.IUserSession, req *pb.SmithyAtlasActivateReq) (errdata *pb.ErrorData) {
|
||||
if req.Id == "" {
|
||||
errdata = &pb.ErrorData{
|
||||
@ -98,7 +98,7 @@ func (this *apiComp) AtlasActivate(session comm.IUserSession, req *pb.SmithyAtla
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype165, 1))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype166, int32(len(atlas.Collect))))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype167, atlas.Score))
|
||||
this.module.ModuleBuried.TriggerBuried(session.GetUserId(), szTask...)
|
||||
this.module.ModuleBuried.TriggerBuried(session.Clone(), szTask...)
|
||||
session.SendMsg(string(this.module.GetType()), "atlasactivate", &pb.SmithyAtlasActivateResp{Data: atlas})
|
||||
return
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
// 参数校验
|
||||
func (this *apiComp) ForgeEquipCheck(session comm.IUserSession, req *pb.SmithyForgeEquipReq) (errdata *pb.ErrorData) {
|
||||
if req.ReelId == 0 || req.Lava < 0 || req.Quality < 0 {
|
||||
errdata = &pb.ErrorData{
|
||||
@ -292,7 +292,7 @@ func (this *apiComp) ForgeEquip(session comm.IUserSession, req *pb.SmithyForgeEq
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype177, 1))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype179, 1, nextProficiency.Value1))
|
||||
|
||||
this.module.ModuleBuried.TriggerBuried(session.GetUserId(), szTask...)
|
||||
this.module.ModuleBuried.TriggerBuried(session.Clone(), szTask...)
|
||||
}
|
||||
// 是否解锁新套装
|
||||
if nextProficiency.Type == comm.SmithyReelType4 {
|
||||
@ -345,7 +345,7 @@ func (this *apiComp) ForgeEquip(session comm.IUserSession, req *pb.SmithyForgeEq
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype189, req.Count)) // 进行N次定制打造
|
||||
}
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype148, req.Count))
|
||||
this.module.ModuleBuried.TriggerBuried(session.GetUserId(), tasks...)
|
||||
this.module.ModuleBuried.TriggerBuried(session.Clone(), tasks...)
|
||||
|
||||
return
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
// 参数校验
|
||||
func (this *apiComp) RiseCheck(session comm.IUserSession, req *pb.SmithyRiseReq) (errdata *pb.ErrorData) {
|
||||
if req.ItemId == "" || req.Count <= 0 {
|
||||
errdata = &pb.ErrorData{
|
||||
@ -87,7 +87,7 @@ func (this *apiComp) Rise(session comm.IUserSession, req *pb.SmithyRiseReq) (err
|
||||
}
|
||||
tasks := make([]*pb.BuriedParam, 0)
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype175, stove.Temperature))
|
||||
this.module.ModuleBuried.TriggerBuried(session.GetUserId(), tasks...)
|
||||
this.module.ModuleBuried.TriggerBuried(session.Clone(), tasks...)
|
||||
}
|
||||
|
||||
return
|
||||
|
@ -48,7 +48,7 @@ func (this *apiComp) Agree(session comm.IUserSession, req *pb.SociatyAgreeReq) (
|
||||
}
|
||||
|
||||
if err := this.module.modelSociaty.agree(req.Uid, sociaty); err != nil {
|
||||
var customError = new(comm.CustomError)
|
||||
var customError = new(comm.CustomError)
|
||||
if errors.As(err, &customError) {
|
||||
code := customError.Code
|
||||
errdata = &pb.ErrorData{
|
||||
@ -63,7 +63,7 @@ func (this *apiComp) Agree(session comm.IUserSession, req *pb.SociatyAgreeReq) (
|
||||
Message: err.Error(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
this.module.Error("公会审核-同意",
|
||||
log.Field{Key: "uid", Value: uid},
|
||||
log.Field{Key: "申请人", Value: req.Uid},
|
||||
@ -74,7 +74,7 @@ func (this *apiComp) Agree(session comm.IUserSession, req *pb.SociatyAgreeReq) (
|
||||
|
||||
// 触发任务条件
|
||||
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype109, 1)
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype109, 1))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype109, 1))
|
||||
// 发邮件
|
||||
if err := this.module.modelSociaty.sendMail("GuildApproved", []string{sociaty.Name}, []string{req.Uid}); err != nil {
|
||||
this.module.Error("发送邮件 模板ID:GuildApproved",
|
||||
|
@ -138,7 +138,7 @@ func (this *apiComp) Apply(session comm.IUserSession, req *pb.SociatyApplyReq) (
|
||||
// 无需审核
|
||||
if !isCheck {
|
||||
// 触发任务条件
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype109, 1))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype109, 1))
|
||||
}
|
||||
rsp := &pb.SociatyApplyResp{
|
||||
Uid: uid,
|
||||
|
@ -203,7 +203,7 @@ func (this *apiComp) Create(session comm.IUserSession, req *pb.SociatyCreateReq)
|
||||
return
|
||||
}
|
||||
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype188, 1))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype188, 1))
|
||||
// 初始化玩家公会任务
|
||||
if err := this.module.modelSociatyTask.initSociatyTask(user.Uid, sociaty.Id); err != nil {
|
||||
this.module.Error("初始化玩家公会任务",
|
||||
|
@ -117,7 +117,7 @@ func (this *apiComp) ActiveReceive(session comm.IUserSession, req *pb.TaskActive
|
||||
log.Field{Key: "rewards", Value: rewards},
|
||||
)
|
||||
}
|
||||
go this.module.ModuleBuried.TriggerBuried(uid, comm.GetBuriedParam(comm.Rtype171, 1))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype171, 1))
|
||||
}
|
||||
|
||||
resp := &pb.TaskActiveReceiveResp{
|
||||
|
@ -160,7 +160,7 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.TaskReceiveReq)
|
||||
log.Field{Key: "rewards", Value: rewards},
|
||||
)
|
||||
}
|
||||
go this.module.ModuleBuried.TriggerBuried(uid, comm.GetBuriedParam(comm.Rtype171, 1))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype171, 1))
|
||||
session.SendMsg(string(this.module.GetType()), "activereceive", &pb.TaskActiveReceivePush{
|
||||
TaskTag: int32(comm.TASK_WEEKLY),
|
||||
Id: maxTaskId,
|
||||
|
@ -22,7 +22,7 @@ func (this *apiComp) Send(session comm.IUserSession, req *pb.TaskSendReq) (errda
|
||||
// }
|
||||
// }
|
||||
|
||||
// this.module.ModuleBuried.TriggerBuried(session.GetUserId(),comm.GetBuriedParam(comm.TaskType(req.TaskType)))
|
||||
// this.module.ModuleBuried.TriggerBuried(session.Clone(),comm.GetBuriedParam(comm.TaskType(req.TaskType)))
|
||||
rsp := &pb.TaskSendResp{
|
||||
IsSucc: true,
|
||||
}
|
||||
|
@ -146,7 +146,7 @@ func (this *apiComp) Create(session comm.IUserSession, req *pb.UserCreateReq) (e
|
||||
// this.sendMsg(session, UserSubTypeCreate, resp)
|
||||
session.SendMsg(string(this.module.GetType()), UserSubTypeCreate, &pb.UserCreateResp{})
|
||||
if req.Figure != 0 {
|
||||
go this.module.ModuleBuried.TriggerBuried(uid, comm.GetBuriedParam(comm.Rtype72, 1))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype72, 1))
|
||||
}
|
||||
this.mail.SendMailByCid(session, comm.Welcomemail, nil)
|
||||
return
|
||||
|
@ -107,7 +107,7 @@ func (this *apiComp) Login(session comm.IUserSession, req *pb.UserLoginReq) (err
|
||||
|
||||
// 在logintime更新前判断是否是昨天
|
||||
if utils.IsYestoday(user.Logintime) {
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype9, 1))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype9, 1))
|
||||
} else {
|
||||
this.module.ModuleBuried.ResetBuriedByType(user.Uid, comm.Rtype9)
|
||||
}
|
||||
@ -135,7 +135,7 @@ func (this *apiComp) Login(session comm.IUserSession, req *pb.UserLoginReq) (err
|
||||
|
||||
if this.module.modelUser.isLoginFirst(lastLoginTime) {
|
||||
this.module.ModuleHero.NoLoginDay(user.Uid, int32(utils.DiffDays(lastLoginTime, configure.Now().Unix())))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype8, 1))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype8, 1))
|
||||
this.module.modelExpand.updateLoginDay(user.Uid, lastLoginTime)
|
||||
// 清理点赞
|
||||
this.module.ModuleFriend.ResetFriend(user.Uid)
|
||||
@ -162,12 +162,12 @@ func (this *apiComp) Login(session comm.IUserSession, req *pb.UserLoginReq) (err
|
||||
} else { //新号
|
||||
rsp.Ex = &pb.DBUserExpand{}
|
||||
this.module.modelSign.UserSign(session)
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype8, 1))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype8, 1))
|
||||
}
|
||||
|
||||
this.module.RecoverUserPsStart(user.Uid)
|
||||
// 日常登录任务
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype7, 1))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype7, 1))
|
||||
this.module.ModulePrivilege.CheckDailyPrivilegeMail(session)
|
||||
|
||||
rsp.Data = user
|
||||
|
@ -432,7 +432,7 @@ func (this *User) change(session comm.IUserSession, attr string, add int32) (cha
|
||||
}
|
||||
return
|
||||
}
|
||||
this.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype68, -(add)))
|
||||
this.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype68, -(add)))
|
||||
}
|
||||
change.Gold += int64(add)
|
||||
case comm.ResExp:
|
||||
|
@ -218,6 +218,6 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal
|
||||
if bHelp {
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype180, req.BossId, 1))
|
||||
}
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), szTask...)
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), szTask...)
|
||||
return
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ func (this *apiComp) Battlefinish(session comm.IUserSession, req *pb.WorldtaskBa
|
||||
return
|
||||
} else {
|
||||
//触发任务
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype70, 1, req.BattleConfId))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype70, 1, req.BattleConfId))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ func (this *apiComp) Trigger(session comm.IUserSession, req *pb.WorldtaskTrigger
|
||||
conds[2] = req.Params[3]
|
||||
conds[3] = req.Params[4]
|
||||
}
|
||||
this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.TaskType(req.RtaskType), req.Params[0], conds...))
|
||||
this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.TaskType(req.RtaskType), req.Params[0], conds...))
|
||||
|
||||
rsp.Flag = true
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ func (this *apiComp) BattleFinish(session comm.IUserSession, req *pb.WTaskBattle
|
||||
return
|
||||
} else {
|
||||
//触发任务
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype70, 1, req.BattleConfId))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype70, 1, req.BattleConfId))
|
||||
}
|
||||
} else {
|
||||
this.module.Error("世界任务战斗失败",
|
||||
|
@ -122,8 +122,12 @@ type Rpc_ModuleBuriedTriggerReq struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"`
|
||||
Burieds []*BuriedParam `protobuf:"bytes,2,rep,name=burieds,proto3" json:"burieds"`
|
||||
Ip string `protobuf:"bytes,1,opt,name=Ip,proto3" json:"Ip"`
|
||||
UserSessionId string `protobuf:"bytes,2,opt,name=UserSessionId,proto3" json:"UserSessionId"`
|
||||
UserId string `protobuf:"bytes,3,opt,name=UserId,proto3" json:"UserId"`
|
||||
ServiceTag string `protobuf:"bytes,4,opt,name=ServiceTag,proto3" json:"ServiceTag"`
|
||||
GatewayServiceId string `protobuf:"bytes,5,opt,name=GatewayServiceId,proto3" json:"GatewayServiceId"`
|
||||
Burieds []*BuriedParam `protobuf:"bytes,6,rep,name=Burieds,proto3" json:"Burieds"`
|
||||
}
|
||||
|
||||
func (x *Rpc_ModuleBuriedTriggerReq) Reset() {
|
||||
@ -158,9 +162,37 @@ func (*Rpc_ModuleBuriedTriggerReq) Descriptor() ([]byte, []int) {
|
||||
return file_buried_buried_msg_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *Rpc_ModuleBuriedTriggerReq) GetUid() string {
|
||||
func (x *Rpc_ModuleBuriedTriggerReq) GetIp() string {
|
||||
if x != nil {
|
||||
return x.Uid
|
||||
return x.Ip
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Rpc_ModuleBuriedTriggerReq) GetUserSessionId() string {
|
||||
if x != nil {
|
||||
return x.UserSessionId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Rpc_ModuleBuriedTriggerReq) GetUserId() string {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Rpc_ModuleBuriedTriggerReq) GetServiceTag() string {
|
||||
if x != nil {
|
||||
return x.ServiceTag
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Rpc_ModuleBuriedTriggerReq) GetGatewayServiceId() string {
|
||||
if x != nil {
|
||||
return x.GatewayServiceId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
@ -224,15 +256,24 @@ var file_buried_buried_msg_proto_rawDesc = []byte{
|
||||
0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2d, 0x0a, 0x0a, 0x63, 0x6f,
|
||||
0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d,
|
||||
0x2e, 0x43, 0x6f, 0x6e, 0x49, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x0a, 0x63,
|
||||
0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x56, 0x0a, 0x1a, 0x52, 0x70, 0x63,
|
||||
0x5f, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x42, 0x75, 0x72, 0x69, 0x65, 0x64, 0x54, 0x72, 0x69,
|
||||
0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x26, 0x0a, 0x07, 0x62, 0x75, 0x72,
|
||||
0x69, 0x65, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x42, 0x75, 0x72,
|
||||
0x69, 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x52, 0x07, 0x62, 0x75, 0x72, 0x69, 0x65, 0x64,
|
||||
0x73, 0x22, 0x1d, 0x0a, 0x1b, 0x52, 0x70, 0x63, 0x5f, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x42,
|
||||
0x75, 0x72, 0x69, 0x65, 0x64, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70,
|
||||
0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xde, 0x01, 0x0a, 0x1a, 0x52, 0x70,
|
||||
0x63, 0x5f, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x42, 0x75, 0x72, 0x69, 0x65, 0x64, 0x54, 0x72,
|
||||
0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x70, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x49, 0x70, 0x12, 0x24, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72,
|
||||
0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x0d, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x16,
|
||||
0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
|
||||
0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
|
||||
0x65, 0x54, 0x61, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x53, 0x65, 0x72, 0x76,
|
||||
0x69, 0x63, 0x65, 0x54, 0x61, 0x67, 0x12, 0x2a, 0x0a, 0x10, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61,
|
||||
0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x10, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||
0x49, 0x64, 0x12, 0x26, 0x0a, 0x07, 0x42, 0x75, 0x72, 0x69, 0x65, 0x64, 0x73, 0x18, 0x06, 0x20,
|
||||
0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x42, 0x75, 0x72, 0x69, 0x65, 0x64, 0x50, 0x61, 0x72, 0x61,
|
||||
0x6d, 0x52, 0x07, 0x42, 0x75, 0x72, 0x69, 0x65, 0x64, 0x73, 0x22, 0x1d, 0x0a, 0x1b, 0x52, 0x70,
|
||||
0x63, 0x5f, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x42, 0x75, 0x72, 0x69, 0x65, 0x64, 0x54, 0x72,
|
||||
0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70,
|
||||
0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@ -258,7 +299,7 @@ var file_buried_buried_msg_proto_goTypes = []interface{}{
|
||||
}
|
||||
var file_buried_buried_msg_proto_depIdxs = []int32{
|
||||
4, // 0: BuriedInquireProgressResp.conditions:type_name -> ConIProgress
|
||||
5, // 1: Rpc_ModuleBuriedTriggerReq.burieds:type_name -> BuriedParam
|
||||
5, // 1: Rpc_ModuleBuriedTriggerReq.Burieds:type_name -> BuriedParam
|
||||
2, // [2:2] is the sub-list for method output_type
|
||||
2, // [2:2] is the sub-list for method input_type
|
||||
2, // [2:2] is the sub-list for extension type_name
|
||||
|
@ -227,118 +227,6 @@ func (x *WTaskAcceptResp) GetAccepts() []*DBWTaskItem {
|
||||
return nil
|
||||
}
|
||||
|
||||
//任务战斗 请求
|
||||
type WTaskBattleStartReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
BattleConfId int32 `protobuf:"varint,1,opt,name=battleConfId,proto3" json:"battleConfId"` //战斗配表ID
|
||||
Battle *BattleFormation `protobuf:"bytes,2,opt,name=battle,proto3" json:"battle"` //战斗类型
|
||||
}
|
||||
|
||||
func (x *WTaskBattleStartReq) Reset() {
|
||||
*x = WTaskBattleStartReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *WTaskBattleStartReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*WTaskBattleStartReq) ProtoMessage() {}
|
||||
|
||||
func (x *WTaskBattleStartReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use WTaskBattleStartReq.ProtoReflect.Descriptor instead.
|
||||
func (*WTaskBattleStartReq) Descriptor() ([]byte, []int) {
|
||||
return file_wtask_wtask_msg_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *WTaskBattleStartReq) GetBattleConfId() int32 {
|
||||
if x != nil {
|
||||
return x.BattleConfId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *WTaskBattleStartReq) GetBattle() *BattleFormation {
|
||||
if x != nil {
|
||||
return x.Battle
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
//任务战斗 回应
|
||||
type WTaskBattleStartResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
BattleConfId int32 `protobuf:"varint,1,opt,name=battleConfId,proto3" json:"battleConfId"` //战斗配表ID
|
||||
Info *BattleInfo `protobuf:"bytes,2,opt,name=info,proto3" json:"info"` //战斗信息
|
||||
}
|
||||
|
||||
func (x *WTaskBattleStartResp) Reset() {
|
||||
*x = WTaskBattleStartResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *WTaskBattleStartResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*WTaskBattleStartResp) ProtoMessage() {}
|
||||
|
||||
func (x *WTaskBattleStartResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use WTaskBattleStartResp.ProtoReflect.Descriptor instead.
|
||||
func (*WTaskBattleStartResp) Descriptor() ([]byte, []int) {
|
||||
return file_wtask_wtask_msg_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *WTaskBattleStartResp) GetBattleConfId() int32 {
|
||||
if x != nil {
|
||||
return x.BattleConfId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *WTaskBattleStartResp) GetInfo() *BattleInfo {
|
||||
if x != nil {
|
||||
return x.Info
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
//完成子任务条件
|
||||
type WTaskCompleteCondiReq struct {
|
||||
state protoimpl.MessageState
|
||||
@ -352,7 +240,7 @@ type WTaskCompleteCondiReq struct {
|
||||
func (x *WTaskCompleteCondiReq) Reset() {
|
||||
*x = WTaskCompleteCondiReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[6]
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -365,7 +253,7 @@ func (x *WTaskCompleteCondiReq) String() string {
|
||||
func (*WTaskCompleteCondiReq) ProtoMessage() {}
|
||||
|
||||
func (x *WTaskCompleteCondiReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[6]
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -378,7 +266,7 @@ func (x *WTaskCompleteCondiReq) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use WTaskCompleteCondiReq.ProtoReflect.Descriptor instead.
|
||||
func (*WTaskCompleteCondiReq) Descriptor() ([]byte, []int) {
|
||||
return file_wtask_wtask_msg_proto_rawDescGZIP(), []int{6}
|
||||
return file_wtask_wtask_msg_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *WTaskCompleteCondiReq) GetTaskId() int32 {
|
||||
@ -409,7 +297,7 @@ type WTaskCompleteCondiResp struct {
|
||||
func (x *WTaskCompleteCondiResp) Reset() {
|
||||
*x = WTaskCompleteCondiResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[7]
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -422,7 +310,7 @@ func (x *WTaskCompleteCondiResp) String() string {
|
||||
func (*WTaskCompleteCondiResp) ProtoMessage() {}
|
||||
|
||||
func (x *WTaskCompleteCondiResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[7]
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -435,7 +323,7 @@ func (x *WTaskCompleteCondiResp) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use WTaskCompleteCondiResp.ProtoReflect.Descriptor instead.
|
||||
func (*WTaskCompleteCondiResp) Descriptor() ([]byte, []int) {
|
||||
return file_wtask_wtask_msg_proto_rawDescGZIP(), []int{7}
|
||||
return file_wtask_wtask_msg_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *WTaskCompleteCondiResp) GetTaskId() int32 {
|
||||
@ -459,110 +347,6 @@ func (x *WTaskCompleteCondiResp) GetProgress() *DBWTaskItem {
|
||||
return nil
|
||||
}
|
||||
|
||||
//任务战斗 完成请求
|
||||
type WTaskBattleFinishReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
BattleConfId int32 `protobuf:"varint,1,opt,name=battleConfId,proto3" json:"battleConfId"` //战斗配表ID
|
||||
Report *BattleReport `protobuf:"bytes,2,opt,name=report,proto3" json:"report"` //战报
|
||||
}
|
||||
|
||||
func (x *WTaskBattleFinishReq) Reset() {
|
||||
*x = WTaskBattleFinishReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *WTaskBattleFinishReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*WTaskBattleFinishReq) ProtoMessage() {}
|
||||
|
||||
func (x *WTaskBattleFinishReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[8]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use WTaskBattleFinishReq.ProtoReflect.Descriptor instead.
|
||||
func (*WTaskBattleFinishReq) Descriptor() ([]byte, []int) {
|
||||
return file_wtask_wtask_msg_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
func (x *WTaskBattleFinishReq) GetBattleConfId() int32 {
|
||||
if x != nil {
|
||||
return x.BattleConfId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *WTaskBattleFinishReq) GetReport() *BattleReport {
|
||||
if x != nil {
|
||||
return x.Report
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
//任务战斗 回应
|
||||
type WTaskBattleFinishResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
BattleConfId int32 `protobuf:"varint,1,opt,name=battleConfId,proto3" json:"battleConfId"` //战斗配表ID
|
||||
}
|
||||
|
||||
func (x *WTaskBattleFinishResp) Reset() {
|
||||
*x = WTaskBattleFinishResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *WTaskBattleFinishResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*WTaskBattleFinishResp) ProtoMessage() {}
|
||||
|
||||
func (x *WTaskBattleFinishResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[9]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use WTaskBattleFinishResp.ProtoReflect.Descriptor instead.
|
||||
func (*WTaskBattleFinishResp) Descriptor() ([]byte, []int) {
|
||||
return file_wtask_wtask_msg_proto_rawDescGZIP(), []int{9}
|
||||
}
|
||||
|
||||
func (x *WTaskBattleFinishResp) GetBattleConfId() int32 {
|
||||
if x != nil {
|
||||
return x.BattleConfId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// 完成任务 请求
|
||||
type WTaskFinishReq struct {
|
||||
state protoimpl.MessageState
|
||||
@ -575,7 +359,7 @@ type WTaskFinishReq struct {
|
||||
func (x *WTaskFinishReq) Reset() {
|
||||
*x = WTaskFinishReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[10]
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -588,7 +372,7 @@ func (x *WTaskFinishReq) String() string {
|
||||
func (*WTaskFinishReq) ProtoMessage() {}
|
||||
|
||||
func (x *WTaskFinishReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[10]
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[6]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -601,7 +385,7 @@ func (x *WTaskFinishReq) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use WTaskFinishReq.ProtoReflect.Descriptor instead.
|
||||
func (*WTaskFinishReq) Descriptor() ([]byte, []int) {
|
||||
return file_wtask_wtask_msg_proto_rawDescGZIP(), []int{10}
|
||||
return file_wtask_wtask_msg_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *WTaskFinishReq) GetTid() int32 {
|
||||
@ -624,7 +408,7 @@ type WTaskFinishResp struct {
|
||||
func (x *WTaskFinishResp) Reset() {
|
||||
*x = WTaskFinishResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[11]
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -637,7 +421,7 @@ func (x *WTaskFinishResp) String() string {
|
||||
func (*WTaskFinishResp) ProtoMessage() {}
|
||||
|
||||
func (x *WTaskFinishResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[11]
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[7]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -650,7 +434,7 @@ func (x *WTaskFinishResp) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use WTaskFinishResp.ProtoReflect.Descriptor instead.
|
||||
func (*WTaskFinishResp) Descriptor() ([]byte, []int) {
|
||||
return file_wtask_wtask_msg_proto_rawDescGZIP(), []int{11}
|
||||
return file_wtask_wtask_msg_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *WTaskFinishResp) GetTid() int32 {
|
||||
@ -667,7 +451,7 @@ func (x *WTaskFinishResp) GetAward() []*UserAssets {
|
||||
return nil
|
||||
}
|
||||
|
||||
// 完成任务 请求
|
||||
// 章节奖励 请求
|
||||
type WTaskChapterRewardReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@ -679,7 +463,7 @@ type WTaskChapterRewardReq struct {
|
||||
func (x *WTaskChapterRewardReq) Reset() {
|
||||
*x = WTaskChapterRewardReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[12]
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -692,7 +476,7 @@ func (x *WTaskChapterRewardReq) String() string {
|
||||
func (*WTaskChapterRewardReq) ProtoMessage() {}
|
||||
|
||||
func (x *WTaskChapterRewardReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[12]
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[8]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -705,7 +489,7 @@ func (x *WTaskChapterRewardReq) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use WTaskChapterRewardReq.ProtoReflect.Descriptor instead.
|
||||
func (*WTaskChapterRewardReq) Descriptor() ([]byte, []int) {
|
||||
return file_wtask_wtask_msg_proto_rawDescGZIP(), []int{12}
|
||||
return file_wtask_wtask_msg_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
func (x *WTaskChapterRewardReq) GetGroup() int32 {
|
||||
@ -715,7 +499,7 @@ func (x *WTaskChapterRewardReq) GetGroup() int32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
// 完成任务 回应
|
||||
// 章节奖励 回应
|
||||
type WTaskChapterRewardResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@ -728,7 +512,7 @@ type WTaskChapterRewardResp struct {
|
||||
func (x *WTaskChapterRewardResp) Reset() {
|
||||
*x = WTaskChapterRewardResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[13]
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -741,7 +525,7 @@ func (x *WTaskChapterRewardResp) String() string {
|
||||
func (*WTaskChapterRewardResp) ProtoMessage() {}
|
||||
|
||||
func (x *WTaskChapterRewardResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[13]
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[9]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -754,7 +538,7 @@ func (x *WTaskChapterRewardResp) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use WTaskChapterRewardResp.ProtoReflect.Descriptor instead.
|
||||
func (*WTaskChapterRewardResp) Descriptor() ([]byte, []int) {
|
||||
return file_wtask_wtask_msg_proto_rawDescGZIP(), []int{13}
|
||||
return file_wtask_wtask_msg_proto_rawDescGZIP(), []int{9}
|
||||
}
|
||||
|
||||
func (x *WTaskChapterRewardResp) GetGroup() int32 {
|
||||
@ -783,7 +567,7 @@ type WTaskActivationsChangePush struct {
|
||||
func (x *WTaskActivationsChangePush) Reset() {
|
||||
*x = WTaskActivationsChangePush{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[14]
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[10]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -796,7 +580,7 @@ func (x *WTaskActivationsChangePush) String() string {
|
||||
func (*WTaskActivationsChangePush) ProtoMessage() {}
|
||||
|
||||
func (x *WTaskActivationsChangePush) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[14]
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[10]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -809,7 +593,7 @@ func (x *WTaskActivationsChangePush) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use WTaskActivationsChangePush.ProtoReflect.Descriptor instead.
|
||||
func (*WTaskActivationsChangePush) Descriptor() ([]byte, []int) {
|
||||
return file_wtask_wtask_msg_proto_rawDescGZIP(), []int{14}
|
||||
return file_wtask_wtask_msg_proto_rawDescGZIP(), []int{10}
|
||||
}
|
||||
|
||||
func (x *WTaskActivationsChangePush) GetActivations() []int32 {
|
||||
@ -831,7 +615,7 @@ type WTaskAcceptChangePush struct {
|
||||
func (x *WTaskAcceptChangePush) Reset() {
|
||||
*x = WTaskAcceptChangePush{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[15]
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[11]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -844,7 +628,7 @@ func (x *WTaskAcceptChangePush) String() string {
|
||||
func (*WTaskAcceptChangePush) ProtoMessage() {}
|
||||
|
||||
func (x *WTaskAcceptChangePush) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[15]
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[11]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -857,7 +641,7 @@ func (x *WTaskAcceptChangePush) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use WTaskAcceptChangePush.ProtoReflect.Descriptor instead.
|
||||
func (*WTaskAcceptChangePush) Descriptor() ([]byte, []int) {
|
||||
return file_wtask_wtask_msg_proto_rawDescGZIP(), []int{15}
|
||||
return file_wtask_wtask_msg_proto_rawDescGZIP(), []int{11}
|
||||
}
|
||||
|
||||
func (x *WTaskAcceptChangePush) GetAccepts() []*DBWTaskItem {
|
||||
@ -867,6 +651,222 @@ func (x *WTaskAcceptChangePush) GetAccepts() []*DBWTaskItem {
|
||||
return nil
|
||||
}
|
||||
|
||||
//战斗 请求
|
||||
type WTaskBattleStartReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
BattleConfId int32 `protobuf:"varint,1,opt,name=battleConfId,proto3" json:"battleConfId"` //战斗配表ID
|
||||
Battle *BattleFormation `protobuf:"bytes,2,opt,name=battle,proto3" json:"battle"` //战斗类型
|
||||
}
|
||||
|
||||
func (x *WTaskBattleStartReq) Reset() {
|
||||
*x = WTaskBattleStartReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[12]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *WTaskBattleStartReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*WTaskBattleStartReq) ProtoMessage() {}
|
||||
|
||||
func (x *WTaskBattleStartReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[12]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use WTaskBattleStartReq.ProtoReflect.Descriptor instead.
|
||||
func (*WTaskBattleStartReq) Descriptor() ([]byte, []int) {
|
||||
return file_wtask_wtask_msg_proto_rawDescGZIP(), []int{12}
|
||||
}
|
||||
|
||||
func (x *WTaskBattleStartReq) GetBattleConfId() int32 {
|
||||
if x != nil {
|
||||
return x.BattleConfId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *WTaskBattleStartReq) GetBattle() *BattleFormation {
|
||||
if x != nil {
|
||||
return x.Battle
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
//战斗 回应
|
||||
type WTaskBattleStartResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
BattleConfId int32 `protobuf:"varint,1,opt,name=battleConfId,proto3" json:"battleConfId"` //战斗配表ID
|
||||
Info *BattleInfo `protobuf:"bytes,2,opt,name=info,proto3" json:"info"` //战斗信息
|
||||
}
|
||||
|
||||
func (x *WTaskBattleStartResp) Reset() {
|
||||
*x = WTaskBattleStartResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[13]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *WTaskBattleStartResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*WTaskBattleStartResp) ProtoMessage() {}
|
||||
|
||||
func (x *WTaskBattleStartResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[13]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use WTaskBattleStartResp.ProtoReflect.Descriptor instead.
|
||||
func (*WTaskBattleStartResp) Descriptor() ([]byte, []int) {
|
||||
return file_wtask_wtask_msg_proto_rawDescGZIP(), []int{13}
|
||||
}
|
||||
|
||||
func (x *WTaskBattleStartResp) GetBattleConfId() int32 {
|
||||
if x != nil {
|
||||
return x.BattleConfId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *WTaskBattleStartResp) GetInfo() *BattleInfo {
|
||||
if x != nil {
|
||||
return x.Info
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
//战斗完成 请求
|
||||
type WTaskBattleFinishReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
BattleConfId int32 `protobuf:"varint,1,opt,name=battleConfId,proto3" json:"battleConfId"` //战斗配表ID
|
||||
Report *BattleReport `protobuf:"bytes,2,opt,name=report,proto3" json:"report"` //战报
|
||||
}
|
||||
|
||||
func (x *WTaskBattleFinishReq) Reset() {
|
||||
*x = WTaskBattleFinishReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[14]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *WTaskBattleFinishReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*WTaskBattleFinishReq) ProtoMessage() {}
|
||||
|
||||
func (x *WTaskBattleFinishReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[14]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use WTaskBattleFinishReq.ProtoReflect.Descriptor instead.
|
||||
func (*WTaskBattleFinishReq) Descriptor() ([]byte, []int) {
|
||||
return file_wtask_wtask_msg_proto_rawDescGZIP(), []int{14}
|
||||
}
|
||||
|
||||
func (x *WTaskBattleFinishReq) GetBattleConfId() int32 {
|
||||
if x != nil {
|
||||
return x.BattleConfId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *WTaskBattleFinishReq) GetReport() *BattleReport {
|
||||
if x != nil {
|
||||
return x.Report
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
//战斗完成 回应
|
||||
type WTaskBattleFinishResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
BattleConfId int32 `protobuf:"varint,1,opt,name=battleConfId,proto3" json:"battleConfId"` //战斗配表ID
|
||||
}
|
||||
|
||||
func (x *WTaskBattleFinishResp) Reset() {
|
||||
*x = WTaskBattleFinishResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[15]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *WTaskBattleFinishResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*WTaskBattleFinishResp) ProtoMessage() {}
|
||||
|
||||
func (x *WTaskBattleFinishResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_wtask_wtask_msg_proto_msgTypes[15]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use WTaskBattleFinishResp.ProtoReflect.Descriptor instead.
|
||||
func (*WTaskBattleFinishResp) Descriptor() ([]byte, []int) {
|
||||
return file_wtask_wtask_msg_proto_rawDescGZIP(), []int{15}
|
||||
}
|
||||
|
||||
func (x *WTaskBattleFinishResp) GetBattleConfId() int32 {
|
||||
if x != nil {
|
||||
return x.BattleConfId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_wtask_wtask_msg_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_wtask_wtask_msg_proto_rawDesc = []byte{
|
||||
@ -890,6 +890,41 @@ var file_wtask_wtask_msg_proto_rawDesc = []byte{
|
||||
0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x73, 0x18,
|
||||
0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x44, 0x42, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x49,
|
||||
0x74, 0x65, 0x6d, 0x52, 0x07, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x73, 0x22, 0x49, 0x0a, 0x15,
|
||||
0x57, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e,
|
||||
0x64, 0x69, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x18, 0x0a,
|
||||
0x07, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07,
|
||||
0x63, 0x6f, 0x6e, 0x64, 0x69, 0x49, 0x64, 0x22, 0x74, 0x0a, 0x16, 0x57, 0x54, 0x61, 0x73, 0x6b,
|
||||
0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x52, 0x65, 0x73,
|
||||
0x70, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e,
|
||||
0x64, 0x69, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x64,
|
||||
0x69, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x44, 0x42, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x49,
|
||||
0x74, 0x65, 0x6d, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x22, 0x22, 0x0a,
|
||||
0x0e, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 0x12,
|
||||
0x10, 0x0a, 0x03, 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x74, 0x69,
|
||||
0x64, 0x22, 0x46, 0x0a, 0x0f, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68,
|
||||
0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x03, 0x74, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18,
|
||||
0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65,
|
||||
0x74, 0x73, 0x52, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x22, 0x2d, 0x0a, 0x15, 0x57, 0x54, 0x61,
|
||||
0x73, 0x6b, 0x43, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52,
|
||||
0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x51, 0x0a, 0x16, 0x57, 0x54, 0x61, 0x73,
|
||||
0x6b, 0x43, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65,
|
||||
0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x21, 0x0a, 0x05, 0x61, 0x77, 0x61, 0x72,
|
||||
0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73,
|
||||
0x73, 0x65, 0x74, 0x73, 0x52, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x22, 0x3e, 0x0a, 0x1a, 0x57,
|
||||
0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43,
|
||||
0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x74,
|
||||
0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0b,
|
||||
0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3f, 0x0a, 0x15, 0x57,
|
||||
0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65,
|
||||
0x50, 0x75, 0x73, 0x68, 0x12, 0x26, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x73, 0x18,
|
||||
0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x44, 0x42, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x49,
|
||||
0x74, 0x65, 0x6d, 0x52, 0x07, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x73, 0x22, 0x63, 0x0a, 0x13,
|
||||
0x57, 0x54, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74,
|
||||
0x52, 0x65, 0x71, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e,
|
||||
@ -902,52 +937,17 @@ var file_wtask_wtask_msg_proto_rawDesc = []byte{
|
||||
0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x12, 0x1f, 0x0a,
|
||||
0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61,
|
||||
0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x49,
|
||||
0x0a, 0x15, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x43,
|
||||
0x6f, 0x6e, 0x64, 0x69, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49,
|
||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12,
|
||||
0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x07, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x49, 0x64, 0x22, 0x74, 0x0a, 0x16, 0x57, 0x54, 0x61,
|
||||
0x73, 0x6b, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x52,
|
||||
0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63,
|
||||
0x6f, 0x6e, 0x64, 0x69, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x63, 0x6f,
|
||||
0x6e, 0x64, 0x69, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73,
|
||||
0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x44, 0x42, 0x57, 0x54, 0x61, 0x73,
|
||||
0x6b, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x22,
|
||||
0x61, 0x0a, 0x14, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x69,
|
||||
0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c,
|
||||
0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x62,
|
||||
0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x72,
|
||||
0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61,
|
||||
0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f,
|
||||
0x72, 0x74, 0x22, 0x3b, 0x0a, 0x15, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c,
|
||||
0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x22, 0x0a, 0x0c, 0x62,
|
||||
0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x22,
|
||||
0x22, 0x0a, 0x0e, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65,
|
||||
0x71, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03,
|
||||
0x74, 0x69, 0x64, 0x22, 0x46, 0x0a, 0x0f, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69,
|
||||
0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x69, 0x64, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x03, 0x74, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x05, 0x61, 0x77, 0x61, 0x72,
|
||||
0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73,
|
||||
0x73, 0x65, 0x74, 0x73, 0x52, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x22, 0x2d, 0x0a, 0x15, 0x57,
|
||||
0x54, 0x61, 0x73, 0x6b, 0x43, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x52, 0x65, 0x77, 0x61, 0x72,
|
||||
0x64, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x51, 0x0a, 0x16, 0x57, 0x54,
|
||||
0x61, 0x73, 0x6b, 0x43, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64,
|
||||
0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x21, 0x0a, 0x05, 0x61, 0x77,
|
||||
0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72,
|
||||
0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x22, 0x3e, 0x0a,
|
||||
0x1a, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, 0x20, 0x0a, 0x0b, 0x61,
|
||||
0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05,
|
||||
0x52, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3f, 0x0a,
|
||||
0x15, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x43, 0x68, 0x61, 0x6e,
|
||||
0x67, 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, 0x26, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74,
|
||||
0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x44, 0x42, 0x57, 0x54, 0x61, 0x73,
|
||||
0x6b, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x07, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x73, 0x42, 0x06,
|
||||
0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x61,
|
||||
0x0a, 0x14, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x69, 0x6e,
|
||||
0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65,
|
||||
0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x62, 0x61,
|
||||
0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x72, 0x65,
|
||||
0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, 0x74,
|
||||
0x74, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72,
|
||||
0x74, 0x22, 0x3b, 0x0a, 0x15, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65,
|
||||
0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x61,
|
||||
0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x42, 0x06,
|
||||
0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
@ -969,36 +969,36 @@ var file_wtask_wtask_msg_proto_goTypes = []interface{}{
|
||||
(*WTaskInfoResp)(nil), // 1: WTaskInfoResp
|
||||
(*WTaskAcceptReq)(nil), // 2: WTaskAcceptReq
|
||||
(*WTaskAcceptResp)(nil), // 3: WTaskAcceptResp
|
||||
(*WTaskBattleStartReq)(nil), // 4: WTaskBattleStartReq
|
||||
(*WTaskBattleStartResp)(nil), // 5: WTaskBattleStartResp
|
||||
(*WTaskCompleteCondiReq)(nil), // 6: WTaskCompleteCondiReq
|
||||
(*WTaskCompleteCondiResp)(nil), // 7: WTaskCompleteCondiResp
|
||||
(*WTaskBattleFinishReq)(nil), // 8: WTaskBattleFinishReq
|
||||
(*WTaskBattleFinishResp)(nil), // 9: WTaskBattleFinishResp
|
||||
(*WTaskFinishReq)(nil), // 10: WTaskFinishReq
|
||||
(*WTaskFinishResp)(nil), // 11: WTaskFinishResp
|
||||
(*WTaskChapterRewardReq)(nil), // 12: WTaskChapterRewardReq
|
||||
(*WTaskChapterRewardResp)(nil), // 13: WTaskChapterRewardResp
|
||||
(*WTaskActivationsChangePush)(nil), // 14: WTaskActivationsChangePush
|
||||
(*WTaskAcceptChangePush)(nil), // 15: WTaskAcceptChangePush
|
||||
(*WTaskCompleteCondiReq)(nil), // 4: WTaskCompleteCondiReq
|
||||
(*WTaskCompleteCondiResp)(nil), // 5: WTaskCompleteCondiResp
|
||||
(*WTaskFinishReq)(nil), // 6: WTaskFinishReq
|
||||
(*WTaskFinishResp)(nil), // 7: WTaskFinishResp
|
||||
(*WTaskChapterRewardReq)(nil), // 8: WTaskChapterRewardReq
|
||||
(*WTaskChapterRewardResp)(nil), // 9: WTaskChapterRewardResp
|
||||
(*WTaskActivationsChangePush)(nil), // 10: WTaskActivationsChangePush
|
||||
(*WTaskAcceptChangePush)(nil), // 11: WTaskAcceptChangePush
|
||||
(*WTaskBattleStartReq)(nil), // 12: WTaskBattleStartReq
|
||||
(*WTaskBattleStartResp)(nil), // 13: WTaskBattleStartResp
|
||||
(*WTaskBattleFinishReq)(nil), // 14: WTaskBattleFinishReq
|
||||
(*WTaskBattleFinishResp)(nil), // 15: WTaskBattleFinishResp
|
||||
(*DBWTask)(nil), // 16: DBWTask
|
||||
(*DBWTaskItem)(nil), // 17: DBWTaskItem
|
||||
(*BattleFormation)(nil), // 18: BattleFormation
|
||||
(*BattleInfo)(nil), // 19: BattleInfo
|
||||
(*BattleReport)(nil), // 20: BattleReport
|
||||
(*UserAssets)(nil), // 21: UserAssets
|
||||
(*UserAssets)(nil), // 18: UserAssets
|
||||
(*BattleFormation)(nil), // 19: BattleFormation
|
||||
(*BattleInfo)(nil), // 20: BattleInfo
|
||||
(*BattleReport)(nil), // 21: BattleReport
|
||||
}
|
||||
var file_wtask_wtask_msg_proto_depIdxs = []int32{
|
||||
16, // 0: WTaskInfoResp.info:type_name -> DBWTask
|
||||
17, // 1: WTaskInfoResp.accepts:type_name -> DBWTaskItem
|
||||
17, // 2: WTaskAcceptResp.accepts:type_name -> DBWTaskItem
|
||||
18, // 3: WTaskBattleStartReq.battle:type_name -> BattleFormation
|
||||
19, // 4: WTaskBattleStartResp.info:type_name -> BattleInfo
|
||||
17, // 5: WTaskCompleteCondiResp.progress:type_name -> DBWTaskItem
|
||||
20, // 6: WTaskBattleFinishReq.report:type_name -> BattleReport
|
||||
21, // 7: WTaskFinishResp.award:type_name -> UserAssets
|
||||
21, // 8: WTaskChapterRewardResp.award:type_name -> UserAssets
|
||||
17, // 9: WTaskAcceptChangePush.accepts:type_name -> DBWTaskItem
|
||||
17, // 3: WTaskCompleteCondiResp.progress:type_name -> DBWTaskItem
|
||||
18, // 4: WTaskFinishResp.award:type_name -> UserAssets
|
||||
18, // 5: WTaskChapterRewardResp.award:type_name -> UserAssets
|
||||
17, // 6: WTaskAcceptChangePush.accepts:type_name -> DBWTaskItem
|
||||
19, // 7: WTaskBattleStartReq.battle:type_name -> BattleFormation
|
||||
20, // 8: WTaskBattleStartResp.info:type_name -> BattleInfo
|
||||
21, // 9: WTaskBattleFinishReq.report:type_name -> BattleReport
|
||||
10, // [10:10] is the sub-list for method output_type
|
||||
10, // [10:10] is the sub-list for method input_type
|
||||
10, // [10:10] is the sub-list for extension type_name
|
||||
@ -1064,30 +1064,6 @@ func file_wtask_wtask_msg_proto_init() {
|
||||
}
|
||||
}
|
||||
file_wtask_wtask_msg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*WTaskBattleStartReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_wtask_wtask_msg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*WTaskBattleStartResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_wtask_wtask_msg_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*WTaskCompleteCondiReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -1099,7 +1075,7 @@ func file_wtask_wtask_msg_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_wtask_wtask_msg_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_wtask_wtask_msg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*WTaskCompleteCondiResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -1111,31 +1087,7 @@ func file_wtask_wtask_msg_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_wtask_wtask_msg_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*WTaskBattleFinishReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_wtask_wtask_msg_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*WTaskBattleFinishResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_wtask_wtask_msg_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_wtask_wtask_msg_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*WTaskFinishReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -1147,7 +1099,7 @@ func file_wtask_wtask_msg_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_wtask_wtask_msg_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_wtask_wtask_msg_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*WTaskFinishResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -1159,7 +1111,7 @@ func file_wtask_wtask_msg_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_wtask_wtask_msg_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_wtask_wtask_msg_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*WTaskChapterRewardReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -1171,7 +1123,7 @@ func file_wtask_wtask_msg_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_wtask_wtask_msg_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_wtask_wtask_msg_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*WTaskChapterRewardResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -1183,7 +1135,7 @@ func file_wtask_wtask_msg_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_wtask_wtask_msg_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_wtask_wtask_msg_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*WTaskActivationsChangePush); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -1195,7 +1147,7 @@ func file_wtask_wtask_msg_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_wtask_wtask_msg_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_wtask_wtask_msg_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*WTaskAcceptChangePush); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -1207,6 +1159,54 @@ func file_wtask_wtask_msg_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_wtask_wtask_msg_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*WTaskBattleStartReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_wtask_wtask_msg_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*WTaskBattleStartResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_wtask_wtask_msg_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*WTaskBattleFinishReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_wtask_wtask_msg_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*WTaskBattleFinishResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
|
@ -11,7 +11,6 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"go_dreamfactory/lego/base"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/lego/core/cbase"
|
||||
"go_dreamfactory/lego/sys/event"
|
||||
@ -52,10 +51,9 @@ func NewGateRouteComp() comm.ISC_GateRouteComp {
|
||||
type SCompGateRoute struct {
|
||||
cbase.ServiceCompBase
|
||||
options *CompOptions
|
||||
service base.IRPCXService //rpc服务对象 通过这个对象可以发布服务和调用其他服务的接口
|
||||
service comm.IService //rpc服务对象 通过这个对象可以发布服务和调用其他服务的接口
|
||||
mrlock sync.RWMutex //msghandles 对象的锁
|
||||
msghandles map[string]*msghandle //处理函数的管理对象
|
||||
pools sync.Pool
|
||||
}
|
||||
|
||||
// 设置服务组件名称 方便业务模块中获取此组件对象
|
||||
@ -71,14 +69,9 @@ func (this *SCompGateRoute) NewOptions() (options core.ICompOptions) {
|
||||
func (this *SCompGateRoute) Init(service core.IService, comp core.IServiceComp, options core.ICompOptions) (err error) {
|
||||
err = this.ServiceCompBase.Init(service, comp, options)
|
||||
this.options = options.(*CompOptions)
|
||||
this.service = service.(base.IRPCXService)
|
||||
this.service = service.(comm.IService)
|
||||
this.msghandles = make(map[string]*msghandle)
|
||||
this.pools = sync.Pool{
|
||||
New: func() interface{} {
|
||||
s := comm.NewUserSessionByPools(this.service)
|
||||
return s
|
||||
},
|
||||
}
|
||||
|
||||
return err
|
||||
} //
|
||||
|
||||
@ -135,12 +128,12 @@ func (this *SCompGateRoute) ReceiveMsg(ctx context.Context, args *pb.AgentMessag
|
||||
msghandle, ok := this.msghandles[method]
|
||||
this.mrlock.RUnlock()
|
||||
if ok {
|
||||
session := this.pools.Get().(comm.IUserSession)
|
||||
session := this.service.GetUserSession()
|
||||
session.SetSession(args.Ip, args.UserSessionId, args.ServiceTag, args.GatewayServiceId, args.UserId)
|
||||
|
||||
defer func() { //回收
|
||||
session.Reset()
|
||||
this.pools.Put(session)
|
||||
this.service.PutUserSession(session)
|
||||
}()
|
||||
|
||||
//序列化用户消息对象
|
||||
@ -246,13 +239,13 @@ func (this *SCompGateRoute) DBSyncCross(ctx context.Context, args *pb.EmptyReq,
|
||||
|
||||
// 获取用户的会话对象
|
||||
func (this *SCompGateRoute) GetUserSession(udata *pb.CacheUser) (session comm.IUserSession) {
|
||||
session = this.pools.Get().(comm.IUserSession)
|
||||
session = this.service.GetUserSession()
|
||||
session.SetSession(udata.Ip, udata.SessionId, udata.ServiceTag, udata.GatewayServiceId, udata.Uid)
|
||||
return
|
||||
}
|
||||
|
||||
// 获取用户的会话对象
|
||||
func (this *SCompGateRoute) PutUserSession(session comm.IUserSession) {
|
||||
this.pools.Put(session)
|
||||
this.service.PutUserSession(session)
|
||||
return
|
||||
}
|
||||
|
@ -2,18 +2,22 @@ package services
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/sys/configure"
|
||||
"sync"
|
||||
|
||||
"go_dreamfactory/lego/base/rpcx"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/lego/sys/log"
|
||||
)
|
||||
|
||||
//梦工厂基础服务对象
|
||||
// 梦工厂基础服务对象
|
||||
type ServiceBase struct {
|
||||
rpcx.RPCXService
|
||||
pools sync.Pool
|
||||
}
|
||||
|
||||
//初始化相关系统
|
||||
// 初始化相关系统
|
||||
func (this *ServiceBase) InitSys() {
|
||||
this.RPCXService.InitSys()
|
||||
//初始化配置中心系统 每个服务都会用到的就在这个初始化就好
|
||||
@ -24,3 +28,23 @@ func (this *ServiceBase) InitSys() {
|
||||
log.Infof("init sys.configure success!")
|
||||
}
|
||||
}
|
||||
|
||||
func (this *ServiceBase) Init(service core.IService) (err error) {
|
||||
this.pools = sync.Pool{
|
||||
New: func() interface{} {
|
||||
s := comm.NewUserSessionByPools(this)
|
||||
return s
|
||||
},
|
||||
}
|
||||
err = this.RPCXService.Init(service)
|
||||
return
|
||||
}
|
||||
|
||||
func (this *ServiceBase) GetUserSession() (session comm.IUserSession) {
|
||||
session = this.pools.Get().(comm.IUserSession)
|
||||
return
|
||||
}
|
||||
|
||||
func (this *ServiceBase) PutUserSession(session comm.IUserSession) {
|
||||
this.pools.Put(session)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user