Show more meaningful error messages when failed to give an item to another user

This commit is contained in:
Oren Hurvitz
2014-05-05 11:06:49 +03:00
parent df49196e17
commit 1e5cff32fc
6 changed files with 59 additions and 29 deletions

View File

@@ -560,12 +560,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
if (m_debugEnabled)
m_log.DebugFormat("[Groups]: Giving inventory from {0} to {1}", giver, remoteClient.AgentId);
string message;
InventoryItemBase itemCopy = ((Scene)(remoteClient.Scene)).GiveInventoryItem(remoteClient.AgentId,
giver, attachmentUUID);
giver, attachmentUUID, out message);
if (itemCopy == null)
{
remoteClient.SendAgentAlertMessage("Can't find item to give. Nothing given.", false);
remoteClient.SendAgentAlertMessage(message, false);
return;
}