* Changed disconnect callbacks in NetworkManager to events

* Sanity check for sending a zero or negative amount in GiveMoney()

git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@723 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
John Hurliman
2006-12-14 20:26:51 +00:00
parent aa6cd597f6
commit a7f066c343
2 changed files with 7 additions and 4 deletions

View File

@@ -448,8 +448,10 @@ namespace libsecondlife
public void GiveMoney(LLUUID target, int amount, string description)
{
// 5001 - transaction type for av to av money transfers
GiveMoney(target, amount, description, 5001);
if (amount > 0)
GiveMoney(target, amount, description, 5001);
else
Client.Log("Attempted to pay zero or negative value " + amount, Helpers.LogLevel.Warning);
}
/// <summary>

View File

@@ -659,16 +659,17 @@ namespace libsecondlife
{
get { return connected; }
}
/// <summary>
/// An event for the connection to a simulator other than the currently
/// occupied one disconnecting
/// </summary>
public SimDisconnectCallback OnSimDisconnected;
public event SimDisconnectCallback OnSimDisconnected;
/// <summary>
/// An event for being logged out either through client request, server
/// forced, or network error
/// </summary>
public DisconnectCallback OnDisconnected;
public event DisconnectCallback OnDisconnected;
private SecondLife Client;
private Dictionary<PacketType, List<PacketCallback>> Callbacks = new Dictionary<PacketType,List<PacketCallback>>();