Hopefully fix a couple of economy integration problems

This commit is contained in:
Brettflan 2011-12-18 01:36:36 -06:00
parent 54ba4473a2
commit 5dc332691b
2 changed files with 6 additions and 3 deletions

View File

@ -126,7 +126,7 @@ public class Faction extends Entity implements EconomyParticipator
if ( ! Econ.getMethod().createAccount(aid)) if ( ! Econ.getMethod().createAccount(aid))
{ {
P.p.log(Level.SEVERE, "Error creating faction bank account through Register: "+aid); P.p.log(Level.SEVERE, "Error creating faction bank account through Register: "+aid);
return null; // return null;
} }
MethodAccount acc = Econ.getMethod().getAccount(aid); MethodAccount acc = Econ.getMethod().getAccount(aid);
acc.set(0); acc.set(0);

View File

@ -264,11 +264,14 @@ public class Econ
if ( ! shouldBeUsed()) return; if ( ! shouldBeUsed()) return;
for (Faction faction : Factions.i.get()) for (Faction faction : Factions.i.get())
{
if (faction.money > 0)
{ {
faction.getAccount().add(faction.money); faction.getAccount().add(faction.money);
faction.money = 0; faction.money = 0;
} }
} }
}
// calculate the cost for claiming land // calculate the cost for claiming land
public static double calculateClaimCost(int ownedLand, boolean takingFromAnotherFaction) public static double calculateClaimCost(int ownedLand, boolean takingFromAnotherFaction)