Nano Drain, Debuffs are timed

* Nano drain power works, currently does 30% damage over a period of 3 seconds.
* Stun, Sleep and Snare powers will now run out of time on mobs.
* A few other adjustments to mob mobility.
This commit is contained in:
2020-10-17 18:26:09 +01:00
committed by Gent Semaj
parent 2782706355
commit 177c5f0f17
3 changed files with 49 additions and 19 deletions

View File

@@ -8,6 +8,7 @@
#include "contrib/JSON.hpp"
#include <map>
#include <unordered_map>
#include <queue>
enum class MobState {
@@ -27,6 +28,8 @@ struct Mob : public BaseNPC {
int spawnZ;
int level;
std::unordered_map<int32_t,time_t> unbuffTimes;
// dead
time_t killedTime = 0;
time_t regenTime;
@@ -38,11 +41,12 @@ struct Mob : public BaseNPC {
const int sightRange;
time_t nextMovement = 0;
bool staticPath = false;
int roamX, roamY, roamZ;
// combat
CNSocket *target = nullptr;
time_t nextAttack = 0;
int roamX, roamY, roamZ;
// drop
int dropType;