From c73154734d3ee039d319dc84772b7f266e33e2fc Mon Sep 17 00:00:00 2001 From: Iain C Docherty Date: Thu, 17 Jan 2013 15:45:33 -0500 Subject: [PATCH] Fixed compile errors --- lib/Lacuna/DB/Result/Empire.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Lacuna/DB/Result/Empire.pm b/lib/Lacuna/DB/Result/Empire.pm index f6359b11..50f42ac4 100644 --- a/lib/Lacuna/DB/Result/Empire.pm +++ b/lib/Lacuna/DB/Result/Empire.pm @@ -249,6 +249,7 @@ sub transfer_essentia { reason => $args->{from_reason}, other_empire => $args->{to_empire}, }); + my $to_empire = $args->{to_empire}; $to_empire->add_essentia({ amount => $args->{amount}, reason => $args->{to_reason}, @@ -263,8 +264,8 @@ sub _adjust_essentia { my $note = $args->{reason}; my $transaction_id = $args->{transaction_id}; my $other_empire = $args->{other_empire}; - my $other_id = $from_empire ? $from_empire->id : 0; - my $other_name = $from_empire ? $from_empire->name : ''; + my $other_id = $other_empire ? $other_empire->id : 0; + my $other_name = $other_empire ? $other_empire->name : ''; $self->discard_changes; $self->essentia( $self->essentia + $value ); -- 2.51.2