Skip to content
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.

Commit

Permalink
Merge pull request #227 from ayust/add_victim_coordinates
Browse files Browse the repository at this point in the history
Add x,y,z coordinates to killmail victims
  • Loading branch information
ayust committed Nov 4, 2015
2 parents f20886a + 5d2ce5e commit 013b9a1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
3 changes: 3 additions & 0 deletions evelink/parsing/kills.py
Expand Up @@ -32,6 +32,9 @@ def parse_kills(api_result):
},
'damage': int(a['damageTaken']),
'ship_type_id': int(a['shipTypeID']),
'x': float(a['x']),
'y': float(a['y']),
'z': float(a['z']),
}

result[kill_id]['attackers'] = {}
Expand Down
12 changes: 10 additions & 2 deletions tests/parsing/test_kills.py
Expand Up @@ -52,7 +52,11 @@ def test_parse_kills(self):
'name': ''},
'id': 150080271,
'name': 'Pilot 333',
'ship_type_id': 670}},
'ship_type_id': 670,
'x': 0.0,
'y': 0.0,
'z': 0.0,
}},
15640551: {
'attackers': {
935091361: {
Expand Down Expand Up @@ -100,5 +104,9 @@ def test_parse_kills(self):
'name': ''},
'id': 150080271,
'name': 'Pilot 333',
'ship_type_id': 670}}
'ship_type_id': 670,
'x': 1.4,
'y': -20.0,
'z': 3000.0,
}},
})
4 changes: 2 additions & 2 deletions tests/xml/char/kills.xml
Expand Up @@ -5,7 +5,7 @@
corporationID="1254875843" corporationName="Starbase Anchoring Corp"
allianceID="1254074" allianceName="EVE Gurus"
factionID="0" factionName="" damageTaken="446"
shipTypeID="670" />
shipTypeID="670" x="1.4" y="-20.0" z="3000" />
<rowset name="attackers">
<row characterID="935091361" characterName="ICU123"
corporationID="224588600" corporationName="Inkblot Squad"
Expand Down Expand Up @@ -49,7 +49,7 @@
corporationID="1254875843" corporationName="Starbase Anchoring Corp"
allianceID="1254074" allianceName="EVE Gurus"
factionID="0" factionName="" damageTaken="446"
shipTypeID="670" />
shipTypeID="670" x="0" y="0" z="0" />
<rowset name="attackers">
<row characterID="935091361" characterName="ICU123"
corporationID="224588600" corporationName="Inkblot Squad"
Expand Down

0 comments on commit 013b9a1

Please sign in to comment.