上传pvp代码修复
This commit is contained in:
parent
ebb8889403
commit
e8a5037e04
@ -31,7 +31,6 @@ type Pvp struct {
|
||||
modules.ModuleBase
|
||||
service base.IRPCXService
|
||||
battle comm.IBattle
|
||||
friend comm.IFriend
|
||||
practice comm.IPractice
|
||||
apicomp *apiComp
|
||||
modelPvpComp *modelPvpComp
|
||||
@ -59,11 +58,10 @@ func (this *Pvp) Start() (err error) {
|
||||
return
|
||||
}
|
||||
this.battle = module.(comm.IBattle)
|
||||
|
||||
if module, err = this.service.GetModule(comm.ModuleFriend); err != nil {
|
||||
if module, err = this.service.GetModule(comm.ModulePractice); err != nil {
|
||||
return
|
||||
}
|
||||
this.friend = module.(comm.IFriend)
|
||||
this.practice = module.(comm.IPractice)
|
||||
// event.RegisterGO(comm.EventUserLogin, this.userlogin)
|
||||
event.RegisterGO(comm.EventUserOffline, this.useroffline)
|
||||
return
|
||||
@ -230,7 +228,7 @@ func (this *Pvp) readyTimeOut(task *timewheel.Task, args ...interface{}) {
|
||||
}, battle.RedSession, battle.BlueSession); err != nil {
|
||||
this.Errorln(err)
|
||||
}
|
||||
go this.friend.QiecuoFinishNotify(battle.Red.Uid, battle.Id)
|
||||
go this.practice.ChallengeResults(battle.Id, battle.Red.Uid, battle.Blue.Uid, 0)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user