Add TransactionInfo to MoneyBalanceReply, unpack test data
parent
e067c532c6
commit
7381679cd0
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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 }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue