X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2FMonster.cpp;h=7cb4185f13209bf31cc327051718a3034dd5d004;hb=b02da898c7c8a08141df4e797774a61cf5e0163f;hp=dd653383a5151132777e1f6ef6ddb6fb568e680f;hpb=46d158b25b842d2ec4b9734af09ca6006c934498;p=l2e.git diff --git a/src/battle/Monster.cpp b/src/battle/Monster.cpp index dd65338..7cb4185 100644 --- a/src/battle/Monster.cpp +++ b/src/battle/Monster.cpp @@ -62,6 +62,7 @@ void Monster::CreateTypeDescription() { int stringId(TypeDescription::GetTypeId("String")); TypeDescription &td(TypeDescription::CreateOrGet("Monster")); + td.SetConstructor(&Construct); td.SetSize(sizeof(Monster)); td.AddField("name", FieldDescription(((char *)&m.name) - ((char *)&m), stringId, true)); @@ -79,4 +80,8 @@ void Monster::CreateTypeDescription() { td.AddField("meleeAnimation", FieldDescription(((char *)&m.meleeAnimation) - ((char *)&m), animationId, true)); } +void Monster::Construct(void *data) { + new (data) Monster; +} + }