| 642 | } |
| 643 | |
| 644 | void Trap::fireTrapSound(Tile& tile, const std::string& soundFamily) |
| 645 | { |
| 646 | std::string sound = "Traps/" + soundFamily; |
| 647 | for(Seat* seat : tile.getSeatsWithVision()) |
| 648 | { |
| 649 | if(seat->getPlayer() == nullptr) |
| 650 | continue; |
| 651 | if(!seat->getPlayer()->getIsHuman()) |
| 652 | continue; |
| 653 | |
| 654 | ServerNotification *serverNotification = new ServerNotification( |
| 655 | ServerNotificationType::playSpatialSound, seat->getPlayer()); |
| 656 | serverNotification->mPacket << sound << tile.getX() << tile.getY(); |
| 657 | ODServer::getSingleton().queueServerNotification(serverNotification); |
| 658 | } |
| 659 | } |
| 660 | |
| 661 | bool Trap::importTrapFromStream(Trap& trap, std::istream& is) |
| 662 | { |
nothing calls this directly
no test coverage detected