blob: d24edd85f367f3193605d05d65e6d3b50db0c05e (
plain) (
blame)
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
83
84
85
86
87
88
89
90
|
#ifndef TIBIA_MAGIC_HH_
#define TIBIA_MAGIC_HH_ 1
#include "common.hh"
struct TCreature;
struct TImpact{
// VIRTUAL FUNCTIONS
// =========================================================================
virtual void handleField(int a, int b, int c); // VTABLE[0]
virtual void handleCreature(TCreature *Victim); // VTABLE[1]
virtual bool isAggressive(void); // VTABLE[2]
// DATA
// =========================================================================
//void *VTABLE; // IMPLICIT
};
#if 0
struct TSummonImpact {
TImpact super_TImpact; // INHERITANCE?
TCreature *Actor;
int Race;
int Maximum;
};
struct TSpeedImpact {
TImpact super_TImpact; // INHERITANCE?
TCreature *Actor;
int Percent;
int Duration;
};
struct THealingImpact {
TImpact super_TImpact; // INHERITANCE?
TCreature *Actor;
int Power;
};
struct TOutfitImpact {
TImpact super_TImpact; // INHERITANCE?
TCreature *Actor;
TOutfit Outfit;
int Duration;
};
struct TFieldImpact {
TImpact super_TImpact; // INHERITANCE?
TCreature *Actor;
int FieldType;
};
struct TDrunkenImpact {
TImpact super_TImpact; // INHERITANCE?
TCreature *Actor;
int Power;
int Duration;
};
struct TStrengthImpact {
TImpact super_TImpact; // INHERITANCE?
TCreature *Actor;
int Skills;
int Percent;
int Duration;
};
#endif
struct TDamageImpact: TImpact{
// REGULAR FUNCTIONS
// =========================================================================
TDamageImpact(TCreature *Actor, int DamageType, int Power, bool AllowDefense);
// VIRTUAL FUNCTIONS
// =========================================================================
void handleCreature(TCreature *Victim) override;
// DATA
// =========================================================================
// TImpact super_TImpact; // IMPLICIT
TCreature *Actor;
int DamageType;
int Power;
bool AllowDefense;
};
void CheckMana(TCreature *Creature, int ManaPoints, int SoulPoints, int Delay);
#endif //TIBIA_MAGIC_HH_
|