]> git.localhorst.tv Git - l2e.git/blobdiff - src/common/Spell.cpp
added missing spell flags
[l2e.git] / src / common / Spell.cpp
index 8f8784a761ed83840f9ee6c8ad77729ca6302a68..4fce398bdaf16e534c702736b1d12d101f0362f9 100644 (file)
@@ -15,7 +15,7 @@ using loader::TypeDescription;
 namespace common {
 
 Spell::Spell()
-: name(""), value(0), cost(0), usability(0) {
+: name(""), value(0), cost(0), status(false), battle(false) {
 
 }
 
@@ -23,7 +23,7 @@ Spell::Spell()
 void Spell::CreateTypeDescription() {
        Spell s;
 
-       // TODO: flags
+       int boolId(TypeDescription::GetTypeId("Boolean"));
        int numberId(TypeDescription::GetTypeId("Number"));
        int stringId(TypeDescription::GetTypeId("String"));
        int targetsId(TypeDescription::GetTypeId("TargetingMode"));
@@ -35,6 +35,8 @@ void Spell::CreateTypeDescription() {
        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));
+       td.AddField("status", FieldDescription(((char *)&s.status) - ((char *)&s), boolId, false));
+       td.AddField("battle", FieldDescription(((char *)&s.battle) - ((char *)&s), boolId, false));
 }
 
 void Spell::Construct(void *data) {