diff options
author | Loren Shih <seraph@lindenlab.com> | 2009-09-11 15:06:18 +0000 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2009-09-11 15:06:18 +0000 |
commit | 8244288323549c59708a7092139ebba77382d911 (patch) | |
tree | ff5893400034a92b6322f376b526d80e371abb9b | |
parent | 6e1a8d894d836e23c5eeb783636c21a992730727 (diff) |
For DEV-39666 : Ensure AgentWearables saves actual items, not links, to database
For backwards compatibility, this change ensures that links aren't saved to user_wearable.
Reviewed by: Vir.
-rw-r--r-- | indra/newview/llagentwearables.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 54b94482de..c4e01808f7 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -311,7 +311,15 @@ void LLAgentWearables::sendAgentWearablesUpdate() if (wearable) { //llinfos << "Sending wearable " << wearable->getName() << llendl; - gMessageSystem->addUUIDFast(_PREHASH_ItemID, wearable->getItemID()); + LLUUID item_id = wearable->getItemID(); + const LLViewerInventoryItem *item = gInventory.getItem(item_id); + if (item && item->getIsLinkType()) + { + // Get the itemID that this item points to. i.e. make sure + // we are storing baseitems, not their links, in the database. + item_id = item->getLinkedUUID(); + } + gMessageSystem->addUUIDFast(_PREHASH_ItemID, item_id); } else { |