进入好友房
This commit is contained in:
parent
5e0b6139f9
commit
776ba8a19c
|
|
@ -169,7 +169,6 @@ const (
|
||||||
// 房间模式
|
// 房间模式
|
||||||
const (
|
const (
|
||||||
SceneMode_Public = iota //公共房间
|
SceneMode_Public = iota //公共房间
|
||||||
SceneMode_Club //俱乐部房间
|
|
||||||
SceneMode_Private //私人房间
|
SceneMode_Private //私人房间
|
||||||
SceneMode_Match //赛事房间
|
SceneMode_Match //赛事房间
|
||||||
SceneMode_Thr //三方房间
|
SceneMode_Thr //三方房间
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -615,6 +615,7 @@ message CSQueryRoomInfo{
|
||||||
repeated int32 GameIds = 1;
|
repeated int32 GameIds = 1;
|
||||||
int32 GameSite = 2; //1.初级 2.中级 3.高级
|
int32 GameSite = 2; //1.初级 2.中级 3.高级
|
||||||
repeated int32 Id = 3; //gamefreeid
|
repeated int32 Id = 3; //gamefreeid
|
||||||
|
int32 SceneMode = 4; // 0公共房 1私人房
|
||||||
}
|
}
|
||||||
|
|
||||||
//个人创建的房间信息
|
//个人创建的房间信息
|
||||||
|
|
|
||||||
2
public
2
public
|
|
@ -1 +1 @@
|
||||||
Subproject commit 2c0eb89b3a6245c8c95ff2390ad0c729b931cf24
|
Subproject commit 7f2452e10c176dc35fc5ed1ffdb0b4145aec8160
|
||||||
|
|
@ -1304,6 +1304,9 @@ func (this *CSQueryRoomInfoHandler) ProcessLocalGame(s *netlib.Session, packetid
|
||||||
pack.GameIds = append(pack.GameIds, gameid)
|
pack.GameIds = append(pack.GameIds, gameid)
|
||||||
scenes := SceneMgrSingleton.GetScenesByGame(int(gameid))
|
scenes := SceneMgrSingleton.GetScenesByGame(int(gameid))
|
||||||
for _, scene := range scenes {
|
for _, scene := range scenes {
|
||||||
|
if scene == nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
var isShow bool
|
var isShow bool
|
||||||
if mapGameCfg != nil {
|
if mapGameCfg != nil {
|
||||||
if cfg, have := mapGameCfg[scene.dbGameFree.Id]; have && cfg.GroupId != 0 && cfg.GroupId == scene.groupId {
|
if cfg, have := mapGameCfg[scene.dbGameFree.Id]; have && cfg.GroupId != 0 && cfg.GroupId == scene.groupId {
|
||||||
|
|
@ -1311,8 +1314,16 @@ func (this *CSQueryRoomInfoHandler) ProcessLocalGame(s *netlib.Session, packetid
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if p.Platform == scene.limitPlatform.IdStr || isShow {
|
if p.Platform == scene.limitPlatform.IdStr || isShow {
|
||||||
if scene != nil && scene.sceneMode == common.SceneMode_Public && len(scene.players) != 0 {
|
if scene.sceneMode == int(msg.GetSceneMode()) && len(scene.players) != 0 {
|
||||||
if scene.gameId == int(gameid) && scene.gameSite == int(msg.GetGameSite()) {
|
if scene.gameId == int(gameid) && scene.gameSite == int(msg.GetGameSite()) {
|
||||||
|
|
||||||
|
// 私人房需要是好友
|
||||||
|
if scene.sceneMode == common.SceneMode_Private {
|
||||||
|
if !FriendMgrSington.IsFriend(p.Platform, p.SnId, scene.creator) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
roomInfo := &gamehall.QRoomInfo{
|
roomInfo := &gamehall.QRoomInfo{
|
||||||
GameFreeId: proto.Int32(scene.dbGameFree.GetId()),
|
GameFreeId: proto.Int32(scene.dbGameFree.GetId()),
|
||||||
GameId: proto.Int32(scene.dbGameFree.GetGameId()),
|
GameId: proto.Int32(scene.dbGameFree.GetGameId()),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue