]> git.localhorst.tv Git - l2e.git/blobdiff - src/common/Ikari.cpp
removed stupid file headers that eclipse put in
[l2e.git] / src / common / Ikari.cpp
index fb3767e8a43be63a0a19321e95b3533a2186df38..394d1718a25b019916b9cb0ecda51e5e226ef615 100644 (file)
@@ -1,18 +1,40 @@
-/*
- * Ikari.cpp
- *
- *  Created on: Aug 10, 2012
- *      Author: holy
- */
-
 #include "Ikari.h"
 
+#include "TargetingMode.h"
+#include "../loader/Interpreter.h"
+#include "../loader/TypeDescription.h"
+
+using loader::FieldDescription;
+using loader::Interpreter;
+using loader::TypeDescription;
+
 namespace common {
 
 Ikari::Ikari()
 : name("")
-, cost(0) {
+, cost(0)
+, isPhysical(false) {
+
+}
+
+
+void Ikari::CreateTypeDescription() {
+       Ikari i;
+
+       TypeDescription &td(TypeDescription::Create(TYPE_ID, "Ikari"));
+       td.SetDescription(
+                       "Information of a single ikari attack.");
+       td.SetConstructor(&Construct);
+       td.SetSize(sizeof(Ikari));
+
+       td.AddField("name", FieldDescription(((char *)&i.name) - ((char *)&i), Interpreter::STRING_ID).SetReferenced().SetDescription("the attack's name"));
+       td.AddField("cost", FieldDescription(((char *)&i.cost) - ((char *)&i), Interpreter::NUMBER_ID).SetDescription("amount of ikari points needed and deducted for use"));
+       td.AddField("targets", FieldDescription(((char *)&i.targetingMode) - ((char *)&i), TargetingMode::TYPE_ID).SetDescription("how target selection is to be performed"));
+       td.AddField("type", FieldDescription(((char *)&i.isPhysical) - ((char *)&i), Interpreter::BOOLEAN_ID).SetDescription("if the attack is physical (true) or magical(false)"));
+}
 
+void Ikari::Construct(void *data) {
+       new (data) Ikari;
 }
 
 }