| 1719 | } |
| 1720 | |
| 1721 | void Creature::computeVisualDebugEntities() |
| 1722 | { |
| 1723 | if(!getIsOnServerMap()) |
| 1724 | return; |
| 1725 | |
| 1726 | mHasVisualDebuggingEntities = true; |
| 1727 | |
| 1728 | updateTilesInSight(); |
| 1729 | |
| 1730 | ServerNotification *serverNotification = new ServerNotification( |
| 1731 | ServerNotificationType::refreshCreatureVisDebug, nullptr); |
| 1732 | |
| 1733 | const std::string& name = getName(); |
| 1734 | serverNotification->mPacket << name; |
| 1735 | serverNotification->mPacket << true; |
| 1736 | if(getIsOnMap()) |
| 1737 | { |
| 1738 | uint32_t nbTiles = mVisibleTiles.size(); |
| 1739 | serverNotification->mPacket << nbTiles; |
| 1740 | |
| 1741 | for (Tile* tile : mVisibleTiles) |
| 1742 | getGameMap()->tileToPacket(serverNotification->mPacket, tile); |
| 1743 | } |
| 1744 | else |
| 1745 | { |
| 1746 | uint32_t nbTiles = 0; |
| 1747 | serverNotification->mPacket << nbTiles; |
| 1748 | } |
| 1749 | |
| 1750 | ODServer::getSingleton().queueServerNotification(serverNotification); |
| 1751 | } |
| 1752 | |
| 1753 | void Creature::refreshVisualDebugEntities(const std::vector<Tile*>& tiles) |
| 1754 | { |
no test coverage detected