diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2017-07-12 12:10:47 +0300 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2017-07-12 12:10:47 +0300 |
commit | 4f9071c806f35564fec338682199e8c64d40fd6c (patch) | |
tree | 3614c18630233cd15c4903a85796c87ac928c006 /indra/newview/llviewermessage.cpp | |
parent | fcea03867c5f9ef0fde58a06071ff89ec494d2d7 (diff) |
MAINT-7587 FIXED Unresolved region name variable when trying to enter skill gaming region
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r-- | indra/newview/llviewermessage.cpp | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index eadbd8cd54..1ce18f5496 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -6851,14 +6851,10 @@ void process_teleport_failed(LLMessageSystem *msg, void**) // Get the message ID msg->getStringFast(_PREHASH_AlertInfo, _PREHASH_Message, message_id); big_reason = LLAgent::sTeleportErrorMessages[message_id]; - if ( big_reason.size() > 0 ) - { // Substitute verbose reason from the local map - args["REASON"] = big_reason; - } - else - { // Nothing found in the map - use what the server returned in the original message block + if ( big_reason.size() <= 0 ) + { + // Nothing found in the map - use what the server returned in the original message block msg->getStringFast(_PREHASH_Info, _PREHASH_Reason, big_reason); - args["REASON"] = big_reason; } LLSD llsd_block; @@ -6873,6 +6869,16 @@ void process_teleport_failed(LLMessageSystem *msg, void**) } else { + if(llsd_block.has("REGION_NAME")) + { + std::string region_name = llsd_block["REGION_NAME"].asString(); + if(!region_name.empty()) + { + LLStringUtil::format_map_t name_args; + name_args["[REGION_NAME]"] = region_name; + LLStringUtil::format(big_reason, name_args); + } + } // change notification name in this special case if (handle_teleport_access_blocked(llsd_block, message_id, args["REASON"])) { @@ -6884,7 +6890,7 @@ void process_teleport_failed(LLMessageSystem *msg, void**) } } } - + args["REASON"] = big_reason; } else { // Extra message payload not found - use what the simulator sent |