Treat a move as a move instead of a despawn+spawn.

This commit is contained in:
Olof Larsson 2013-12-03 18:02:15 +01:00
parent 05aaa8140d
commit efa9d6cb59

View File

@ -133,9 +133,7 @@ public class Econ
}
// Transfer money
if (Money.despawn(amount, null, from))
{
if (Money.spawn(amount, null, to))
if (Money.move(amount, invoker, from, to))
{
if (notify)
{
@ -145,19 +143,14 @@ public class Econ
}
else
{
// We failed. Try a rollback
Money.spawn(amount, null, from);
}
}
// if we get here something with the transaction failed
if (notify)
if (invoker != null && notify)
{
invoker.msg("Unable to transfer %s<b> to <h>%s<b> from <h>%s<b>.", Money.format(amount), to.describeTo(invoker), from.describeTo(invoker, true));
}
return false;
}
}
public static Set<UPlayer> getUPlayers(EconomyParticipator ep)
{