]> git.localhorst.tv Git - l2e.git/blobdiff - src/common/Spell.cpp
added constructors for described types
[l2e.git] / src / common / Spell.cpp
index a0b3b9de82d514f679ff01daba8bccacd561b95f..8f8784a761ed83840f9ee6c8ad77729ca6302a68 100644 (file)
@@ -29,6 +29,7 @@ void Spell::CreateTypeDescription() {
        int targetsId(TypeDescription::GetTypeId("TargetingMode"));
 
        TypeDescription &td(TypeDescription::CreateOrGet("Spell"));
+       td.SetConstructor(&Construct);
        td.SetSize(sizeof(Spell));
 
        td.AddField("name", FieldDescription(((char *)&s.name) - ((char *)&s), stringId, true));
@@ -36,4 +37,8 @@ void Spell::CreateTypeDescription() {
        td.AddField("targets", FieldDescription(((char *)&s.targetingMode) - ((char *)&s), targetsId, false));
 }
 
+void Spell::Construct(void *data) {
+       new (data) Spell;
+}
+
 }