Treat a move as a move instead of a despawn+spawn.
This commit is contained in:
parent
05aaa8140d
commit
efa9d6cb59
@ -133,30 +133,23 @@ public class Econ
|
||||
}
|
||||
|
||||
// Transfer money
|
||||
if (Money.despawn(amount, null, from))
|
||||
if (Money.move(amount, invoker, from, to))
|
||||
{
|
||||
if (Money.spawn(amount, null, to))
|
||||
if (notify)
|
||||
{
|
||||
if (notify)
|
||||
{
|
||||
sendTransferInfo(invoker, from, to, amount);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// We failed. Try a rollback
|
||||
Money.spawn(amount, null, from);
|
||||
sendTransferInfo(invoker, from, to, amount);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// if we get here something with the transaction failed
|
||||
if (notify)
|
||||
else
|
||||
{
|
||||
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));
|
||||
// if we get here something with the transaction failed
|
||||
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;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static Set<UPlayer> getUPlayers(EconomyParticipator ep)
|
||||
|
Loading…
Reference in New Issue
Block a user