summaryrefslogtreecommitdiff
path: root/indra/newview/llavataractions.cpp
diff options
context:
space:
mode:
authorJonathan Yap <none@none>2013-01-11 11:13:44 -0500
committerJonathan Yap <none@none>2013-01-11 11:13:44 -0500
commite386aa73b7af5ca326f66fa3fb0482e42b3af33f (patch)
tree8548874b0dde6ca04195391eda25b706310833b5 /indra/newview/llavataractions.cpp
parent47044de069c2c1442a33d719846cdbf1e3450124 (diff)
STORM-1838
Diffstat (limited to 'indra/newview/llavataractions.cpp')
-rwxr-xr-xindra/newview/llavataractions.cpp36
1 files changed, 33 insertions, 3 deletions
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 8df30da68a..0d00232c2f 100755
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -72,6 +72,7 @@
#include "llslurl.h" // IDEVO
#include "llsidepanelinventory.h"
#include "llavatarname.h"
+#include "llagentui.h"
// static
void LLAvatarActions::requestFriendshipDialog(const LLUUID& id, const std::string& name)
@@ -397,15 +398,44 @@ void LLAvatarActions::pay(const LLUUID& id)
}
// static
-void LLAvatarActions::requestTeleport(const LLUUID& id)
+void LLAvatarActions::teleportRequest(const LLUUID& id)
{
LLMessageSystem* msg = gMessageSystem;
- msg->newMessageFast(_PREHASH_RequestTeleport);
+ msg->newMessageFast(_PREHASH_ImprovedInstantMessage);
msg->nextBlockFast(_PREHASH_AgentData);
- msg->addUUIDFast(_PREHASH_AgentID, id);
+ 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);
+
+/* msg->newMessageFast(_PREHASH_TeleportRequest);
+ msg->nextBlockFast(_PREHASH_AgentData);
+ msg->addUUIDFast(_PREHASH_AgentID, id);
+ msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); */
+
gAgent.sendReliableMessage();
+llwarns << "DBG REQUEST_TELEPORT sent" << llendl;
}
// static