* Send the admin some information about a company. * @param c The company to send the information about. */
| 319 | * @param c The company to send the information about. |
| 320 | */ |
| 321 | NetworkRecvStatus ServerNetworkAdminSocketHandler::SendCompanyInfo(const Company *c) |
| 322 | { |
| 323 | auto p = std::make_unique<Packet>(this, ADMIN_PACKET_SERVER_COMPANY_INFO); |
| 324 | |
| 325 | p->Send_uint8 (c->index); |
| 326 | p->Send_string(GetString(STR_COMPANY_NAME, c->index)); |
| 327 | p->Send_string(GetString(STR_PRESIDENT_NAME, c->index)); |
| 328 | p->Send_uint8 (c->colour); |
| 329 | p->Send_bool (true); |
| 330 | p->Send_uint32(c->inaugurated_year.base()); |
| 331 | p->Send_bool (c->is_ai); |
| 332 | p->Send_uint8 (CeilDiv(c->months_of_bankruptcy, 3)); // send as quarters_of_bankruptcy |
| 333 | |
| 334 | this->SendPacket(std::move(p)); |
| 335 | |
| 336 | return NETWORK_RECV_STATUS_OKAY; |
| 337 | } |
| 338 | |
| 339 | |
| 340 | /** |
no test coverage detected