summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llviewermessage.cpp20
-rw-r--r--scripts/messages/message_template.msg24
2 files changed, 43 insertions, 1 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index ffe638dfbf..2502cd4303 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -4610,6 +4610,24 @@ void process_money_balance_reply( LLMessageSystem* msg, void** )
LL_INFOS("Messaging") << "L$, credit, committed: " << balance << " " << credit << " "
<< committed << LL_ENDL;
+ // Added in server 1.40 and viewer 2.1, support for localization
+ // and agent ids for name lookup.
+ S32 transaction_type = 0;
+ U32 transaction_flags = 0;
+ LLUUID source_id;
+ LLUUID dest_id;
+ S32 amount = 0;
+ std::string item_description;
+ if (msg->has("TransactionInfo"))
+ {
+ msg->getS32("TransactionInfo", "TransactionType", transaction_type);
+ msg->getU32("TransactionInfo", "TransactionFlags", transaction_flags);
+ msg->getUUID("TransactionInfo", "SourceID", source_id);
+ msg->getUUID("TransactionInfo", "DestID", dest_id);
+ msg->getS32("TransactionInfo", "Amount", amount);
+ msg->getString("TransactionInfo", "ItemDescription", item_description);
+ }
+
if (gStatusBar)
{
// S32 old_balance = gStatusBar->getBalance();
@@ -4649,7 +4667,7 @@ void process_money_balance_reply( LLMessageSystem* msg, void** )
// "<avatar name> paid you L$"
const std::string marker = "paid you L$";
- args["MESSAGE"] = desc;
+ args["MESSAGE"] = desc + item_description; // JAMESDEBUG
// extract avatar name from system message
S32 marker_pos = desc.find(marker, 0);
diff --git a/scripts/messages/message_template.msg b/scripts/messages/message_template.msg
index d4f791c202..1080d140dc 100644
--- a/scripts/messages/message_template.msg
+++ b/scripts/messages/message_template.msg
@@ -6812,6 +6812,18 @@ version 2.0
{ SquareMetersCommitted S32 }
{ Description Variable 1 } // string
}
+ // For replies that are part of a transaction (buying something) provide
+ // metadata for localization. If TransactionType is 0, the message is
+ // purely a balance update. Added for server 1.40 and viewer 2.1. JC
+ {
+ TransactionInfo Single
+ { TransactionType S32 } // lltransactiontype.h
+ { TransactionFlags U32 } // lltransactionflags.h
+ { SourceID LLUUID }
+ { DestID LLUUID }
+ { Amount S32 }
+ { ItemDescription Variable 1 } // string
+ }
}
@@ -6838,6 +6850,16 @@ version 2.0
{ SquareMetersCommitted S32 }
{ Description Variable 1 } // string
}
+ // See MoneyBalanceReply above.
+ {
+ TransactionInfo Single
+ { TransactionType S32 } // lltransactiontype.h
+ { TransactionFlags U32 } // lltransactionflags.h
+ { SourceID LLUUID }
+ { DestID LLUUID }
+ { Amount S32 }
+ { ItemDescription Variable 1 } // string
+ }
}
@@ -8972,5 +8994,7 @@ version 2.0
{ InvType S8 }
{ Name Variable 1 }
{ Description Variable 1 }
+
}
}
+