blob: cdb44b61b7915f6c19ac4746305cf2cd2db169e1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
#pragma once
using namespace std;
#include "FlyingMob.h"
#include "Enemy.h"
class GhastClass;
class Level;
class Ghast : public FlyingMob, public Enemy
{
public:
eINSTANCEOF GetType() { return eTYPE_GHAST; }
static Entity *create(Level *level) { return new Ghast(level); }
private:
static const int DATA_IS_CHARGING = 16;
public:
int floatDuration;
double xTarget, yTarget, zTarget;
private:
shared_ptr<Entity> target;
int retargetTime;
public:
int oCharge;
int charge;
private:
void _init();
public:
Ghast(Level *level);
virtual bool hurt(DamageSource *source, int dmg);
protected:
virtual void defineSynchedData();
public:
int getMaxHealth();
public:
virtual void tick();
protected:
virtual void serverAiStep();
private:
virtual bool canReach(double xt, double yt, double zt, double dist);
protected:
virtual int getAmbientSound();
virtual int getHurtSound();
virtual int getDeathSound();
virtual int getDeathLoot();
virtual void dropDeathLoot(bool wasKilledByPlayer, int playerBonusLevel);
virtual float getSoundVolume();
public:
virtual bool canSpawn();
virtual int getMaxSpawnClusterSize();
};
|