From 6784338b4336b33edcec2c0c2e11ccc2e6a8c530 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Wed, 13 Sep 2023 11:33:47 +0800 Subject: [PATCH] =?UTF-8?q?=E9=94=99=E8=AF=AF=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/imodule.go | 10 ---------- modules/academy/module.go | 4 +++- modules/activity/module.go | 4 +++- modules/addrecharge/module.go | 4 +++- modules/arena/module.go | 4 +++- modules/battle/module.go | 4 +++- modules/battlerecord/module.go | 4 +++- modules/buried/module.go | 4 +++- modules/capturesheep/module.go | 4 +++- modules/caravan/module.go | 4 +++- modules/chat/module.go | 4 +++- modules/combat/module.go | 4 +++- modules/dailytask/module.go | 4 +++- modules/dragon/module.go | 4 +++- modules/enchant/module.go | 4 +++- modules/equipment/module.go | 4 +++- modules/friend/module.go | 4 +++- modules/gateway/module.go | 4 +++- modules/gm/module.go | 4 +++- modules/guidance/module.go | 4 +++- modules/guildgve/module.go | 4 +++- modules/hero/module.go | 4 +++- modules/herotask/module.go | 4 +++- modules/horoscope/module.go | 4 +++- modules/hunting/module.go | 4 +++- modules/items/module.go | 4 +++- modules/kftask/module.go | 4 +++- modules/library/module.go | 4 +++- modules/linestory/module.go | 12 +++++++----- modules/mail/module.go | 4 +++- modules/mainline/module.go | 4 +++- modules/mgolog/module.go | 4 +++- modules/modulebase.go | 4 +++- modules/moonfantasy/module.go | 4 +++- modules/oldtimes/module.go | 4 +++- modules/pagoda/module.go | 4 +++- modules/parkour/module.go | 4 +++- modules/passon/module.go | 4 +++- modules/pay/module.go | 4 +++- modules/practice/module.go | 4 +++- modules/privilege/module.go | 4 +++- modules/pushgiftbag/module.go | 4 +++- modules/pvp/module.go | 4 +++- modules/questionnaire/module.go | 4 +++- modules/reddot/module.go | 4 +++- modules/reputation/module.go | 10 ++++++---- modules/robot/module.go | 4 +++- modules/shop/module.go | 4 +++- modules/shopcenter/module.go | 4 +++- modules/sociaty/module.go | 4 +++- modules/stonehenge/module.go | 4 +++- modules/storyline/module.go | 4 +++- modules/sys/module.go | 4 +++- modules/timer/module.go | 4 +++- modules/tools/module.go | 4 +++- modules/turntable/module.go | 4 +++- modules/uigame/module.go | 4 +++- modules/user/module.go | 4 +++- modules/venture/module.go | 4 +++- modules/viking/module.go | 4 +++- modules/warorder/module.go | 4 +++- modules/weektask/module.go | 4 +++- modules/wtask/module.go | 4 +++- 63 files changed, 193 insertions(+), 79 deletions(-) diff --git a/comm/imodule.go b/comm/imodule.go index 4b9cd7461..e80feff39 100644 --- a/comm/imodule.go +++ b/comm/imodule.go @@ -242,16 +242,6 @@ type ( GMGetAllEquip(session IUserSession, ismaxlv bool) (errdata *pb.ErrorData) } - IMline interface { - ModifyMlineDataByNanduID(session IUserSession, id int32) (errdata *pb.ErrorData) - /// 查询章节ID - GetUserMlineData(uid string, chapterType int32) (chapterId int32) - - // 校验主线是否通关 - CheckCommpleteStage(uid string, stageId int32) (b bool) - ///红点 - IGetReddot - } //任务 ITask interface { ///红点 diff --git a/modules/academy/module.go b/modules/academy/module.go index 04f9993dc..166452cf2 100644 --- a/modules/academy/module.go +++ b/modules/academy/module.go @@ -41,7 +41,9 @@ func (this *Academy) Init(service core.IService, module core.IModule, options co } func (this *Academy) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } var module core.IModule if module, err = this.service.GetModule(comm.ModuleBattle); err != nil { return diff --git a/modules/activity/module.go b/modules/activity/module.go index b23fcc2d5..42c528b8f 100644 --- a/modules/activity/module.go +++ b/modules/activity/module.go @@ -59,7 +59,9 @@ func (this *Activity) Init(service core.IService, module core.IModule, options c return } func (this *Activity) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } this.service.RegisterFunctionName(string(comm.Rpc_Activity), this.Rpc_Activity) var module core.IModule diff --git a/modules/addrecharge/module.go b/modules/addrecharge/module.go index a2a412680..bc398d827 100644 --- a/modules/addrecharge/module.go +++ b/modules/addrecharge/module.go @@ -33,7 +33,9 @@ func (this *AddRecharge) Init(service core.IService, module core.IModule, option } func (this *AddRecharge) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } return } diff --git a/modules/arena/module.go b/modules/arena/module.go index 4de844bb2..9f8c95eac 100644 --- a/modules/arena/module.go +++ b/modules/arena/module.go @@ -51,7 +51,9 @@ func (this *Arena) Init(service core.IService, module core.IModule, options core return } func (this *Arena) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } var module core.IModule if module, err = this.service.GetModule(comm.ModuleBattle); err != nil { return diff --git a/modules/battle/module.go b/modules/battle/module.go index 916d1992b..b4721134c 100644 --- a/modules/battle/module.go +++ b/modules/battle/module.go @@ -53,7 +53,9 @@ func (this *Battle) Init(service core.IService, module core.IModule, options cor return } func (this *Battle) Start() (err error) { - if err = this.ModuleBase.Start(); err != nil { + if if err = this.ModuleBase.Start(); err != nil { + return + }; err != nil { return } var module core.IModule diff --git a/modules/battlerecord/module.go b/modules/battlerecord/module.go index c1febad96..5b64acedf 100644 --- a/modules/battlerecord/module.go +++ b/modules/battlerecord/module.go @@ -45,7 +45,9 @@ func (this *BattleRecord) OnInstallComp() { } func (this *BattleRecord) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } return } diff --git a/modules/buried/module.go b/modules/buried/module.go index d66e44f31..055c3402e 100644 --- a/modules/buried/module.go +++ b/modules/buried/module.go @@ -48,7 +48,9 @@ func (this *Buried) Init(service core.IService, module core.IModule, options cor } func (this *Buried) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } var module core.IModule if module, err = this.service.GetModule(comm.ModuleWtask); err != nil { diff --git a/modules/capturesheep/module.go b/modules/capturesheep/module.go index 6d545a332..ced707030 100644 --- a/modules/capturesheep/module.go +++ b/modules/capturesheep/module.go @@ -37,7 +37,9 @@ func (this *CaptureSheep) Init(service core.IService, module core.IModule, optio } func (this *CaptureSheep) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } var module core.IModule if module, err = this.service.GetModule(comm.ModuleDragon); err != nil { return diff --git a/modules/caravan/module.go b/modules/caravan/module.go index 48189aaee..4804776f3 100644 --- a/modules/caravan/module.go +++ b/modules/caravan/module.go @@ -43,7 +43,9 @@ func (this *Caravan) Init(service core.IService, module core.IModule, options co } func (this *Caravan) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } var module core.IModule if module, err = this.service.GetModule(comm.ModuleMail); err != nil { return diff --git a/modules/chat/module.go b/modules/chat/module.go index c3dab3361..ee6a913a6 100644 --- a/modules/chat/module.go +++ b/modules/chat/module.go @@ -59,7 +59,9 @@ func (this *Chat) Init(service core.IService, module core.IModule, options core. } func (this *Chat) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } var module core.IModule if module, err = this.service.GetModule(comm.ModuleGM); err != nil { return diff --git a/modules/combat/module.go b/modules/combat/module.go index 536395872..17477d9b4 100644 --- a/modules/combat/module.go +++ b/modules/combat/module.go @@ -41,7 +41,9 @@ func (this *Combat) Init(service core.IService, module core.IModule, options cor } func (this *Combat) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } var module core.IModule if module, err = this.service.GetModule(comm.ModuleBattle); err != nil { return diff --git a/modules/dailytask/module.go b/modules/dailytask/module.go index 3f768e9cb..30307e949 100644 --- a/modules/dailytask/module.go +++ b/modules/dailytask/module.go @@ -36,7 +36,9 @@ func (this *Dailytask) Init(service core.IService, module core.IModule, options } func (this *Dailytask) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } var module core.IModule if module, err = this.service.GetModule(comm.ModuleWtask); err != nil { return diff --git a/modules/dragon/module.go b/modules/dragon/module.go index ed65eb9b0..f1fbb0a14 100644 --- a/modules/dragon/module.go +++ b/modules/dragon/module.go @@ -49,7 +49,9 @@ func (this *Dragon) OnInstallComp() { this.configure = this.RegisterComp(new(configureComp)).(*configureComp) } func (this *Dragon) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } event.RegisterGO(comm.EventUserOffline, this.EventUserOffline) return } diff --git a/modules/enchant/module.go b/modules/enchant/module.go index 6fffe32f2..874216937 100644 --- a/modules/enchant/module.go +++ b/modules/enchant/module.go @@ -39,7 +39,9 @@ func (this *Enchant) Init(service core.IService, module core.IModule, options co } func (this *Enchant) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } var module core.IModule if module, err = this.service.GetModule(comm.ModuleBattle); err != nil { return diff --git a/modules/equipment/module.go b/modules/equipment/module.go index cbc107045..93f4fbc8e 100644 --- a/modules/equipment/module.go +++ b/modules/equipment/module.go @@ -52,7 +52,9 @@ func (this *Equipment) Init(service core.IService, module core.IModule, options // 模块启动接口 // 模块启动 func (this *Equipment) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } var module core.IModule if module, err = this.service.GetModule(comm.ModuleChat); err != nil { return diff --git a/modules/friend/module.go b/modules/friend/module.go index 12f3941a3..1d06317ef 100644 --- a/modules/friend/module.go +++ b/modules/friend/module.go @@ -59,7 +59,9 @@ func (this *Friend) OnInstallComp() { } func (this *Friend) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } this.service.RegisterFunctionName(string(comm.Rpc_ModuleFriendUseAssitHero), this.RpcUseAssisHero) this.service.RegisterFunctionName(string(comm.Rpc_ModuleFriendDB), this.RpcFriendDB) this.globalConf = this.ModuleTools.GetGlobalConf() diff --git a/modules/gateway/module.go b/modules/gateway/module.go index 5e2b9b7a8..1c7950c6d 100644 --- a/modules/gateway/module.go +++ b/modules/gateway/module.go @@ -78,7 +78,9 @@ func (this *Gateway) Start() (err error) { for name, fn := range _name2Func { this.service.RegisterFunctionName(name, fn) } - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } //没有建立客户端 主动发起握手 this.service.RpcGo(context.Background(), comm.Service_Mainte, rpcx.RpcX_ShakeHands, &rpcx.ServiceNode{ ServiceTag: this.service.GetTag(), diff --git a/modules/gm/module.go b/modules/gm/module.go index 4da399992..86afc2772 100644 --- a/modules/gm/module.go +++ b/modules/gm/module.go @@ -50,7 +50,9 @@ func (this *GM) Init(service core.IService, module core.IModule, options core.IM // 模块初始化接口 注册用户创建角色事件 func (this *GM) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } this.service.RegisterFunctionName(string(comm.Rpc_ModuleGMCreateCmd), this.Rpc_ModuleGMCreateCmd) return } diff --git a/modules/guidance/module.go b/modules/guidance/module.go index 72b89c96a..f504cc215 100644 --- a/modules/guidance/module.go +++ b/modules/guidance/module.go @@ -39,7 +39,9 @@ func (this *Guidance) Init(service core.IService, module core.IModule, options c // 模块初始化接口 注册用户创建角色事件 func (this *Guidance) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } return } diff --git a/modules/guildgve/module.go b/modules/guildgve/module.go index d7ab80f0c..d25764dc8 100644 --- a/modules/guildgve/module.go +++ b/modules/guildgve/module.go @@ -41,7 +41,9 @@ func (this *GuildGve) Init(service core.IService, module core.IModule, options c return } func (this *GuildGve) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } var module core.IModule if module, err = this.service.GetModule(comm.ModuleSociaty); err != nil { return diff --git a/modules/hero/module.go b/modules/hero/module.go index 13652dcfc..14b7bc9e8 100644 --- a/modules/hero/module.go +++ b/modules/hero/module.go @@ -60,7 +60,9 @@ func (this *Hero) OnInstallComp() { this.configure = this.RegisterComp(new(configureComp)).(*configureComp) } func (this *Hero) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } var module core.IModule if module, err = this.service.GetModule(comm.ModuleLibrary); err != nil { return diff --git a/modules/herotask/module.go b/modules/herotask/module.go index 6bf624541..45a4513d7 100644 --- a/modules/herotask/module.go +++ b/modules/herotask/module.go @@ -31,7 +31,9 @@ func (this *HeroTask) Init(service core.IService, module core.IModule, options c } func (this *HeroTask) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } return } diff --git a/modules/horoscope/module.go b/modules/horoscope/module.go index 37f57c54b..a4a9a5583 100644 --- a/modules/horoscope/module.go +++ b/modules/horoscope/module.go @@ -44,7 +44,9 @@ func (this *Horoscope) Init(service core.IService, module core.IModule, options } func (this *Horoscope) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } return } diff --git a/modules/hunting/module.go b/modules/hunting/module.go index 76c1eaf32..e6664e149 100644 --- a/modules/hunting/module.go +++ b/modules/hunting/module.go @@ -40,7 +40,9 @@ func (this *Hunting) Init(service core.IService, module core.IModule, options co } func (this *Hunting) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } var module core.IModule if module, err = this.service.GetModule(comm.ModuleBattle); err != nil { return diff --git a/modules/items/module.go b/modules/items/module.go index 9c0ba1866..2a3e5debf 100644 --- a/modules/items/module.go +++ b/modules/items/module.go @@ -48,7 +48,9 @@ func (this *Items) Init(service core.IService, module core.IModule, options core // 模块启动 func (this *Items) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } var module core.IModule if module, err = this.service.GetModule(comm.ModulePrivilege); err != nil { return diff --git a/modules/kftask/module.go b/modules/kftask/module.go index 908618b94..58624842d 100644 --- a/modules/kftask/module.go +++ b/modules/kftask/module.go @@ -31,7 +31,9 @@ func (this *KFTask) Init(service core.IService, module core.IModule, options cor } func (this *KFTask) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } return } diff --git a/modules/library/module.go b/modules/library/module.go index 8bc40249f..4529d86c1 100644 --- a/modules/library/module.go +++ b/modules/library/module.go @@ -48,7 +48,9 @@ func (this *Library) OnInstallComp() { } func (this *Library) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } this.service.RegisterFunctionName(string(comm.Rpc_ModuleFetter), this.Rpc_ModuleFetter) return diff --git a/modules/linestory/module.go b/modules/linestory/module.go index 271626709..996d63024 100644 --- a/modules/linestory/module.go +++ b/modules/linestory/module.go @@ -45,7 +45,9 @@ func (this *ModuleLinestory) GetType() core.M_Modules { } func (this *ModuleLinestory) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } if this.confTimeline, err = this.configure.getLinestoryTimelineCfg(); err != nil { return err } @@ -60,10 +62,10 @@ func (this *ModuleLinestory) isOverRealline(finishTasks []int32) bool { //真实结局节点ID var realEndingTaskId int32 // for _, v := range this.confMaintask.GetDataList() { - // if v.Ending == 1 { - // realEndingTaskId = v.Id - // break - // } + // if v.Ending == 1 { + // realEndingTaskId = v.Id + // break + // } // } log.Debugln(realEndingTaskId) // 存在真实结局节点 diff --git a/modules/mail/module.go b/modules/mail/module.go index dc90b983a..5f243b672 100644 --- a/modules/mail/module.go +++ b/modules/mail/module.go @@ -52,7 +52,9 @@ func (this *Mail) Init(service core.IService, module core.IModule, options core. return } func (this *Mail) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } this.service.RegisterFunctionName(string(comm.Rpc_Mail), this.Rpc_Mail) return } diff --git a/modules/mainline/module.go b/modules/mainline/module.go index d6e83fd78..cc76120e0 100644 --- a/modules/mainline/module.go +++ b/modules/mainline/module.go @@ -44,7 +44,9 @@ func (this *Mainline) OnInstallComp() { } func (this *Mainline) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } var module core.IModule if module, err = this.service.GetModule(comm.ModuleBattle); err != nil { return diff --git a/modules/mgolog/module.go b/modules/mgolog/module.go index 8b0d6b83a..c9707dda6 100644 --- a/modules/mgolog/module.go +++ b/modules/mgolog/module.go @@ -36,7 +36,9 @@ func (this *MgoLog) OnInstallComp() { } func (this *MgoLog) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } if err != nil { return } diff --git a/modules/modulebase.go b/modules/modulebase.go index 0707620ad..2896868e6 100644 --- a/modules/modulebase.go +++ b/modules/modulebase.go @@ -64,7 +64,9 @@ func (this *ModuleBase) Init(service core.IService, module core.IModule, options // 模块启动接口 func (this *ModuleBase) Start() (err error) { - if err = this.ModuleBase.Start(); err != nil { + if if err = this.ModuleBase.Start(); err != nil { + return + }; err != nil { return } var comp core.IServiceComp diff --git a/modules/moonfantasy/module.go b/modules/moonfantasy/module.go index a876e5c1a..f3817391d 100644 --- a/modules/moonfantasy/module.go +++ b/modules/moonfantasy/module.go @@ -54,7 +54,9 @@ func (this *Moonfantasy) Init(service core.IService, module core.IModule, option } func (this *Moonfantasy) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } var module core.IModule if module, err = this.service.GetModule(comm.ModuleChat); err != nil { return diff --git a/modules/oldtimes/module.go b/modules/oldtimes/module.go index c55e8443b..a3a905bde 100644 --- a/modules/oldtimes/module.go +++ b/modules/oldtimes/module.go @@ -38,7 +38,9 @@ func (this *Oldtimes) GetType() core.M_Modules { } func (this *Oldtimes) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } var module core.IModule if module, err = this.service.GetModule(comm.ModuleCombat); err != nil { return diff --git a/modules/pagoda/module.go b/modules/pagoda/module.go index 8d7fdc9c4..1b9998be4 100644 --- a/modules/pagoda/module.go +++ b/modules/pagoda/module.go @@ -68,7 +68,9 @@ func (this *Pagoda) ModifyPagodaData(uid string, data map[string]interface{}) (e } func (this *Pagoda) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } var module core.IModule if module, err = this.service.GetModule(comm.ModuleBattle); err != nil { return diff --git a/modules/parkour/module.go b/modules/parkour/module.go index 3fc235555..9d7e6c3e2 100644 --- a/modules/parkour/module.go +++ b/modules/parkour/module.go @@ -58,7 +58,9 @@ func (this *Parkour) Init(service core.IService, module core.IModule, options co } func (this *Parkour) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } this.service.RegisterFunctionName(string(comm.RPC_ParkourMatchSucc), this.createbattle) event.RegisterGO(comm.EventUserOffline, this.useroffline) return diff --git a/modules/passon/module.go b/modules/passon/module.go index c80fd9477..c5fc3027d 100644 --- a/modules/passon/module.go +++ b/modules/passon/module.go @@ -49,7 +49,9 @@ func (this *Passon) Init(service core.IService, module core.IModule, options cor return } func (this *Passon) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } return } diff --git a/modules/pay/module.go b/modules/pay/module.go index 04b02f326..413657fbb 100644 --- a/modules/pay/module.go +++ b/modules/pay/module.go @@ -52,7 +52,9 @@ func (this *Pay) Init(service core.IService, module core.IModule, options core.I return } func (this *Pay) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } var module core.IModule if module, err = this.service.GetModule(comm.ModulePrivilege); err != nil { return diff --git a/modules/practice/module.go b/modules/practice/module.go index b46973cc1..a4f5b553f 100644 --- a/modules/practice/module.go +++ b/modules/practice/module.go @@ -58,7 +58,9 @@ func (this *Practice) Init(service core.IService, module core.IModule, options c } func (this *Practice) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } var module core.IModule if module, err = this.service.GetModule(comm.ModulePvp); err != nil { return diff --git a/modules/privilege/module.go b/modules/privilege/module.go index db18696e8..61cef21f8 100644 --- a/modules/privilege/module.go +++ b/modules/privilege/module.go @@ -55,7 +55,9 @@ func (this *Privilege) Start() (err error) { return } this.mail = module.(comm.Imail) - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } event.RegisterGO(comm.EventUserOffline, this.EventUserOffline) return } diff --git a/modules/pushgiftbag/module.go b/modules/pushgiftbag/module.go index a0366c11a..fd820c302 100644 --- a/modules/pushgiftbag/module.go +++ b/modules/pushgiftbag/module.go @@ -35,7 +35,9 @@ func (this *PushGiftbag) Init(service core.IService, module core.IModule, option } func (this *PushGiftbag) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } return } diff --git a/modules/pvp/module.go b/modules/pvp/module.go index 403a274b1..fce121590 100644 --- a/modules/pvp/module.go +++ b/modules/pvp/module.go @@ -53,7 +53,9 @@ func (this *Pvp) Init(service core.IService, module core.IModule, options core.I } func (this *Pvp) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } var module core.IModule if module, err = this.service.GetModule(comm.ModuleBattle); err != nil { return diff --git a/modules/questionnaire/module.go b/modules/questionnaire/module.go index 0a4d5019c..529db522e 100644 --- a/modules/questionnaire/module.go +++ b/modules/questionnaire/module.go @@ -32,7 +32,9 @@ func (this *Questionnaire) Init(service core.IService, module core.IModule, opti } func (this *Questionnaire) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } var module core.IModule if module, err = this.service.GetModule(comm.ModuleBattle); err != nil { return diff --git a/modules/reddot/module.go b/modules/reddot/module.go index 6d229b32f..3dd27dcf8 100644 --- a/modules/reddot/module.go +++ b/modules/reddot/module.go @@ -53,7 +53,9 @@ func (this *Reddot) Init(service core.IService, module core.IModule, options cor return } func (this *Reddot) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } var module core.IModule if module, err = this.service.GetModule(comm.ModuleMainline); err != nil { diff --git a/modules/reputation/module.go b/modules/reputation/module.go index 129e63e71..cc92157d1 100644 --- a/modules/reputation/module.go +++ b/modules/reputation/module.go @@ -42,7 +42,9 @@ func (this *Reputation) GetType() core.M_Modules { } func (this *Reputation) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } return } @@ -66,7 +68,7 @@ func (this *Reputation) getCampLvMax(raceType int32) (maxLv int32) { // 声望升级 // raceType 阵营 fv 阵营好感度累计值 -func (this *Reputation) Upgrade(session comm.IUserSession, raceType int32, fv int32) int32 { +func (this *Reputation) Upgrade(session comm.IUserSession, raceType int32, fv int32) int32 { uid := session.GetUserId() reputation := this.modelReputation.getDBReputation(uid) if reputation == nil { @@ -103,10 +105,10 @@ func (this *Reputation) Upgrade(session comm.IUserSession, raceType int32, fv in if nextCampConf == nil { return cnf.ReputationLv } else { - if fv >= nextCampConf.ReputationExp { + if fv >= nextCampConf.ReputationExp { c.ReputationLv = nextCampConf.ReputationLv reward = cnf.Reward - flag = true + flag = true } break } diff --git a/modules/robot/module.go b/modules/robot/module.go index f02dcc613..80d278cc4 100644 --- a/modules/robot/module.go +++ b/modules/robot/module.go @@ -44,7 +44,9 @@ func (this *RobotModule) Init(service core.IService, module core.IModule, option return } func (this *RobotModule) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } return } diff --git a/modules/shop/module.go b/modules/shop/module.go index 3e7e75dac..62eac14f2 100644 --- a/modules/shop/module.go +++ b/modules/shop/module.go @@ -40,7 +40,9 @@ func (this *Shop) Init(service core.IService, module core.IModule, options core. return } func (this *Shop) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } var module core.IModule if module, err = this.service.GetModule(comm.ModuleEquipment); err != nil { return diff --git a/modules/shopcenter/module.go b/modules/shopcenter/module.go index d10cb79ec..b2f36d7bd 100644 --- a/modules/shopcenter/module.go +++ b/modules/shopcenter/module.go @@ -35,7 +35,9 @@ func (this *ShopCenter) Init(service core.IService, module core.IModule, options } func (this *ShopCenter) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } var module core.IModule if module, err = this.service.GetModule(comm.ModuleMainline); err != nil { return diff --git a/modules/sociaty/module.go b/modules/sociaty/module.go index 56234cb17..eb703ce63 100644 --- a/modules/sociaty/module.go +++ b/modules/sociaty/module.go @@ -62,7 +62,9 @@ func (this *Sociaty) OnInstallComp() { } func (this *Sociaty) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } this.service.RegisterFunctionName(string(comm.Rpc_ModuleSociaty), this.RpcGetSociaty) this.service.RegisterFunctionName(string(comm.Rpc_ModuleSociatyUpdate), this.RpcUpdateSociaty) this.service.RegisterFunctionName(string(comm.Rpc_ModuleSociatyTask), this.RpcUpdateUserTask) diff --git a/modules/stonehenge/module.go b/modules/stonehenge/module.go index e6248cfb2..9456e28af 100644 --- a/modules/stonehenge/module.go +++ b/modules/stonehenge/module.go @@ -39,7 +39,9 @@ func (this *Stonehenge) Init(service core.IService, module core.IModule, options } func (this *Stonehenge) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } var module core.IModule if module, err = this.service.GetModule(comm.ModuleBattle); err != nil { return diff --git a/modules/storyline/module.go b/modules/storyline/module.go index 865693b30..1c3d6d247 100644 --- a/modules/storyline/module.go +++ b/modules/storyline/module.go @@ -30,7 +30,9 @@ func (this *StoryLine) Init(service core.IService, module core.IModule, options } func (this *StoryLine) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } var module core.IModule if module, err = this.service.GetModule(comm.ModuleBattle); err != nil { return diff --git a/modules/sys/module.go b/modules/sys/module.go index fdf8f95cf..87d1884ef 100644 --- a/modules/sys/module.go +++ b/modules/sys/module.go @@ -46,7 +46,9 @@ func (this *ModuleSys) Init(service core.IService, module core.IModule, options } func (this *ModuleSys) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } var module core.IModule if module, err = this.service.GetModule(comm.ModuleWtask); err != nil { return diff --git a/modules/timer/module.go b/modules/timer/module.go index 88b1b4a46..cfe2106bb 100644 --- a/modules/timer/module.go +++ b/modules/timer/module.go @@ -54,7 +54,9 @@ func (this *Timer) Init(service core.IService, module core.IModule, options core } func (this *Timer) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } return } diff --git a/modules/tools/module.go b/modules/tools/module.go index c672cc392..855f6c8ca 100644 --- a/modules/tools/module.go +++ b/modules/tools/module.go @@ -32,7 +32,9 @@ func (this *Tools) Init(service core.IService, module core.IModule, options core // 模块初始化接口 注册用户创建角色事件 func (this *Tools) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } return } diff --git a/modules/turntable/module.go b/modules/turntable/module.go index 8d565c32a..213ad4104 100644 --- a/modules/turntable/module.go +++ b/modules/turntable/module.go @@ -35,7 +35,9 @@ func (this *Turntable) Init(service core.IService, module core.IModule, options } func (this *Turntable) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } var module core.IModule if module, err = this.service.GetModule(comm.ModuleMail); err != nil { return diff --git a/modules/uigame/module.go b/modules/uigame/module.go index 67d79a677..cc61b4d5f 100644 --- a/modules/uigame/module.go +++ b/modules/uigame/module.go @@ -46,7 +46,9 @@ func (this *UiGame) OnInstallComp() { } func (this *UiGame) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } return } diff --git a/modules/user/module.go b/modules/user/module.go index 14aa04c07..830d86787 100644 --- a/modules/user/module.go +++ b/modules/user/module.go @@ -79,7 +79,9 @@ func (this *User) Init(service core.IService, module core.IModule, options core. } func (this *User) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } event.RegisterGO(comm.EventUserOffline, this.CleanSession) this.service.RegisterFunctionName(Rpc_GetAllOnlineUser, this.RpcGetAllOnlineUser) this.service.RegisterFunctionName(Rpc_GetCrossUser, this.RpcGetCrossUser) diff --git a/modules/venture/module.go b/modules/venture/module.go index 9c37b3edb..88537400f 100644 --- a/modules/venture/module.go +++ b/modules/venture/module.go @@ -30,7 +30,9 @@ func (this *Venture) Init(service core.IService, module core.IModule, options co } func (this *Venture) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } return } diff --git a/modules/viking/module.go b/modules/viking/module.go index ed292a760..d25052cea 100644 --- a/modules/viking/module.go +++ b/modules/viking/module.go @@ -76,7 +76,9 @@ func (this *Viking) ModifyVikingData(uid string, data map[string]interface{}) (e return } func (this *Viking) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } var module core.IModule if module, err = this.service.GetModule(comm.ModuleBattle); err != nil { return diff --git a/modules/warorder/module.go b/modules/warorder/module.go index 26cfa0412..20d245ceb 100644 --- a/modules/warorder/module.go +++ b/modules/warorder/module.go @@ -34,7 +34,9 @@ func (this *Warorder) Init(service core.IService, module core.IModule, options c } func (this *Warorder) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } return } diff --git a/modules/weektask/module.go b/modules/weektask/module.go index b03fae26d..856371a92 100644 --- a/modules/weektask/module.go +++ b/modules/weektask/module.go @@ -36,7 +36,9 @@ func (this *WeekTask) Init(service core.IService, module core.IModule, options c } func (this *WeekTask) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } var module core.IModule if module, err = this.service.GetModule(comm.ModuleSys); err != nil { return diff --git a/modules/wtask/module.go b/modules/wtask/module.go index 6b43e92c6..976e2cab6 100644 --- a/modules/wtask/module.go +++ b/modules/wtask/module.go @@ -39,7 +39,9 @@ func (this *WTask) Init(service core.IService, module core.IModule, options core } func (this *WTask) Start() (err error) { - err = this.ModuleBase.Start() + if err = this.ModuleBase.Start(); err != nil { + return + } var module core.IModule if module, err = this.service.GetModule(comm.ModuleBattle); err != nil { return