From 77ac6801a7aad6df47f3afb637399b13894f4e0d Mon Sep 17 00:00:00 2001 From: Darin McBride Date: Tue, 1 Dec 2015 09:46:44 -0700 Subject: [PATCH] Station incoming should show your incoming as your own. Not station owner's incoming as your own and yours as allied. --- lib/Lacuna/DB/Result/Map/Body/Planet.pm | 6 +++--- lib/Lacuna/RPC.pm | 2 +- var/www/public/changes.txt | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/Lacuna/DB/Result/Map/Body/Planet.pm b/lib/Lacuna/DB/Result/Map/Body/Planet.pm index e46c664a..8fb33070 100644 --- a/lib/Lacuna/DB/Result/Map/Body/Planet.pm +++ b/lib/Lacuna/DB/Result/Map/Body/Planet.pm @@ -432,7 +432,7 @@ around get_status => sub { foreign_body_id => $self->id, direction => 'out', task => 'Travelling', - 'body.empire_id' => {'!=' => $self->empire_id}, + 'body.empire_id' => {'!=' => $empire->id}, 'empire.alliance_id' => $self->empire->alliance_id, },{ join => {body => 'empire'}, @@ -446,7 +446,7 @@ around get_status => sub { foreign_body_id => $self->id, direction => 'out', task => 'Travelling', - 'body.empire_id' => $self->empire_id, + 'body.empire_id' => $empire->id, },{ join => 'body', order_by => 'date_available', @@ -459,7 +459,7 @@ around get_status => sub { foreign_body_id => $self->id, direction => 'out', task => 'Travelling', - 'body.empire_id' => {'!=' => $self->empire_id}, + 'body.empire_id' => {'!=' => $empire->id}, },{ join => {body => 'empire'}, order_by => 'date_available', diff --git a/lib/Lacuna/RPC.pm b/lib/Lacuna/RPC.pm index 5040e36e..e5008a6c 100644 --- a/lib/Lacuna/RPC.pm +++ b/lib/Lacuna/RPC.pm @@ -201,7 +201,7 @@ sub format_status { } } if (defined $body) { - $out{body} = $body->get_status($empire); + $out{body} = $body->get_status($empire->current_session->empire); } return \%out; } diff --git a/var/www/public/changes.txt b/var/www/public/changes.txt index 1ccf61fa..a2114560 100644 --- a/var/www/public/changes.txt +++ b/var/www/public/changes.txt @@ -1,5 +1,6 @@ 3.0917: - Fix: Recalc stats when building 1+x plans. + - Fix: Station incoming shows your incoming as own, not station owner's incoming. 3.0916: - Mod: Jackpot enhanced. -- 2.51.2