预创建房间

This commit is contained in:
sk 2024-05-28 09:58:18 +08:00
parent 8b478a9f33
commit 60255489d5
2 changed files with 4 additions and 1 deletions

View File

@ -2158,6 +2158,7 @@ func (this *Scene) TryBillExGameDrop(p *Player) {
pack := &player.SCGameExDropItems{}
pack.Items = make(map[int32]int32)
for id, num := range realDrop {
remark := fmt.Sprintf("游戏掉落%v", id)
pack.Items[id] = proto.Int32(num)
itemData := srvdata.PBDB_GameItemMgr.GetData(id)
if itemData != nil {
@ -2169,7 +2170,7 @@ func (this *Scene) TryBillExGameDrop(p *Player) {
ItemId: itemData.Id,
ItemName: itemData.Name,
Count: int64(num),
Remark: "tienlen游戏掉落",
Remark: remark,
TypeId: common.GainWay_Game,
GameId: int64(this.GameId),
GameFreeId: int64(this.GetGameFreeId()),

View File

@ -405,6 +405,7 @@ func (csm *CoinSceneMgr) StartChangeCoinSceneTransact(p *Player, id int32, exclu
// 1.模块启动后触发
// 2.游戏服建立连接后触发
// 3.房间解散后触发
// 4.场次配置更新后
func (csm *CoinSceneMgr) TouchCreateRoom(platform string, gameFreeId int32) {
gf := PlatformMgrSingleton.GetGameFree(platform, gameFreeId)
if gf.Status && gf.DbGameFree.GetCreateRoomNum() > 0 {
@ -506,6 +507,7 @@ func (this *CoinSceneMgr) OnPlatformGameFreeUpdate(p *Platform, oldCfg, newCfg *
}
srvlib.ServerSessionMgrSington.Broadcast(int(server_proto.SSPacketID_PACKET_WG_GRACE_DESTROYSCENE),
pack, common.GetSelfAreaId(), srvlib.GameServerType)
this.TouchCreateRoom(p.IdStr, newCfg.DbGameFree.Id)
}
}