竞技馆读取后台配置
This commit is contained in:
parent
ac86a5e294
commit
9c1fed84e9
|
|
@ -93,6 +93,10 @@ func init() {
|
|||
etcd.Register(etcd.ETCDKEY_MatchAudience, webapi.MatchAudience{}, handlerEvent)
|
||||
// 小精灵配置
|
||||
etcd.Register(etcd.ETCDKEY_Spirit, webapi.SpiritConfig{}, platformConfigEvent)
|
||||
// 竞技馆房间配置
|
||||
etcd.Register(etcd.ETCDKEY_RoomConfig, webapi.RoomConfig{}, handlerEvent)
|
||||
// 竞技馆房间类型配置
|
||||
etcd.Register(etcd.ETCDKEY_RoomType, webapi.RoomType{}, handlerEvent)
|
||||
}
|
||||
|
||||
func platformConfigEvent(ctx context.Context, completeKey string, isInit bool, event *clientv3.Event, data interface{}) {
|
||||
|
|
|
|||
|
|
@ -514,8 +514,6 @@ func (this *Scene) lastScene(p *Player) {
|
|||
}
|
||||
|
||||
func (this *Scene) DelPlayer(p *Player) bool {
|
||||
FirePlayerLeaveScene(p, this)
|
||||
this.sp.OnPlayerLeave(this, p)
|
||||
if p.scene != this {
|
||||
roomId := 0
|
||||
if p.scene != nil {
|
||||
|
|
@ -556,6 +554,8 @@ func (this *Scene) DelPlayer(p *Player) bool {
|
|||
if !p.IsRob {
|
||||
this.lastTime = time.Now()
|
||||
}
|
||||
FirePlayerLeaveScene(p, this)
|
||||
this.sp.OnPlayerLeave(this, p)
|
||||
return true
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue