This commit is contained in:
meixiongfeng 2023-07-06 18:02:52 +08:00
commit 6dd28fe10c
20 changed files with 2343 additions and 508 deletions

View File

@ -20,15 +20,15 @@
"cityman": 34006,
"cityname": {
"key": "caravan_caravan_city_cityname_1",
"text": "死湾"
"text": "贝特曼"
},
"cityinformation": {
"key": "caravan_caravan_city_cityinformation_1",
"text": "常年游荡在死湾的商人,这一区域或许只有他才敢在这里做生意。"
"text": "在贝特曼城卖着各种原始的小玩意。"
},
"citytxt": {
"key": "caravan_caravan_city_citytxt_1",
"text": "死湾长年被一股胀气笼罩,这里的人们长年吸入这些气息,不知不觉已经产生了异变,他们自己称之为兽化病,年长的居民,会随着兽化病的加重,变成熊猫的模样,他们的人性会逐渐的被兽性所代替,最后彻底沦为一只只知道吃包子的直立行走的熊猫。"
"text": "贝特曼城生活着具有一定高级文明的人,他们用灶炉生火、能够引水洗澡、有独立的房间睡觉。"
},
"citytype": 1,
"citytypenum": 2,
@ -73,15 +73,15 @@
"cityman": 24004,
"cityname": {
"key": "caravan_caravan_city_cityname_2",
"text": "乱冢"
"text": "和平"
},
"cityinformation": {
"key": "caravan_caravan_city_cityinformation_2",
"text": "常年游荡在乱冢的商人,这一区域或许只有他才敢在这里做生意。"
"text": "在和平城卖各种防身的武器。"
},
"citytxt": {
"key": "caravan_caravan_city_citytxt_2",
"text": "乱冢长年被一股胀气笼罩,这里的人们长年吸入这些气息,不知不觉已经产生了异变,他们自己称之为兽化病,年长的居民,会随着兽化病的加重,变成熊猫的模样,他们的人性会逐渐的被兽性所代替,最后彻底沦为一只只知道吃包子的直立行走的熊猫。"
"text": "在和平城里,所有人都乐忠于学功夫,大家友好的用功夫进行交流,也让和平城免受外敌入侵。"
},
"citytype": 1,
"citytypenum": 3,
@ -127,15 +127,15 @@
"cityman": 25001,
"cityname": {
"key": "caravan_caravan_city_cityname_3",
"text": "陌城"
"text": "加菲斯特"
},
"cityinformation": {
"key": "caravan_caravan_city_cityinformation_3",
"text": "常年游荡在陌城的商人,这一区域或许只有他才敢在这里做生意。"
"text": "在加菲斯特城,商人都喜欢售卖能高效办公的用具。"
},
"citytxt": {
"key": "caravan_caravan_city_citytxt_3",
"text": "陌城长年被一股胀气笼罩,这里的人们长年吸入这些气息,不知不觉已经产生了异变,他们自己称之为兽化病,年长的居民,会随着兽化病的加重,变成熊猫的模样,他们的人性会逐渐的被兽性所代替,最后彻底沦为一只只知道吃包子的直立行走的熊猫。"
"text": "加菲斯特城生活着往来务工的人,所有人都在为各自的工作奋斗,鲜少有什么娱乐生活。"
},
"citytype": 1,
"citytypenum": 4,
@ -181,15 +181,15 @@
"cityman": 45001,
"cityname": {
"key": "caravan_caravan_city_cityname_4",
"text": "暗窟"
"text": "沼泽"
},
"cityinformation": {
"key": "caravan_caravan_city_cityinformation_4",
"text": "常年游荡在暗窟的商人,这一区域或许只有他才敢在这里做生意。"
"text": "在沼泽城的商人都以售卖轻便的商品为生。"
},
"citytxt": {
"key": "caravan_caravan_city_citytxt_4",
"text": "暗窟长年被一股胀气笼罩,这里的人们长年吸入这些气息,不知不觉已经产生了异变,他们自己称之为兽化病,年长的居民,会随着兽化病的加重,变成熊猫的模样,他们的人性会逐渐的被兽性所代替,最后彻底沦为一只只知道吃包子的直立行走的熊猫。"
"text": "沼泽城常年被沼泽覆盖,和外界处于隔绝的状态,靠往来的商人让各种物品保持流通状态。"
},
"citytype": 1,
"citytypenum": 3,
@ -234,15 +234,15 @@
"cityman": 14007,
"cityname": {
"key": "caravan_caravan_city_cityname_5",
"text": "腐宴"
"text": "博克"
},
"cityinformation": {
"key": "caravan_caravan_city_cityinformation_5",
"text": "常年游荡在腐宴的商人,这一区域或许只有他才敢在这里做生意。"
"text": "在博克城的商人对龙有很深的研究,喜欢卖各种和龙有关的商品。"
},
"citytxt": {
"key": "caravan_caravan_city_citytxt_5",
"text": "腐宴长年被一股胀气笼罩,这里的人们长年吸入这些气息,不知不觉已经产生了异变,他们自己称之为兽化病,年长的居民,会随着兽化病的加重,变成熊猫的模样,他们的人性会逐渐的被兽性所代替,最后彻底沦为一只只知道吃包子的直立行走的熊猫。"
"text": "博科城有一种特殊的飞行工具——龙,这也让这座城市的人出行很方便,只要想去一个地方,龙都能够快速将他带过去。"
},
"citytype": 1,
"citytypenum": 4,

