]> git.localhorst.tv Git - l2e.git/blob - src/common/TargetingMode.cpp
removed stupid file headers that eclipse put in
[l2e.git] / src / common / TargetingMode.cpp
1 #include "TargetingMode.h"
2
3 #include "../loader/Interpreter.h"
4 #include "../loader/TypeDescription.h"
5
6 using loader::FieldDescription;
7 using loader::Interpreter;
8 using loader::TypeDescription;
9
10 namespace common {
11
12 void TargetingMode::CreateTypeDescription() {
13         TargetingMode t;
14
15         TypeDescription &td(TypeDescription::Create(TYPE_ID, "TargetingMode"));
16         td.SetDescription("Specifies how selection of a target (e.g. for a spell) is performed.");
17         td.SetConstructor(&Construct);
18         td.SetSize(sizeof(TargetingMode));
19
20         td.AddField("faction", FieldDescription(((char *)&t.ally) - ((char *)&t), Interpreter::BOOLEAN_ID).SetDescription("targetted faction; true for ally, false for enemy"));
21         td.AddField("mode", FieldDescription(((char *)&t.mode) - ((char *)&t), Interpreter::NUMBER_ID).SetDescription("attack mode; 0 = all, 1 = multiple, 2 = single"));
22 }
23
24 void TargetingMode::Construct(void *data) {
25         new (data) TargetingMode;
26 }
27
28 }