Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'develop' of github.com:lemming552/Lacuna-Server-Open in…

…to develop
  • Loading branch information...
commit 9be0461140b71390beb5bbd086d8a7c2ef2c17ab 2 parents 750b81c + 7e5ae0d
@lemming552 lemming552 authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/Lacuna/RPC/Building/HallsOfVrbansk.pm
View
6 lib/Lacuna/RPC/Building/HallsOfVrbansk.pm
@@ -96,7 +96,11 @@ sub sacrifice_to_upgrade {
if ($total < $needed) {
confess [1009, 'The Halls of Vrbansk do not have the knowledge necessary to upgrade the '.$upgrade->name];
}
- shift @halls if ($total > $needed); # Leave one hall standing if not needed for upgrade.
+ # Leave one hall standing if not needed for upgrade.
+ if ($total > $needed) {
+ @halls = sort { ($a->id != $building_id) <=> ($b->id != $building_id) } @halls;
+ shift(@halls);
+ }
while ($needed) {
my $hall = shift(@halls);
if ($hall) {
Please sign in to comment.
Something went wrong with that request. Please try again.