diff options
author | Oz Linden <oz@lindenlab.com> | 2013-01-18 16:37:07 -0500 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2013-01-18 16:37:07 -0500 |
commit | 3e3fda589b11d53fceb9bbeed9f0333d88c3816f (patch) | |
tree | 43bfd5e88ede272242db36d9000fcdac84541725 /indra/newview/llavataractions.cpp | |
parent | d16757545c91d4f7dac3c52a311ad0f0239052e1 (diff) | |
parent | 70722454f6650438c9b659ff08b4d7bc6dfc2e7e (diff) |
merge up to 3.4.4-release
Diffstat (limited to 'indra/newview/llavataractions.cpp')
-rwxr-xr-x | indra/newview/llavataractions.cpp | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index fdd4565e50..51313f29c4 100755 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -71,6 +71,8 @@ #include "llcallingcard.h" #include "llslurl.h" // IDEVO #include "llsidepanelinventory.h" +#include "llavatarname.h" +#include "llagentui.h" // static void LLAvatarActions::requestFriendshipDialog(const LLUUID& id, const std::string& name) @@ -396,6 +398,42 @@ void LLAvatarActions::pay(const LLUUID& id) } // static +void LLAvatarActions::teleportRequest(const LLUUID& id) +{ + LLMessageSystem* msg = gMessageSystem; + + msg->newMessageFast(_PREHASH_ImprovedInstantMessage); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + + msg->nextBlockFast(_PREHASH_MessageBlock); + msg->addBOOLFast(_PREHASH_FromGroup, FALSE); + msg->addUUIDFast(_PREHASH_ToAgentID, id); + msg->addU8Fast(_PREHASH_Offline, IM_ONLINE); + msg->addU8Fast(_PREHASH_Dialog, IM_TELEPORT_REQUEST); + msg->addUUIDFast(_PREHASH_ID, LLUUID::null); + msg->addU32Fast(_PREHASH_Timestamp, NO_TIMESTAMP); // no timestamp necessary + + std::string name; + LLAgentUI::buildFullname(name); + + msg->addStringFast(_PREHASH_FromAgentName, name); + msg->addStringFast(_PREHASH_Message, LLStringUtil::null); + msg->addU32Fast(_PREHASH_ParentEstateID, 0); + msg->addUUIDFast(_PREHASH_RegionID, LLUUID::null); + msg->addVector3Fast(_PREHASH_Position, gAgent.getPositionAgent()); + + gMessageSystem->addBinaryDataFast( + _PREHASH_BinaryBucket, + EMPTY_BINARY_BUCKET, + EMPTY_BINARY_BUCKET_SIZE); + + gAgent.sendReliableMessage(); +llwarns << "DBG REQUEST_TELEPORT sent" << llendl; +} + +// static void LLAvatarActions::kick(const LLUUID& id) { LLSD payload; |