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

Method fireRefresh

source/entities/BuildingObject.cpp:118–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116}
117
118void BuildingObject::fireRefresh()
119{
120 for(Seat* seat : mSeatsWithVisionNotified)
121 {
122 if(seat->getPlayer() == nullptr)
123 continue;
124 if(!seat->getPlayer()->getIsHuman())
125 continue;
126
127 const std::string& name = getName();
128 ServerNotification *serverNotification = new ServerNotification(
129 ServerNotificationType::entitiesRefresh, seat->getPlayer());
130 uint32_t nb = 1;
131 GameEntityType entityType = getObjectType();
132 serverNotification->mPacket << nb;
133 serverNotification->mPacket << entityType;
134 serverNotification->mPacket << name;
135 exportToPacketForUpdate(serverNotification->mPacket, seat);
136 ODServer::getSingleton().queueServerNotification(serverNotification);
137 }
138}

Callers 1

useRoomMethod · 0.80

Calls 3

getIsHumanMethod · 0.80
getPlayerMethod · 0.45

Tested by

no test coverage detected