The Sleep, Stun and Snare powers now affect mobs.

They currently don't expire after a set amount of time.
Attacking a sleeping monster does wake it up, but doesn't remove the
debuff status client-side yet.
This commit is contained in:
2020-09-22 22:22:10 +02:00
parent 95a79ec815
commit c722044bf5
3 changed files with 27 additions and 3 deletions

View File

@@ -20,6 +20,7 @@ enum class MobState {
struct Mob : public BaseNPC {
MobState state;
const int maxHealth;
time_t killedTime = 0;
const int regenTime;
bool despawned = false; // for the sake of death animations
@@ -42,6 +43,8 @@ struct Mob : public BaseNPC {
spawnY = appearanceData.iY;
spawnZ = appearanceData.iZ;
appearanceData.iConditionBitFlag = 0;
// NOTE: there appear to be discrepancies in the dump
appearanceData.iHP = maxHealth;
}