-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxStructs.h
More file actions
70 lines (61 loc) · 1.48 KB
/
Copy pathxStructs.h
File metadata and controls
70 lines (61 loc) · 1.48 KB
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
// Supported with union (c) 2020 Union team
// Union HEADER file
namespace GOTHIC_ENGINE
{
class BuffArch
{
public:
string name;
string startFX;
string endFX;
string tickFX;
};
class PlayerBuff : public zCObject
{
public:
zCLASS_UNION_DECLARATION(PlayerBuff);
string type;
BuffArch* archType;
int damage;
int damagePerSec;
int damageType;
int dmgTick;
int duration;
bool dispellable;
bool infinite;
bool permanent;
oCVisualFX* visFX;
virtual void Archive(zCArchiver& arc);
virtual void Unarchive(zCArchiver& arc);
};
zCLASS_UNION_DEFINITION(PlayerBuff, zCObject, 0, 0);
void PlayerBuff::Archive(zCArchiver& arc)
{
zCObject::Archive(arc);
arc.WriteString("type", type.ToChar());
arc.WriteInt("damage", damage);
arc.WriteInt("damagePerSec", damagePerSec);
arc.WriteInt("damageType", damageType);
arc.WriteInt("dmgTick", dmgTick);
arc.WriteInt("duration", duration);
arc.WriteInt("infinite", infinite);
arc.WriteInt("permanent", permanent);
}
void PlayerBuff::Unarchive(zCArchiver& arc)
{
zCObject::Unarchive(arc);
zSTRING buffType = "";
int infBool, permBool;
arc.ReadString("type", buffType);
arc.ReadInt("damage", damage);
arc.ReadInt("damagePerSec", damagePerSec);
arc.ReadInt("damageType", damageType);
arc.ReadInt("dmgTick", dmgTick);
arc.ReadInt("duration", duration);
arc.ReadInt("infinite", infBool);
arc.ReadInt("infinite", permBool);
type = buffType.ToChar();
infinite = infBool;
permanent = permBool;
}
}