65 lines
1.4 KiB
Go
65 lines
1.4 KiB
Go
package dreamwarorder
|
|
|
|
import (
|
|
"go_dreamfactory/comm"
|
|
"go_dreamfactory/lego/core"
|
|
"go_dreamfactory/modules"
|
|
"go_dreamfactory/pb"
|
|
)
|
|
|
|
type DreamWarorder struct {
|
|
modules.ModuleBase
|
|
service core.IService
|
|
api *apiComp
|
|
configure *configureComp
|
|
model *ModelDreamWarorder
|
|
open bool
|
|
}
|
|
|
|
func NewModule() core.IModule {
|
|
return &DreamWarorder{}
|
|
}
|
|
|
|
func (this *DreamWarorder) GetType() core.M_Modules {
|
|
return comm.ModuleDreamwarorder
|
|
}
|
|
|
|
func (this *DreamWarorder) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
|
|
err = this.ModuleBase.Init(service, module, options)
|
|
this.service = service
|
|
return
|
|
}
|
|
|
|
func (this *DreamWarorder) Start() (err error) {
|
|
err = this.ModuleBase.Start()
|
|
|
|
return
|
|
}
|
|
|
|
func (this *DreamWarorder) OnInstallComp() {
|
|
this.ModuleBase.OnInstallComp()
|
|
this.api = this.RegisterComp(new(apiComp)).(*apiComp)
|
|
this.model = this.RegisterComp(new(ModelDreamWarorder)).(*ModelDreamWarorder)
|
|
this.configure = this.RegisterComp(new(configureComp)).(*configureComp)
|
|
}
|
|
|
|
// 活动开启
|
|
func (this *DreamWarorder) ActivityOpenNotice(hdlist *pb.DBHuodong) {
|
|
switch hdlist.Itype {
|
|
case comm.KFSevenTask:
|
|
this.open = true
|
|
break
|
|
}
|
|
}
|
|
|
|
// 活动关闭
|
|
func (this *DreamWarorder) ActivityCloseNotice(hdlist *pb.DBHuodong) {
|
|
|
|
}
|
|
|
|
// 发货
|
|
func (this *DreamWarorder) Delivery(session comm.IUserSession, pid string) (errdata *pb.ErrorData, items []*pb.UserAssets) {
|
|
|
|
return
|
|
}
|