竞技馆列表刷新
This commit is contained in:
parent
0fc4b33aa4
commit
fc2db94c86
Binary file not shown.
BIN
data/DB_Task.dat
BIN
data/DB_Task.dat
Binary file not shown.
|
@ -406,7 +406,19 @@ func (cm *ConfigMgr) UpdateRoomConfig(data *webapi.RoomConfig) {
|
|||
if d == nil {
|
||||
d = make([]*webapi.RoomConfig, 0)
|
||||
}
|
||||
d = append(d, data)
|
||||
|
||||
has := false
|
||||
for k, v := range d {
|
||||
if v.GetId() == data.GetId() {
|
||||
d[k] = data
|
||||
has = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if !has {
|
||||
d = append(d, data)
|
||||
}
|
||||
|
||||
cm.GetConfig(data.GetPlatform()).RoomTypeMap[data.GetRoomType()] = d
|
||||
}
|
||||
|
||||
|
@ -414,12 +426,11 @@ func (cm *ConfigMgr) DelRoomConfig(plt string, id int32) {
|
|||
d := cm.GetConfig(plt).RoomConfig[id]
|
||||
if d != nil {
|
||||
b := cm.GetConfig(plt).RoomTypeMap[d.GetRoomType()]
|
||||
if b != nil {
|
||||
for i, v := range b {
|
||||
if v.GetId() == id {
|
||||
b = append(b[:i], b[i+1:]...)
|
||||
cm.GetConfig(plt).RoomTypeMap[d.GetRoomType()] = b
|
||||
}
|
||||
for i, v := range b {
|
||||
if v.GetId() == id {
|
||||
b = append(b[:i], b[i+1:]...)
|
||||
cm.GetConfig(plt).RoomTypeMap[d.GetRoomType()] = b
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
2
public
2
public
|
@ -1 +1 @@
|
|||
Subproject commit 00b9fce886af5b6a926aa804d3cad33be9ea0793
|
||||
Subproject commit 9d355215710228e4481fc6334f6e14b902a03e95
|
|
@ -141,7 +141,6 @@ func NewScene(args *CreateSceneParam) *Scene {
|
|||
if s.CustomParam == nil {
|
||||
s.CustomParam = new(serverproto.CustomParam)
|
||||
}
|
||||
s.sp.OnStart(s)
|
||||
return s
|
||||
}
|
||||
|
||||
|
|
|
@ -413,6 +413,7 @@ func (m *SceneMgr) CreateScene(args *CreateSceneParam) *Scene {
|
|||
return nil
|
||||
}
|
||||
m.scenes[args.RoomId] = s
|
||||
s.sp.OnStart(s)
|
||||
// 添加到游戏服记录中
|
||||
args.GS.AddScene(&AddSceneParam{
|
||||
S: s,
|
||||
|
|
Loading…
Reference in New Issue