Inventory Link auto-detection

This commit is contained in:
Siana Gearz
2011-06-15 04:53:52 +02:00
parent 63285a2039
commit 9d57163479
3 changed files with 24 additions and 3 deletions

View File

@@ -39,6 +39,7 @@
#include "llsd.h"
#include "message.h"
#include <boost/tokenizer.hpp>
#include "../newview/hippogridmanager.h"
#include "llsdutil.h"
@@ -553,6 +554,10 @@ BOOL LLInventoryItem::unpackMessage(LLMessageSystem* msg, const char* block, S32
S8 type;
msg->getS8Fast(block, _PREHASH_Type, type, block_num);
mType = static_cast<LLAssetType::EType>(type);
if (mType == LLAssetType::AT_LINK || mType == LLAssetType::AT_LINK_FOLDER)
{
gHippoGridManager->getConnectedGrid()->setSupportsInvLinks(true);
}
msg->getS8(block, "InvType", type, block_num);
mInventoryType = static_cast<LLInventoryType::EType>(type);
mPermissions.initMasks(mInventoryType);
@@ -1122,6 +1127,11 @@ bool LLInventoryItem::fromLLSD(const LLSD& sd)
S8 type = (U8)sd[w].asInteger();
mType = static_cast<LLAssetType::EType>(type);
}
if (mType == LLAssetType::AT_LINK || mType == LLAssetType::AT_LINK_FOLDER)
{
gHippoGridManager->getConnectedGrid()->setSupportsInvLinks(true);
}
}
w = INV_INVENTORY_TYPE_LABEL;
if (sd.has(w))