diff options
-rw-r--r-- | DumpSource.cpp | 6 | ||||
-rw-r--r-- | Killmail.h | 8 | ||||
-rw-r--r-- | Location.h | 9 | ||||
-rw-r--r-- | Owner.h | 8 | ||||
-rw-r--r-- | Ship.h | 8 |
5 files changed, 13 insertions, 26 deletions
diff --git a/DumpSource.cpp b/DumpSource.cpp index f20ce0f..b80be2f 100644 --- a/DumpSource.cpp +++ b/DumpSource.cpp @@ -53,6 +53,12 @@ from_json(const json& j, tm& d) void from_json(const json& j, Killmail& km) { + j.at("solar_system_id").get_to(km.location); + j.at("victim").at("ship_type_id").get_to(km.ship); j.at("victim").at("position").get_to(km.position); + j.at("victim").at("character_id").get_to(km.owner.character); + j.at("victim").at("corporation_id").get_to(km.owner.corporation); + j.at("victim").at("alliance_id").get_to(km.owner.alliance); + j.at("victim").at("faction_id").get_to(km.owner.faction); j.at("killmail_time").get_to(km.time); } @@ -2,17 +2,15 @@ #include <ctime> -#include "Location.h" #include "LongVector3.h" #include "Owner.h" -#include "Ship.h" struct Killmail { - Location location; - Owner owner; - Ship ship; + long int location; + long int ship; LongVector3 position; + Owner owner; std::tm time; }; diff --git a/Location.h b/Location.h deleted file mode 100644 index dbbb27b..0000000 --- a/Location.h +++ /dev/null @@ -1,9 +0,0 @@ -#pragma once - - -struct Location -{ - const char* system; - const char* constellation; - const char* region; -}; @@ -3,8 +3,8 @@ struct Owner { - const char* character; - const char* corporation; - const char* alliance; - const char* faction; + long int character; + long int corporation; + long int alliance; + long int faction; }; @@ -1,8 +0,0 @@ -#pragma once - - -struct Ship -{ - const char* name; - const char* icon; -}; |