X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcommon%2FSpell.cpp;h=a0b3b9de82d514f679ff01daba8bccacd561b95f;hb=46d158b25b842d2ec4b9734af09ca6006c934498;hp=907034645b76373b3961340614b988cc6007bbbe;hpb=ac3755adc509404528ef7de58695bf8e3bfb7dcd;p=l2e.git diff --git a/src/common/Spell.cpp b/src/common/Spell.cpp index 9070346..a0b3b9d 100644 --- a/src/common/Spell.cpp +++ b/src/common/Spell.cpp @@ -22,15 +22,15 @@ Spell::Spell() void Spell::CreateTypeDescription() { Spell s; - TypeDescription &td(TypeDescription::CreateOrGet("Spell")); - - td.SetSize(sizeof(Spell)); // TODO: flags int numberId(TypeDescription::GetTypeId("Number")); int stringId(TypeDescription::GetTypeId("String")); int targetsId(TypeDescription::GetTypeId("TargetingMode")); + TypeDescription &td(TypeDescription::CreateOrGet("Spell")); + td.SetSize(sizeof(Spell)); + td.AddField("name", FieldDescription(((char *)&s.name) - ((char *)&s), stringId, true)); td.AddField("cost", FieldDescription(((char *)&s.cost) - ((char *)&s), numberId, false)); td.AddField("targets", FieldDescription(((char *)&s.targetingMode) - ((char *)&s), targetsId, false));