File diff suppressed because it is too large Load Diff

View File

@ -11968,7 +11968,7 @@
},
"usetype": 4,
"color": 5,
"bagtype": 0,
"bagtype": 1,
"index": 2,
"special_type": 0,
"time": 0,
@ -12005,7 +12005,7 @@
},
"usetype": 4,
"color": 5,
"bagtype": 0,
"bagtype": 1,
"index": 2,
"special_type": 0,
"time": 0,
@ -12042,7 +12042,7 @@
},
"usetype": 4,
"color": 5,
"bagtype": 0,
"bagtype": 1,
"index": 2,
"special_type": 0,
"time": 0,
@ -12079,7 +12079,7 @@
},
"usetype": 4,
"color": 5,
"bagtype": 0,
"bagtype": 1,
"index": 2,
"special_type": 0,
"time": 0,
@ -12116,7 +12116,7 @@
},
"usetype": 4,
"color": 5,
"bagtype": 0,
"bagtype": 1,
"index": 2,
"special_type": 0,
"time": 0,
@ -12153,7 +12153,7 @@
},
"usetype": 4,
"color": 5,
"bagtype": 0,
"bagtype": 1,
"index": 2,
"special_type": 0,
"time": 0,
@ -12190,7 +12190,7 @@
},
"usetype": 4,
"color": 5,
"bagtype": 0,
"bagtype": 1,
"index": 2,
"special_type": 0,
"time": 0,
@ -12227,7 +12227,7 @@
},
"usetype": 4,
"color": 5,
"bagtype": 0,
"bagtype": 1,
"index": 2,
"special_type": 0,
"time": 0,
@ -12264,7 +12264,7 @@
},
"usetype": 4,
"color": 5,
"bagtype": 0,
"bagtype": 1,
"index": 2,
"special_type": 0,
"time": 0,
@ -12301,7 +12301,7 @@
},
"usetype": 4,
"color": 5,
"bagtype": 0,
"bagtype": 1,
"index": 2,
"special_type": 0,
"time": 0,
@ -12338,7 +12338,7 @@
},
"usetype": 4,
"color": 5,
"bagtype": 0,
"bagtype": 1,
"index": 2,
"special_type": 0,
"time": 0,
@ -12375,7 +12375,7 @@
},
"usetype": 4,
"color": 5,
"bagtype": 0,
"bagtype": 1,
"index": 2,
"special_type": 0,
"time": 0,
@ -12412,7 +12412,7 @@
},
"usetype": 4,
"color": 2,
"bagtype": 0,
"bagtype": 1,
"index": 1,
"special_type": 0,
"time": 0,
@ -12449,7 +12449,7 @@
},
"usetype": 4,
"color": 3,
"bagtype": 0,
"bagtype": 1,
"index": 1,
"special_type": 0,
"time": 0,
@ -12486,7 +12486,7 @@
},
"usetype": 4,
"color": 4,
"bagtype": 0,
"bagtype": 1,
"index": 1,
"special_type": 0,
"time": 0,
@ -12523,7 +12523,7 @@
},
"usetype": 4,
"color": 4,
"bagtype": 0,
"bagtype": 1,
"index": 1,
"special_type": 0,
"time": 0,
@ -12560,7 +12560,7 @@
},
"usetype": 4,
"color": 3,
"bagtype": 0,
"bagtype": 1,
"index": 1,
"special_type": 0,
"time": 0,
@ -12597,7 +12597,7 @@
},
"usetype": 4,
"color": 3,
"bagtype": 0,
"bagtype": 1,
"index": 1,
"special_type": 0,
"time": 0,
@ -12634,7 +12634,7 @@
},
"usetype": 4,
"color": 3,
"bagtype": 0,
"bagtype": 1,
"index": 1,
"special_type": 0,
"time": 0,

View File

