diff options
author | Philipp Sehmisch <mana@crushnet.org> | 2010-05-29 15:28:45 +0200 |
---|---|---|
committer | Philipp Sehmisch <mana@crushnet.org> | 2010-05-29 15:28:45 +0200 |
commit | b74b181556b9c8e166cb399ef62ce4de76f29883 (patch) | |
tree | eccfbdabf35791d7789c8d332798633e579c36ff /src | |
parent | 32018c0b78bd5408ec5032ac5960a2b640ed89f9 (diff) | |
download | manaserv-b74b181556b9c8e166cb399ef62ce4de76f29883.tar.gz manaserv-b74b181556b9c8e166cb399ef62ce4de76f29883.tar.xz manaserv-b74b181556b9c8e166cb399ef62ce4de76f29883.zip |
Made disabling of HP regeneration during combat configurable
Reviewed-by: Bertram
Diffstat (limited to 'src')
-rw-r--r-- | src/game-server/being.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/game-server/being.cpp b/src/game-server/being.cpp index fc909c0..0e885de 100644 --- a/src/game-server/being.cpp +++ b/src/game-server/being.cpp @@ -23,6 +23,7 @@ #include "game-server/being.hpp" #include "defines.h" +#include "common/configuration.hpp" #include "game-server/collisiondetection.hpp" #include "game-server/eventlistener.hpp" #include "game-server/mapcomposite.hpp" @@ -92,7 +93,7 @@ int Being::damage(Actor *, const Damage &damage) LOG_DEBUG("Being " << getPublicID() << " suffered "<<HPloss<<" damage. HP: "<<HP.base + HP.mod<<"/"<<HP.base); HP.mod -= HPloss; modifiedAttribute(BASE_ATTR_HP); - setTimerSoft(T_B_HP_REGEN, 50); // no HP regen for 5 seconds after being hit + setTimerSoft(T_B_HP_REGEN, Configuration::getValue("hpRegenBreakAfterHit", 0)); // no HP regen after being hit } else { HPloss = 0; } |