X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fcommon%2FSpell.cpp;h=8f8784a761ed83840f9ee6c8ad77729ca6302a68;hb=b02da898c7c8a08141df4e797774a61cf5e0163f;hp=a0b3b9de82d514f679ff01daba8bccacd561b95f;hpb=be7b4addf295d6193ba2527cdd17cdb524339aed;p=l2e.git diff --git a/src/common/Spell.cpp b/src/common/Spell.cpp index a0b3b9d..8f8784a 100644 --- a/src/common/Spell.cpp +++ b/src/common/Spell.cpp @@ -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; +} + }