@ -5256,7 +5256,7 @@
],
"event": [
2,
50000010
50010010
],
"goto": 0
},
@ -5282,7 +5282,7 @@
],
"event": [
2,
50000020
50010020
],
"goto": 0
},
@ -5296,7 +5296,7 @@
],
"event": [
2,
50000030
50010030
],
"goto": 0
},
@ -5322,7 +5322,7 @@
],
"event": [
2,
50000040
50010040
],
"goto": 0
},
@ -5336,7 +5336,7 @@
],
"event": [
2,
50000050
50010050
],
"goto": 0
},
@ -5362,7 +5362,7 @@
],
"event": [
2,
50000060
50010060
],
"goto": 0
},
@ -5376,7 +5376,7 @@
],
"event": [
2,
50000070
50010070
],
"goto": 0
},
@ -5404,7 +5404,7 @@
],
"event": [
2,
50000080
50010080
],
"goto": 0
},
@ -5418,7 +5418,7 @@
],
"event": [
2,
50000090
50010090
],
"goto": 0
},
@ -5446,7 +5446,7 @@
],
"event": [
2,
50000100
50010100
],
"goto": 0
}

File diff suppressed because it is too large Load Diff

View File

@ -88,6 +88,7 @@ const (
ModuleBuried core.M_Modules = "buried" //埋点中心
ModuleActivity core.M_Modules = "acrivity" //活动
ModuleGuidance core.M_Modules = "guidance" //引导
ModuleWtask core.M_Modules = "wtask" //世界任务
)
// 数据表名定义处

View File

@ -533,4 +533,9 @@ type (
//推送红点
PushReddot(session IUserSession, reddot ...*pb.ReddotItem) (errdata *pb.ErrorData)
}
//练功房
IPasson interface {
//英雄升级
HeroUpLv(session IUserSession, heroid string, lv int32)
}
)

View File

@ -50,7 +50,7 @@ func (this *apiComp) InRoom(session comm.IUserSession, req *pb.PassonInRoomReq)
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ReqParameterError,
Title: pb.ErrorCode_ReqParameterError.ToString(),
Message: fmt.Sprintf("no found hero:%d", req.Heroid),
Message: fmt.Sprintf("no found hero:%s", req.Heroid),
}
return
}
@ -82,7 +82,9 @@ func (this *apiComp) InRoom(session comm.IUserSession, req *pb.PassonInRoomReq)
return
}
hero.Ispasson = true
session.SendMsg(string(this.module.GetType()), "getlist", &pb.PassonInRoomResp{Heroid: req.Heroid})
if errdata = this.module.ModuleHero.PassonHero(session, map[string]bool{hero.Id: true}); errdata != nil {
return
}
session.SendMsg(string(this.module.GetType()), "inroom", &pb.PassonInRoomResp{Heroid: req.Heroid})
return
}

21
modules/passon/core.go Normal file
View File

@ -0,0 +1,21 @@
package passon
import "go_dreamfactory/pb"
type SliceHero []*pb.DBHero
// 实现sort.Interface接口的方法
// 获取数组长度
func (this SliceHero) Len() int {
return len(this)
}
// 比较元素大小
func (this SliceHero) Less(i, j int) bool {
return this[i].Lv < this[j].Lv
}
// 交换元素位置
func (this SliceHero) Swap(i, j int) {
this[i], this[j] = this[j], this[i]
}

View File

