forked from InfiniteRasa/Game-Server
-
Notifications
You must be signed in to change notification settings - Fork 1
/
actor.h
82 lines (75 loc) · 1.79 KB
/
actor.h
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#include"gameEffects.h"
typedef struct
{
uint32 classId;
uint32 hue;
}actorAppearanceData_t;
/*
* Central structure used to store any kind of NPC/creature/player attribute
* Note that even creatures have attributes like body, mind and spirit since they inherit from the actor class.
*/
typedef struct
{
sint32 level;
// regen rate
sint32 regenRateCurrentMax;
sint32 regenRateNormalMax; // regen rate without bonus
float regenHealthPerSecond; // health regen per second
// health
sint32 healthCurrent;
sint32 healthCurrentMax;
sint32 healthNormalMax;
// body
sint32 bodyCurrent;
sint32 bodyCurrentMax;
sint32 bodyNormalMax;
// mind
sint32 mindCurrent;
sint32 mindCurrentMax;
sint32 mindNormalMax;
// spirit
sint32 spiritCurrent;
sint32 spiritCurrentMax;
sint32 spiritNormalMax;
// chi/power
sint32 chiCurrent;
sint32 chiCurrentMax;
sint32 chiNormalMax;
// todo: Regeneration rates
}actorStats_t;
/*
BODY = 1
MIND = 2
SPIRIT = 3
HEALTH = 4
CHI = 5
POWER = 6
AWARE = 7
ARMOR = 8
SPEED = 9
REGEN = 10
*/
typedef struct _actor_t
{
sint32 entityId;
sint32 entityClassId;
sint8 name[64];
sint8 family[64];
actorStats_t stats;
// actorAppearanceData_t appearanceData[21]; // should move this to manifestation and npc structure? Is this used by creatures?
float posX;
float posY;
float posZ;
float rotation;
//sint32 attackstyle;
//sint32 actionid;
bool isRunning;
bool inCombatMode;
mapCellLocation_t cellLocation;
gameEffect_t *activeEffects;
sint8 state;
// sometimes we only have access to the actor, the owner variable allows us to access the client anyway (only if actor is a player manifestation)
mapChannelClient_t* owner;
}actor_t;
#define ACTOR_STATE_ALIVE 0
#define ACTOR_STATE_DEAD 1