| 2507 | } |
| 2508 | |
| 2509 | void Creature::slap() |
| 2510 | { |
| 2511 | if(!getIsOnServerMap()) |
| 2512 | return; |
| 2513 | |
| 2514 | fireCreatureSound(CreatureSound::Slap); |
| 2515 | |
| 2516 | // In editor mode, we remove the creature |
| 2517 | if(getGameMap()->isInEditorMode()) |
| 2518 | { |
| 2519 | removeFromGameMap(); |
| 2520 | deleteYourself(); |
| 2521 | return; |
| 2522 | } |
| 2523 | |
| 2524 | CreatureEffectSlap* effect = new CreatureEffectSlap( |
| 2525 | ConfigManager::getSingleton().getSlapEffectDuration(), ""); |
| 2526 | addCreatureEffect(effect); |
| 2527 | mHp -= mMaxHP * ConfigManager::getSingleton().getSlapDamagePercent() / 100.0; |
| 2528 | computeCreatureOverlayHealthValue(); |
| 2529 | } |
| 2530 | |
| 2531 | void Creature::fireAddEntity(Seat* seat, bool async) |
| 2532 | { |
nothing calls this directly
no test coverage detected