aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.RegionServer/ClientView.API.cs
diff options
context:
space:
mode:
authorMW2007-05-27 18:52:42 +0000
committerMW2007-05-27 18:52:42 +0000
commitc746a2f9f4f0b1e7eea564effdae63472f79ab22 (patch)
tree54d23af3d168958bfec995cf2987cf5af79ac149 /OpenSim/OpenSim.RegionServer/ClientView.API.cs
parentGoodbye World (diff)
downloadopensim-SC_OLD-c746a2f9f4f0b1e7eea564effdae63472f79ab22.zip
opensim-SC_OLD-c746a2f9f4f0b1e7eea564effdae63472f79ab22.tar.gz
opensim-SC_OLD-c746a2f9f4f0b1e7eea564effdae63472f79ab22.tar.bz2
opensim-SC_OLD-c746a2f9f4f0b1e7eea564effdae63472f79ab22.tar.xz
Should allow multiple worlds (and UDP servers) to be ran in one instance, just missing backend comms and working Avatar/primitives classes.
Diffstat (limited to '')
-rw-r--r--OpenSim/OpenSim.RegionServer/ClientView.API.cs96
1 files changed, 96 insertions, 0 deletions
diff --git a/OpenSim/OpenSim.RegionServer/ClientView.API.cs b/OpenSim/OpenSim.RegionServer/ClientView.API.cs
new file mode 100644
index 0000000..579928c
--- /dev/null
+++ b/OpenSim/OpenSim.RegionServer/ClientView.API.cs
@@ -0,0 +1,96 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using OpenSim.Framework.Interfaces;
5using OpenSim.Framework.Inventory;
6using libsecondlife;
7using libsecondlife.Packets;
8
9namespace OpenSim
10{
11 partial class ClientView
12 {
13 public event ChatFromViewer OnChatFromViewer;
14 public event RezObject OnRezObject;
15 public event GenericCall4 OnDeRezObject;
16 public event ModifyTerrain OnModifyTerrain;
17 public event GenericCall OnRegionHandShakeReply;
18 public event GenericCall OnRequestWearables;
19 public event SetAppearance OnSetAppearance;
20 public event GenericCall2 OnCompleteMovementToRegion;
21 public event GenericCall3 OnAgentUpdate;
22 public event StartAnim OnStartAnim;
23 public event GenericCall OnRequestAvatarsData;
24 public event LinkObjects OnLinkObjects;
25 public event GenericCall4 OnAddPrim;
26 public event UpdateShape OnUpdatePrimShape;
27 public event ObjectSelect OnObjectSelect;
28 public event UpdatePrimFlags OnUpdatePrimFlags;
29 public event UpdatePrimTexture OnUpdatePrimTexture;
30 public event UpdatePrimVector OnUpdatePrimPosition;
31 public event UpdatePrimRotation OnUpdatePrimRotation;
32 public event UpdatePrimVector OnUpdatePrimScale;
33 public event StatusChange OnChildAgentStatus;
34 public event GenericCall2 OnStopMovement;
35
36 public LLVector3 StartPos
37 {
38 get
39 {
40 return startpos;
41 }
42 set
43 {
44 startpos = value;
45 }
46 }
47
48 public LLUUID AgentId
49 {
50 get
51 {
52 return this.AgentID;
53 }
54 }
55
56 #region World/Avatar to Client
57 public void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID)
58 {
59 System.Text.Encoding enc = System.Text.Encoding.ASCII;
60 libsecondlife.Packets.ChatFromSimulatorPacket reply = new ChatFromSimulatorPacket();
61 reply.ChatData.Audible = 1;
62 reply.ChatData.Message = message;
63 reply.ChatData.ChatType = type;
64 reply.ChatData.SourceType = 1;
65 reply.ChatData.Position = fromPos;
66 reply.ChatData.FromName = enc.GetBytes(fromName + "\0");
67 reply.ChatData.OwnerID = fromAgentID;
68 reply.ChatData.SourceID = fromAgentID;
69
70 this.OutPacket(reply);
71 }
72
73 public void SendAppearance(AvatarWearable[] wearables)
74 {
75 AgentWearablesUpdatePacket aw = new AgentWearablesUpdatePacket();
76 aw.AgentData.AgentID = this.AgentID;
77 aw.AgentData.SerialNum = 0;
78 aw.AgentData.SessionID = this.SessionID;
79
80 aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[13];
81 AgentWearablesUpdatePacket.WearableDataBlock awb;
82 for (int i = 0; i < wearables.Length; i++)
83 {
84 awb = new AgentWearablesUpdatePacket.WearableDataBlock();
85 awb.WearableType = (byte)i;
86 awb.AssetID = wearables[i].AssetID;
87 awb.ItemID = wearables[i].ItemID;
88 aw.WearableData[i] = awb;
89 }
90
91 this.OutPacket(aw);
92 }
93 #endregion
94
95 }
96}