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

Function getTargetEntity

Projects/CoX/Servers/MapServer/SlashCommand.cpp:319–333  ·  view source on GitHub ↗

* Helper Functions ***********************************************************/

Source from the content-addressed store, hash-verified

317 * Helper Functions
318 ***********************************************************/
319static Entity* getTargetEntity(MapClientSession& sess)
320{
321 if(sess.m_ent == nullptr)
322 {
323 return nullptr;
324 }
325
326 const uint32_t idx = getTargetIdx(*sess.m_ent);
327 if(idx == 0)
328 {
329 return nullptr;
330 }
331
332 return getEntity(&sess, idx);
333}
334
335// Get the specified entity or current target if no entity is specified
336static Entity* getEntityFromName(const QString &param, MapClientSession& sess)

Callers 2

getEntityFromNameFunction · 0.85
cmdHandler_UnfriendFunction · 0.85

Calls 2

getTargetIdxFunction · 0.85
getEntityFunction · 0.85

Tested by

no test coverage detected