* Helper Functions ***********************************************************/
| 317 | * Helper Functions |
| 318 | ***********************************************************/ |
| 319 | static 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 |
| 336 | static Entity* getEntityFromName(const QString ¶m, MapClientSession& sess) |
no test coverage detected