diff --git a/worldsrv/scene.go b/worldsrv/scene.go index 821c86f..21e30af 100644 --- a/worldsrv/scene.go +++ b/worldsrv/scene.go @@ -952,6 +952,16 @@ func (this *Scene) ProtoPrivateRoom() *gamehall.PrivateRoomInfo { if this.GetPassword() != "" { needPassword = int32(1) } + + cost := this.sp.NeedRoomCardCost(int(this.CustomParam.GetCostType()), this.playerNum, PlatformMgrSingleton.GetConfig(this.platform.IdStr).RoomConfig[this.CustomParam.GetRoomConfigId()]) + var costItems []*gamehall.ItemInfo + for _, vv := range cost { + costItems = append(costItems, &gamehall.ItemInfo{ + Id: vv.ItemID, + Num: int32(vv.Count), + }) + } + ret := &gamehall.PrivateRoomInfo{ GameFreeId: this.dbGameFree.GetId(), GameId: int32(this.gameId), @@ -966,6 +976,7 @@ func (this *Scene) ProtoPrivateRoom() *gamehall.PrivateRoomInfo { CreateTs: this.createTime.Unix(), State: this.SceneState, CostType: this.CustomParam.GetCostType(), + Cost: costItems, } for _, v := range this.players { ret.Players = append(ret.Players, &gamehall.PrivatePlayerInfo{ @@ -980,6 +991,7 @@ func (this *Scene) ProtoPrivateRoom() *gamehall.PrivateRoomInfo { ret.WinSnId = p.SnId ret.WinName = p.GetName() ret.WinRoleId = p.Roles.ModId + ret.WinHeadUrl = p.HeadUrl } } return ret