| 704 | } |
| 705 | |
| 706 | void Seat::refreshSeatVisualDebug() |
| 707 | { |
| 708 | int seatId = getId(); |
| 709 | if(mIsDebuggingVision) |
| 710 | { |
| 711 | std::vector<Tile*> tiles; |
| 712 | int xMax = static_cast<int>(mTilesStates.size()); |
| 713 | for(int xxx = 0; xxx < xMax; ++xxx) |
| 714 | { |
| 715 | int yMax = static_cast<int>(mTilesStates[xxx].size()); |
| 716 | for(int yyy = 0; yyy < yMax; ++yyy) |
| 717 | { |
| 718 | if(!mTilesStates[xxx][yyy].mVisionTurnCurrent) |
| 719 | continue; |
| 720 | |
| 721 | Tile* tile = mGameMap->getTile(xxx, yyy); |
| 722 | tiles.push_back(tile); |
| 723 | } |
| 724 | } |
| 725 | uint32_t nbTiles = tiles.size(); |
| 726 | ServerNotification *serverNotification = new ServerNotification( |
| 727 | ServerNotificationType::refreshSeatVisDebug, nullptr); |
| 728 | serverNotification->mPacket << seatId; |
| 729 | serverNotification->mPacket << true; |
| 730 | serverNotification->mPacket << nbTiles; |
| 731 | for(Tile* tile : tiles) |
| 732 | { |
| 733 | mGameMap->tileToPacket(serverNotification->mPacket, tile); |
| 734 | } |
| 735 | ODServer::getSingleton().queueServerNotification(serverNotification); |
| 736 | } |
| 737 | else |
| 738 | { |
| 739 | ServerNotification *serverNotification = new ServerNotification( |
| 740 | ServerNotificationType::refreshSeatVisDebug, nullptr); |
| 741 | serverNotification->mPacket << seatId; |
| 742 | serverNotification->mPacket << false; |
| 743 | ODServer::getSingleton().queueServerNotification(serverNotification); |
| 744 | } |
| 745 | } |
| 746 | |
| 747 | void Seat::sendVisibleTiles() |
| 748 | { |
no test coverage detected