MCPcopy Create free account
hub / github.com/Segs/Segs / on_entity_info_request

Method on_entity_info_request

Projects/CoX/Servers/MapServer/MapInstance.cpp:2294–2309  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2292}
2293
2294void MapInstance::on_entity_info_request(EntityInfoRequest * ev)
2295{
2296 MapClientSession &session(m_session_store.session_from_event(ev));
2297
2298 Entity *tgt = getEntity(&session,ev->entity_idx);
2299 if(tgt == nullptr)
2300 {
2301 qCDebug(logMapEvents) << "No target active, doing nothing";
2302 return;
2303 }
2304
2305 QString description = getDescription(*tgt->m_char);
2306
2307 session.addCommandToSendNextUpdate(std::make_unique<EntityInfoResponse>(description));
2308 qCDebug(logDescription) << "Entity info requested" << ev->entity_idx << description;
2309}
2310
2311void MapInstance::on_client_options(SaveClientOptions * ev)
2312{

Callers

nothing calls this directly

Calls 2

getEntityFunction · 0.85

Tested by

no test coverage detected