修改了小游戏中可以切换玩法的bug
This commit is contained in:
@@ -191,6 +191,25 @@
|
||||
return isGamePlaying;
|
||||
}
|
||||
|
||||
///当前房间是否在游戏中
|
||||
- (BOOL)currentRoomIsInSudGame {
|
||||
BOOL isGamePlaying = NO;
|
||||
if (self.delegate.getRoomInfo.type == RoomType_MiniGame) {
|
||||
for (int i = -1; i<5; i++) {
|
||||
NSMutableDictionary * micQueue = self.delegate.getMicroQueue;
|
||||
MicroQueueModel *micSequence = [micQueue objectForKey:[NSString stringWithFormat:@"%d", i]];
|
||||
if (micSequence == nil || micSequence.userInfo == nil) {
|
||||
continue;
|
||||
}
|
||||
if (micSequence.userInfo.gameStatus == LittleGamePlayStatus_Plying) {
|
||||
isGamePlaying = YES;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return isGamePlaying;
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - RoomGuestDelegate
|
||||
- (void)onRoomUpdate {
|
||||
@@ -762,7 +781,7 @@
|
||||
}
|
||||
|
||||
- (void)xPRoomLittleGameListView:(XPLittleGameRoomListView *)view didSelectChooseType:(UIButton *)sender {
|
||||
if ([self isInSudGame]) {
|
||||
if ([self currentRoomIsInSudGame]) {
|
||||
[XCHUDTool showErrorWithMessage:@"游戏中不可切换游戏或玩法!"];
|
||||
} else {
|
||||
sender.selected = !sender.selected;
|
||||
|
Reference in New Issue
Block a user