MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / fireSpellSound

Method fireSpellSound

source/spells/Spell.cpp:186–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184}
185
186void Spell::fireSpellSound(Tile& tile, const std::string& soundFamily)
187{
188 std::string sound = "Spells/" + soundFamily;
189 for(Seat* seat : tile.getSeatsWithVision())
190 {
191 if(seat->getPlayer() == nullptr)
192 continue;
193 if(!seat->getPlayer()->getIsHuman())
194 continue;
195
196 ServerNotification *serverNotification = new ServerNotification(
197 ServerNotificationType::playSpatialSound, seat->getPlayer());
198 serverNotification->mPacket << sound << tile.getX() << tile.getY();
199 ODServer::getSingleton().queueServerNotification(serverNotification);
200 }
201}
202
203void Spell::exportHeadersToStream(std::ostream& os) const
204{

Callers

nothing calls this directly

Calls 5

getIsHumanMethod · 0.80
getPlayerMethod · 0.45
getXMethod · 0.45
getYMethod · 0.45

Tested by

no test coverage detected