Some bugfixes

This commit is contained in:
Olof Larsson
2013-04-26 08:02:32 +02:00
parent 684974b336
commit f6d601446e
5 changed files with 14 additions and 14 deletions

View File

@ -118,9 +118,6 @@ public class Econ
if ( ! canIControllYou(invoker, from)) return false;
// Is there enough money for the transaction to happen?
if (Money.get(from) < amount)
{
// There was not enough money to pay
@ -132,12 +129,9 @@ public class Econ
}
// Transfer money
if (Money.subtract(from, amount))
{
if (Money.add(from, amount))
if (Money.add(to, amount))
{
if (notify)
{
@ -254,7 +248,7 @@ public class Econ
}
else
{
ep.msg("<h>%s<i> lost <h>%s<i> since did %s.", You, Money.format(ep, delta), actionDescription);
ep.msg("<h>%s<i> lost <h>%s<i> since did %s.", You, Money.format(ep, -delta), actionDescription);
}
}
return true;
@ -269,7 +263,7 @@ public class Econ
}
else
{
ep.msg("<h>%s<i> can't afford <h>%s<i> to %s.", You, Money.format(ep, delta), actionDescription);
ep.msg("<h>%s<i> can't afford <h>%s<i> to %s.", You, Money.format(ep, -delta), actionDescription);
}
}
return false;