fix:房间列表变更房费信息
This commit is contained in:
parent
06c6284116
commit
e39a231a51
|
@ -952,6 +952,16 @@ func (this *Scene) ProtoPrivateRoom() *gamehall.PrivateRoomInfo {
|
||||||
if this.GetPassword() != "" {
|
if this.GetPassword() != "" {
|
||||||
needPassword = int32(1)
|
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{
|
ret := &gamehall.PrivateRoomInfo{
|
||||||
GameFreeId: this.dbGameFree.GetId(),
|
GameFreeId: this.dbGameFree.GetId(),
|
||||||
GameId: int32(this.gameId),
|
GameId: int32(this.gameId),
|
||||||
|
@ -966,6 +976,7 @@ func (this *Scene) ProtoPrivateRoom() *gamehall.PrivateRoomInfo {
|
||||||
CreateTs: this.createTime.Unix(),
|
CreateTs: this.createTime.Unix(),
|
||||||
State: this.SceneState,
|
State: this.SceneState,
|
||||||
CostType: this.CustomParam.GetCostType(),
|
CostType: this.CustomParam.GetCostType(),
|
||||||
|
Cost: costItems,
|
||||||
}
|
}
|
||||||
for _, v := range this.players {
|
for _, v := range this.players {
|
||||||
ret.Players = append(ret.Players, &gamehall.PrivatePlayerInfo{
|
ret.Players = append(ret.Players, &gamehall.PrivatePlayerInfo{
|
||||||
|
@ -980,6 +991,7 @@ func (this *Scene) ProtoPrivateRoom() *gamehall.PrivateRoomInfo {
|
||||||
ret.WinSnId = p.SnId
|
ret.WinSnId = p.SnId
|
||||||
ret.WinName = p.GetName()
|
ret.WinName = p.GetName()
|
||||||
ret.WinRoleId = p.Roles.ModId
|
ret.WinRoleId = p.Roles.ModId
|
||||||
|
ret.WinHeadUrl = p.HeadUrl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ret
|
return ret
|
||||||
|
|
Loading…
Reference in New Issue