@ -4,6 +4,7 @@ import (
"go_dreamfactory/comm"
"go_dreamfactory/modules"
"go_dreamfactory/pb"
"sort"
"go_dreamfactory/lego/base"
"go_dreamfactory/lego/core"
@ -53,6 +54,9 @@ func (this *Passon) Start() (err error) {
func (this *Passon) HeroUpLv(session comm.IUserSession, heroid string, lv int32) {
var (
passon *pb.DBPasson
heros []*pb.DBHero
change map[string]bool = make(map[string]bool)
errdata *pb.ErrorData
err error
)
if passon, err = this.modelPasson.getUserPasson(session.GetUserId()); err != nil {
@ -69,4 +73,49 @@ func (this *Passon) HeroUpLv(session comm.IUserSession, heroid string, lv int32)
}
}
heros = this.ModuleHero.GetHeroList(session.GetUserId())
if len(heros) < 5 {
return
}
// 使用sort.Slice进行排序
sort.Slice(heros, func(i, j int) bool {
return heros[i].Lv < heros[j].Lv
})
for i := 0; i < 5; i++ {
if heros[i].Ispasson {
change[heros[i].Id] = false
for ii, v := range passon.Student {
if v == heros[ii].Id {
passon.Student[ii] = ""
}
}
}
passon.Teacher[i] = heros[i].Id
}
if len(change) > 0 {
if errdata = this.ModuleHero.PassonHero(session, change); errdata != nil {
return
}
}
if passon.Passonlv != heros[4].Lv {
passon.Passonlv = heros[4].Lv
this.ModuleUser.ChangeUserExpand(session.GetUserId(), map[string]interface{}{
"passonlv": passon.Passonlv,
})
session.SendMsg(string(this.GetType()), "lvchange", &pb.PassonLvChangePush{Lv: passon.Passonlv})
}
if err = this.modelPasson.Change(session.GetUserId(), map[string]interface{}{
"passonlv": passon.Passonlv,
"teacher": passon.Teacher,
"student": passon.Student,
}); err != nil {
this.Errorln(err)
}
}

View File

@ -20,12 +20,14 @@ const (
type configureComp struct {
modules.MCompConfigure
module *Worldtask
lock sync.RWMutex
worldtaskConf map[int32]*cfg.GameWorldTaskData //key 条件ID
}
func (this *configureComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
err = this.MCompConfigure.Init(service, module, comp, options)
this.module = module.(*Worldtask)
err = this.LoadMultiConfigure(map[string]interface{}{
gameWorldTask: cfg.NewGameWorldTask,
gameWorldtaskBattle: cfg.NewGameWorldBattle,
@ -38,6 +40,77 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp
return
}
func (this *configureComp) Start() (err error) {
err = this.MCompConfigure.Start()
this.checkWorldtaskConf()
conf, err := this.getWorldtaskCfg()
if err != nil {
return err
}
this.worldtaskConf = conf.GetDataMap()
return
}
// 配置文件校验
func (this *configureComp) checkWorldtaskConf() (err error) {
worldtaskConf, err := this.getWorldtaskCfg()
if err != nil {
return err
}
buriedCondConf, err := this.getBuriedCondCfg()
if err != nil {
return err
}
for _, data := range worldtaskConf.GetDataList() {
// 检查 lock
if data.Lock < 1 {
this.module.Errorf("taskId:%v lock:%v可能存在问题", data.Key, data.Lock)
}
//检查group
if data.Group <= 0 {
this.module.Errorf("taskId:%v group:%v可能存在问题", data.Key, data.Group)
}
//检查des
if data.Des < 1 || data.Des > 5 {
// errs = append(errs, fmt.Sprintf("taskId:%v des:%v可能存在问题", data.Key, data.Des))
this.module.Errorf("taskId:%v des:%v可能存在问题", data.Key, data.Des)
}
// 检查completetask 是否有效
for _, condId := range data.Completetask {
if condId > 0 {
if _, ok := buriedCondConf.GetDataMap()[condId]; !ok {
this.module.Errorf("taskId:%v completetask:%v可能是无效的ID", data.Key, condId)
// errs = append(errs, fmt.Sprintf("taskId:%v completetask:%v可能是无效的ID", data.Key, condId))
}
}
}
//检查NPC
if data.Npc > 0 {
if _, err := this.getNPCById(data.Npc); err != nil {
this.module.Errorf("npcId:%v 可能无效,检查world_task表字段Npc值是否存在于buried/rdtasknpc", data.Npc)
// errs = append(errs, fmt.Sprintf("npcId:%v 可能无效,检查world_task表字段Npc值是否存在于buried/rdtasknpc", data.Npc))
}
}
if data.DeliverNpc > 0 {
if _, err := this.getNPCById(data.Npc); err != nil {
this.module.Errorf("npcId:%v 可能无效,检查world_task表字段deliver_npc值是否存在于buried/rdtasknpc", data.Npc)
// errs = append(errs, fmt.Sprintf("npcId:%v 可能无效,检查world_task表字段deliver_npc值是否存在于buried/rdtasknpc", data.Npc))
}
}
}
for _, data := range buriedCondConf.GetDataList() {
if data.NPC > 0 {
if _, err := this.getNPCById(data.NPC); err != nil {
this.module.Errorf("npcId:%v 可能无效,检查buried_condi表字段NPC值是否存在于buried/rdtasknpc", data.NPC)
}
}
}
return
}
func (this *configureComp) getWorldtaskCfg() (data *cfg.GameWorldTask, err error) {
var (
v interface{}

View File

@ -5,12 +5,12 @@ import (
"go_dreamfactory/comm"
"go_dreamfactory/lego/base"
"go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/event"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/modules"
"go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs"
"go_dreamfactory/utils"
"strings"
)
var _ comm.IWorldtask = (*Worldtask)(nil)
@ -36,7 +36,6 @@ func (this *Worldtask) Init(service core.IService, module core.IModule, options
func (this *Worldtask) OnInstallComp() {
this.ModuleBase.OnInstallComp()
// event.Register(comm.EventBuriedComplete, this.TCondFinishNotify)
this.api = this.RegisterComp(new(apiComp)).(*apiComp)
this.modelWorldtask = this.RegisterComp(new(ModelWorldtask)).(*ModelWorldtask)
this.configure = this.RegisterComp(new(configureComp)).(*configureComp)
@ -49,14 +48,7 @@ func (this *Worldtask) GetType() core.M_Modules {
func (this *Worldtask) Start() (err error) {
err = this.ModuleBase.Start()
if err = this.checkWorldtaskConf(); err != nil {
return err
}
conf, err := this.configure.getWorldtaskCfg()
if err != nil {
return err
}
this.configure.worldtaskConf = conf.GetDataMap()
event.Register(comm.EventBuriedComplete, this.TCondFinishNotify)
return
}
@ -67,66 +59,6 @@ func (this *Worldtask) OpenCmdNotice(session comm.IUserSession, keys ...string)
var errs []string
// 配置文件校验
func (this *Worldtask) checkWorldtaskConf() (err error) {
worldtaskConf, err := this.configure.getWorldtaskCfg()
if err != nil {
return err
}
buriedCondConf, err := this.configure.getBuriedCondCfg()
if err != nil {
return err
}
for _, data := range worldtaskConf.GetDataList() {
// 检查 lock
if data.Lock < 1 {
errs = append(errs, fmt.Sprintf("taskId:%v lock:%v可能存在问题", data.Key, data.Lock))
}
//检查group
if data.Group <= 0 {
errs = append(errs, fmt.Sprintf("taskId:%v group:%v可能存在问题", data.Key, data.Group))
}
//检查des
if data.Des < 1 || data.Des > 5 {
errs = append(errs, fmt.Sprintf("taskId:%v des:%v可能存在问题", data.Key, data.Des))
}
// 检查completetask 是否有效
for _, condId := range data.Completetask {
if condId > 0 {
if _, ok := buriedCondConf.GetDataMap()[condId]; !ok {
errs = append(errs, fmt.Sprintf("taskId:%v completetask:%v可能是无效的ID", data.Key, condId))
}
}
}
//检查NPC
if data.Npc > 0 {
if _, err := this.configure.getNPCById(data.Npc); err != nil {
errs = append(errs, fmt.Sprintf("npcId:%v 可能无效,检查world_task表字段Npc值是否存在于buried/rdtasknpc", data.Npc))
}
}
if data.DeliverNpc > 0 {
if _, err := this.configure.getNPCById(data.Npc); err != nil {
errs = append(errs, fmt.Sprintf("npcId:%v 可能无效,检查world_task表字段deliver_npc值是否存在于buried/rdtasknpc", data.Npc))
}
}
}
for _, data := range buriedCondConf.GetDataList() {
if data.NPC > 0 {
if _, err := this.configure.getNPCById(data.NPC); err != nil {
errs = append(errs, fmt.Sprintf("npcId:%v 可能无效,检查buried_condi表字段NPC值是否存在于buried/rdtasknpc", data.NPC))
}
}
}
if len(errs) > 0 {
return fmt.Errorf("%s", strings.Join(errs, "|"))
}
this.Debug("check worldtask conf completed")
return
}
// 完成条件通知
func (this *Worldtask) TCondFinishNotify(uid string, conds []*pb.ConIProgress) {
this.Debug("世界任务完成条件通知", log.Field{Key: "uid", Value: uid}, log.Field{Key: "condIds", Value: conds})

View File

@ -28,7 +28,7 @@ func NewModule() core.IModule {
}
func (this *WTask) GetType() core.M_Modules {
return comm.ModuleWorldtask
return comm.ModuleWtask
}
func (this *WTask) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
@ -238,7 +238,7 @@ func (this *WTask) fishtask(session comm.IUserSession, wtask *pb.DBWTask) {
opencmd = append(opencmd, k)
}
}
if user = this.ModuleUser.GetUser(session.GetUserId()); user != nil {
if user = this.ModuleUser.GetUser(session.GetUserId()); user == nil {
this.Error("获取用户信息失败!", log.Field{Key: "uid", Value: session.GetUserId()})
return
}
@ -295,7 +295,7 @@ func (this *WTask) inquireActivations(session comm.IUserSession, wtask *pb.DBWTa
if _, ok = activatMap[v.Key]; ok { //已在可接取列表中
continue
}
if _, ok = acceptsMap[v.Key]; ok { //已在已接取任务列表中
if _, ok = acceptsMap[v.Key]; v.LockAdd == 0 && ok { //已在已接取任务列表中 LockAdd 0 表示只能接取一次 1 表示可以重复接取
continue
}
if _, ok = completeMap[v.Key]; ok { //已在完成列表中

View File

@ -329,7 +329,7 @@ type DBActivityData struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid"`
Hdid int32 `protobuf:"varint,3,opt,name=hdid,proto3" json:"hdid"`
Hid int32 `protobuf:"varint,3,opt,name=hid,proto3" json:"hid"`
Gotarr []int32 `protobuf:"varint,4,rep,packed,name=gotarr,proto3" json:"gotarr"`
Lasttime int64 `protobuf:"varint,5,opt,name=lasttime,proto3" json:"lasttime"`
Val int32 `protobuf:"varint,6,opt,name=val,proto3" json:"val"`
@ -381,9 +381,9 @@ func (x *DBActivityData) GetUid() string {
return ""
}
func (x *DBActivityData) GetHdid() int32 {
func (x *DBActivityData) GetHid() int32 {
if x != nil {
return x.Hdid
return x.Hid
}
return 0
}
@ -450,16 +450,16 @@ var file_activity_activity_db_proto_rawDesc = []byte{
0x13, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x68, 0x74, 0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x04,
0x64, 0x61, 0x74, 0x61, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x41, 0x63, 0x74,
0x69, 0x76, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22,
0x8c, 0x01, 0x0a, 0x0e, 0x44, 0x42, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x44, 0x61,
0x8a, 0x01, 0x0a, 0x0e, 0x44, 0x42, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x44, 0x61,
0x74, 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02,
0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x64, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01,
0x28, 0x05, 0x52, 0x04, 0x68, 0x64, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x6f, 0x74, 0x61,
0x72, 0x72, 0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x52, 0x06, 0x67, 0x6f, 0x74, 0x61, 0x72, 0x72,
0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01,
0x28, 0x03, 0x52, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03,
0x76, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x42, 0x06,
0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x03, 0x75, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x68, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28,
0x05, 0x52, 0x03, 0x68, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x6f, 0x74, 0x61, 0x72, 0x72,
0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x52, 0x06, 0x67, 0x6f, 0x74, 0x61, 0x72, 0x72, 0x12, 0x1a,
0x0a, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03,
0x52, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x61,
0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x42, 0x06, 0x5a, 0x04,
0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@ -116,6 +116,54 @@ func (x *PassonInRoomResp) GetHeroid() string {
return ""
}
//传功等级变化推送
type PassonLvChangePush struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Lv int32 `protobuf:"varint,1,opt,name=lv,proto3" json:"lv"`
}
func (x *PassonLvChangePush) Reset() {
*x = PassonLvChangePush{}
if protoimpl.UnsafeEnabled {
mi := &file_passon_passon_msg_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PassonLvChangePush) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PassonLvChangePush) ProtoMessage() {}
func (x *PassonLvChangePush) ProtoReflect() protoreflect.Message {
mi := &file_passon_passon_msg_proto_msgTypes[2]
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 PassonLvChangePush.ProtoReflect.Descriptor instead.
func (*PassonLvChangePush) Descriptor() ([]byte, []int) {
return file_passon_passon_msg_proto_rawDescGZIP(), []int{2}
}
func (x *PassonLvChangePush) GetLv() int32 {
if x != nil {
return x.Lv
}
return 0
}
var File_passon_passon_msg_proto protoreflect.FileDescriptor
var file_passon_passon_msg_proto_rawDesc = []byte{
@ -126,7 +174,10 @@ var file_passon_passon_msg_proto_rawDesc = []byte{
0x72, 0x6f, 0x69, 0x64, 0x22, 0x2a, 0x0a, 0x10, 0x50, 0x61, 0x73, 0x73, 0x6f, 0x6e, 0x49, 0x6e,
0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f,
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64,
0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x22, 0x24, 0x0a, 0x12, 0x50, 0x61, 0x73, 0x73, 0x6f, 0x6e, 0x4c, 0x76, 0x43, 0x68, 0x61, 0x6e,
0x67, 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x01, 0x20, 0x01,
0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -141,10 +192,11 @@ func file_passon_passon_msg_proto_rawDescGZIP() []byte {
return file_passon_passon_msg_proto_rawDescData
}
var file_passon_passon_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_passon_passon_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_passon_passon_msg_proto_goTypes = []interface{}{
(*PassonInRoomReq)(nil), // 0: PassonInRoomReq
(*PassonInRoomResp)(nil), // 1: PassonInRoomResp
(*PassonLvChangePush)(nil), // 2: PassonLvChangePush
}
var file_passon_passon_msg_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
@ -184,6 +236,18 @@ func file_passon_passon_msg_proto_init() {
return nil
}
}
file_passon_passon_msg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PassonLvChangePush); 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{
@ -191,7 +255,7 @@ func file_passon_passon_msg_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_passon_passon_msg_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumMessages: 3,
NumExtensions: 0,
NumServices: 0,
},

View File

@ -220,126 +220,6 @@ func (x *DBVikingRank) GetCostTime() int32 {
return 0
}
// 装备副本DBVSeasonRank
type DBVSeasonRank struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //用户ID
Difficulty int32 `protobuf:"varint,3,opt,name=difficulty,proto3" json:"difficulty"` // 难度
Bosstype int32 `protobuf:"varint,4,opt,name=bosstype,proto3" json:"bosstype"` // boss类型塔类型
Nickname string `protobuf:"bytes,5,opt,name=nickname,proto3" json:"nickname"` // 昵称
Icon string `protobuf:"bytes,6,opt,name=icon,proto3" json:"icon"` // 玩家头像
Lv int32 `protobuf:"varint,7,opt,name=lv,proto3" json:"lv"` // 玩家等级
Leadpos int32 `protobuf:"varint,8,opt,name=leadpos,proto3" json:"leadpos"` //队长位置
Line []*LineUp `protobuf:"bytes,9,rep,name=line,proto3" json:"line"` // 阵容数据
Huihe int32 `protobuf:"varint,10,opt,name=huihe,proto3" json:"huihe"` // 平均回合数 建议*10
}
func (x *DBVSeasonRank) Reset() {
*x = DBVSeasonRank{}
if protoimpl.UnsafeEnabled {
mi := &file_viking_viking_db_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DBVSeasonRank) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DBVSeasonRank) ProtoMessage() {}
func (x *DBVSeasonRank) ProtoReflect() protoreflect.Message {
mi := &file_viking_viking_db_proto_msgTypes[2]
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 DBVSeasonRank.ProtoReflect.Descriptor instead.
func (*DBVSeasonRank) Descriptor() ([]byte, []int) {
return file_viking_viking_db_proto_rawDescGZIP(), []int{2}
}
func (x *DBVSeasonRank) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *DBVSeasonRank) GetUid() string {
if x != nil {
return x.Uid
}
return ""
}
func (x *DBVSeasonRank) GetDifficulty() int32 {
if x != nil {
return x.Difficulty
}
return 0
}
func (x *DBVSeasonRank) GetBosstype() int32 {
if x != nil {
return x.Bosstype
}
return 0
}
func (x *DBVSeasonRank) GetNickname() string {
if x != nil {
return x.Nickname
}
return ""
}
func (x *DBVSeasonRank) GetIcon() string {
if x != nil {
return x.Icon
}
return ""
}
func (x *DBVSeasonRank) GetLv() int32 {
if x != nil {
return x.Lv
}
return 0
}
func (x *DBVSeasonRank) GetLeadpos() int32 {
if x != nil {
return x.Leadpos
}
return 0
}
func (x *DBVSeasonRank) GetLine() []*LineUp {
if x != nil {
return x.Line
}
return nil
}
func (x *DBVSeasonRank) GetHuihe() int32 {
if x != nil {
return x.Huihe
}
return 0
}
var File_viking_viking_db_proto protoreflect.FileDescriptor
var file_viking_viking_db_proto_rawDesc = []byte{
@ -384,23 +264,7 @@ var file_viking_viking_db_proto_rawDesc = []byte{
0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x55, 0x70, 0x52, 0x04,
0x6c, 0x69, 0x6e, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65,
0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x63, 0x6f, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65,
0x22, 0xfa, 0x01, 0x0a, 0x0d, 0x44, 0x42, 0x56, 0x53, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x61,
0x6e, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02,
0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x03, 0x75, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c,
0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63,
0x75, 0x6c, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6f, 0x73, 0x73, 0x74, 0x79, 0x70, 0x65,
0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x6f, 0x73, 0x73, 0x74, 0x79, 0x70, 0x65,
0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01,
0x28, 0x09, 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04,
0x69, 0x63, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x63, 0x6f, 0x6e,
0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76,
0x12, 0x18, 0x0a, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28,
0x05, 0x52, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x12, 0x1b, 0x0a, 0x04, 0x6c, 0x69,
0x6e, 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x55,
0x70, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x68, 0x75, 0x69, 0x68, 0x65,
0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x68, 0x75, 0x69, 0x68, 0x65, 0x42, 0x06, 0x5a,
0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -415,27 +279,25 @@ func file_viking_viking_db_proto_rawDescGZIP() []byte {
return file_viking_viking_db_proto_rawDescData
}
var file_viking_viking_db_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_viking_viking_db_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_viking_viking_db_proto_goTypes = []interface{}{
(*DBViking)(nil), // 0: DBViking
(*DBVikingRank)(nil), // 1: DBVikingRank
(*DBVSeasonRank)(nil), // 2: DBVSeasonRank
nil, // 3: DBViking.BossEntry
nil, // 4: DBViking.BossTimeEntry
nil, // 5: DBViking.PsEntry
(*LineUp)(nil), // 6: LineUp
nil, // 2: DBViking.BossEntry
nil, // 3: DBViking.BossTimeEntry
nil, // 4: DBViking.PsEntry
(*LineUp)(nil), // 5: LineUp
}
var file_viking_viking_db_proto_depIdxs = []int32{
3, // 0: DBViking.boss:type_name -> DBViking.BossEntry
4, // 1: DBViking.bossTime:type_name -> DBViking.BossTimeEntry
5, // 2: DBViking.ps:type_name -> DBViking.PsEntry
6, // 3: DBVikingRank.line:type_name -> LineUp
6, // 4: DBVSeasonRank.line:type_name -> LineUp
5, // [5:5] is the sub-list for method output_type
5, // [5:5] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension type_name
5, // [5:5] is the sub-list for extension extendee
0, // [0:5] is the sub-list for field type_name
2, // 0: DBViking.boss:type_name -> DBViking.BossEntry
3, // 1: DBViking.bossTime:type_name -> DBViking.BossTimeEntry
4, // 2: DBViking.ps:type_name -> DBViking.PsEntry
5, // 3: DBVikingRank.line:type_name -> LineUp
4, // [4:4] is the sub-list for method output_type
4, // [4:4] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
}
func init() { file_viking_viking_db_proto_init() }
@ -469,18 +331,6 @@ func file_viking_viking_db_proto_init() {
return nil
}
}
file_viking_viking_db_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DBVSeasonRank); 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{
@ -488,7 +338,7 @@ func file_viking_viking_db_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_viking_viking_db_proto_rawDesc,
NumEnums: 0,
NumMessages: 6,
NumMessages: 5,
NumExtensions: 0,
NumServices: 0,
},

View File

@ -49,6 +49,7 @@ import (
"go_dreamfactory/modules/user"
"go_dreamfactory/modules/viking"
"go_dreamfactory/modules/worldtask"
"go_dreamfactory/modules/wtask"
"go_dreamfactory/services"
"go_dreamfactory/sys/db"
"go_dreamfactory/sys/wordfilter"
@ -126,6 +127,7 @@ func main() {
buried.NewModule(),
activity.NewModule(),
guidance.NewModule(),
wtask.NewModule(),
)
}

View File

@ -19,6 +19,7 @@ type GameBuriedCondiData struct {
Tasktxt string
Type int32
Valid int32
Head *Gameatn
NPC int32
Value int32
Filter []int32
@ -53,6 +54,7 @@ func (_v *GameBuriedCondiData)Deserialize(_buf map[string]interface{}) (err erro
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["tasktxt"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Tasktxt error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Tasktxt, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["type"].(float64); !_ok_ { err = errors.New("type error"); return }; _v.Type = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["valid"].(float64); !_ok_ { err = errors.New("valid error"); return }; _v.Valid = int32(_tempNum_) }
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["head"].(map[string]interface{}); !_ok_ { err = errors.New("head error"); return }; if _v.Head, err = DeserializeGameatn(_x_); err != nil { return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["NPC"].(float64); !_ok_ { err = errors.New("NPC error"); return }; _v.NPC = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["value"].(float64); !_ok_ { err = errors.New("value error"); return }; _v.Value = int32(_tempNum_) }
{

View File

@ -28,6 +28,7 @@ type GameWorldTaskData struct {
DeliverNpc int32
TaskendRemoveitem []*Gameatn
AutoAccept int32
LockAdd int32
Reword []*Gameatn
Module []string
}
@ -82,6 +83,7 @@ func (_v *GameWorldTaskData)Deserialize(_buf map[string]interface{}) (err error)
}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["auto_accept"].(float64); !_ok_ { err = errors.New("auto_accept error"); return }; _v.AutoAccept = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["lock_add"].(float64); !_ok_ { err = errors.New("lock_add error"); return }; _v.LockAdd = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool

View File

@ -16,6 +16,7 @@ type GameHeroAwakenData struct {
Phase int32
Name string
Phasebonus []string
Describe string
Icon string
Condition int32
Phaseneed []*Gameatn
@ -47,6 +48,7 @@ func (_v *GameHeroAwakenData)Deserialize(_buf map[string]interface{}) (err error
}
}
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["describe"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Describe error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Describe, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{ var _ok_ bool; if _v.Icon, _ok_ = _buf["icon"].(string); !_ok_ { err = errors.New("icon error"); return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["condition"].(float64); !_ok_ { err = errors.New("condition error"); return }; _v.Condition = int32(_tempNum_) }
{