Sync with Alchemy, fixes not being able to send calling cards to people.
This commit is contained in:
@@ -216,31 +216,18 @@
|
||||
</array>
|
||||
</map>
|
||||
|
||||
<key>AscentInstantMessageResponseRepeat</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether to keep on resending the autoresponse every line they send</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
|
||||
<key>AscentInstantMessageShowOnTyping</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether to perform the autorespond the moment they begin to type instead of waiting for an actual message</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
|
||||
<!-- Autoresponse Section -->
|
||||
<key>AscentInstantMessageResponseRepeat</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether to keep on resending the autoresponse every line they send</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>AutoresponseAnyone</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
@@ -438,7 +425,7 @@
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
</map>
|
||||
<key>BusyModeResponseItemID</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
||||
@@ -128,36 +128,31 @@ bool LLGiveInventory::isInventoryGiveAcceptable(const LLInventoryItem* item)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool acceptable = true;
|
||||
switch(item->getType())
|
||||
{
|
||||
case LLAssetType::AT_CALLINGCARD:
|
||||
acceptable = false;
|
||||
break;
|
||||
case LLAssetType::AT_OBJECT:
|
||||
// <edit>
|
||||
/*if(my_avatar->isWearingAttachment(item->getUUID()))
|
||||
/* <edit>
|
||||
if (get_is_item_worn(item->getUUID()))
|
||||
{
|
||||
acceptable = false;
|
||||
}*/
|
||||
// </edit>
|
||||
}
|
||||
</edit> */
|
||||
break;
|
||||
case LLAssetType::AT_BODYPART:
|
||||
case LLAssetType::AT_CLOTHING:
|
||||
{
|
||||
// <edit>
|
||||
/*bool copyable = false;
|
||||
if(item->getPermissions().allowCopyBy(gAgent.getID())) copyable = true;
|
||||
if(item->getPermissions().allowCopyBy(gAgentID)) copyable = true;
|
||||
|
||||
if(!copyable && gAgentWearables.isWearingItem(item->getUUID()))
|
||||
if (!copyable || get_is_item_worn(item->getUUID()))
|
||||
{
|
||||
acceptable = false;
|
||||
}*/
|
||||
// </edit>
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -185,20 +180,16 @@ bool LLGiveInventory::isInventoryGroupGiveAcceptable(const LLInventoryItem* item
|
||||
|
||||
|
||||
bool acceptable = true;
|
||||
|
||||
switch(item->getType())
|
||||
{
|
||||
case LLAssetType::AT_CALLINGCARD:
|
||||
acceptable = false;
|
||||
break;
|
||||
// <edit>
|
||||
/*case LLAssetType::AT_OBJECT:
|
||||
case LLAssetType::AT_OBJECT:
|
||||
/* <edit>
|
||||
if(gAgentAvatarp->isWearingAttachment(item->getUUID()))
|
||||
{
|
||||
acceptable = false;
|
||||
}*
|
||||
break;*/
|
||||
// </edit>
|
||||
}
|
||||
</edit> */
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -245,11 +236,17 @@ void LLGiveInventory::doGiveInventoryCategory(const LLUUID& to_agent,
|
||||
const LLUUID& im_session_id)
|
||||
|
||||
{
|
||||
if (!cat) return;
|
||||
if (!cat)
|
||||
{
|
||||
return;
|
||||
}
|
||||
llinfos << "LLGiveInventory::giveInventoryCategory() - "
|
||||
<< cat->getUUID() << llendl;
|
||||
|
||||
if (!isAgentAvatarValid()) return;
|
||||
if (!isAgentAvatarValid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Test out how many items are being given.
|
||||
LLViewerInventoryCategory::cat_array_t cats;
|
||||
@@ -275,17 +272,17 @@ void LLGiveInventory::doGiveInventoryCategory(const LLUUID& to_agent,
|
||||
LLNotificationsUtil::add("IncompleteInventory");
|
||||
return;
|
||||
}
|
||||
count = items.count() + cats.count();
|
||||
if(count > MAX_ITEMS)
|
||||
{
|
||||
count = items.count() + cats.count();
|
||||
if(count > MAX_ITEMS)
|
||||
{
|
||||
LLNotificationsUtil::add("TooManyItems");
|
||||
return;
|
||||
}
|
||||
else if(count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
else if(count == 0)
|
||||
{
|
||||
LLNotificationsUtil::add("NoItems");
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(0 == giveable.countNoCopy())
|
||||
@@ -358,6 +355,7 @@ bool LLGiveInventory::handleCopyProtectedItem(const LLSD& notification, const LL
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
LLSD itmes = notification["payload"]["items"];
|
||||
LLInventoryItem* item = NULL;
|
||||
bool give_successful = true;
|
||||
switch(option)
|
||||
{
|
||||
case 0: // "Yes"
|
||||
@@ -376,15 +374,17 @@ bool LLGiveInventory::handleCopyProtectedItem(const LLSD& notification, const LL
|
||||
else
|
||||
{
|
||||
LLNotificationsUtil::add("CannotGiveItem");
|
||||
give_successful = false;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default: // no, cancel, whatever, who cares, not yes.
|
||||
LLNotificationsUtil::add("TransactionCancelled");
|
||||
give_successful = false;
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
return give_successful;
|
||||
}
|
||||
|
||||
// static
|
||||
@@ -419,6 +419,7 @@ void LLGiveInventory::commitGiveInventoryItem(const LLUUID& to_agent,
|
||||
bucket,
|
||||
BUCKET_SIZE);
|
||||
gAgent.sendReliableMessage();
|
||||
|
||||
// <edit>
|
||||
if (gSavedSettings.getBOOL("BroadcastViewerEffects"))
|
||||
{
|
||||
@@ -486,7 +487,10 @@ void LLGiveInventory::commitGiveInventoryCategory(const LLUUID& to_agent,
|
||||
const LLUUID& im_session_id)
|
||||
|
||||
{
|
||||
if(!cat) return;
|
||||
if(!cat)
|
||||
{
|
||||
return;
|
||||
}
|
||||
llinfos << "LLGiveInventory::commitGiveInventoryCategory() - "
|
||||
<< cat->getUUID() << llendl;
|
||||
|
||||
@@ -565,6 +569,7 @@ if(!cat) return;
|
||||
bucket_size);
|
||||
gAgent.sendReliableMessage();
|
||||
delete[] bucket;
|
||||
|
||||
// <edit>
|
||||
if (gSavedSettings.getBOOL("BroadcastViewerEffects"))
|
||||
{
|
||||
@@ -585,4 +590,5 @@ if(!cat) return;
|
||||
logInventoryOffer(to_agent, im_session_id);
|
||||
}
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
||||
@@ -2464,8 +2464,8 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
|
||||
LLGiveInventory::doGiveInventoryItem(from_id, item, computed_session_id);
|
||||
if (show_autoresponded)
|
||||
{
|
||||
gIMMgr->addMessage(computed_session_id, from_id, name,
|
||||
llformat("%s %s \"%s\"", pns_name.c_str(), LLTrans::getString("IM_autoresponse_sent_item").c_str(), item->getName().c_str()));
|
||||
gIMMgr->addMessage(computed_session_id, from_id, name,
|
||||
llformat("%s %s \"%s\"", pns_name.c_str(), LLTrans::getString("IM_autoresponse_sent_item").c_str(), item->getName().c_str()));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2636,7 +2636,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
|
||||
if (show_autoresponded)
|
||||
{
|
||||
gIMMgr->addMessage(computed_session_id, from_id, name,
|
||||
llformat("%s %s \"%s\"", pns_name.c_str(), LLTrans::getString("IM_autoresponse_sent_item").c_str(), item->getName().c_str()));
|
||||
llformat("%s %s \"%s\"", pns_name.c_str(), LLTrans::getString("IM_autoresponse_sent_item").c_str(), item->getName().c_str()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user