diff options
author | Teravus Ovares | 2008-02-22 11:30:34 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-02-22 11:30:34 +0000 |
commit | ff12395a3d3b1180156444ef5243a2740e962b7e (patch) | |
tree | ef11696b42170b544ab8cb94cb6efaca8c781c7c /OpenSim/Region/ClientStack/ClientView.cs | |
parent | Fixes to ScriptEngine thread cleanup on destructor (diff) | |
download | opensim-SC-ff12395a3d3b1180156444ef5243a2740e962b7e.zip opensim-SC-ff12395a3d3b1180156444ef5243a2740e962b7e.tar.gz opensim-SC-ff12395a3d3b1180156444ef5243a2740e962b7e.tar.bz2 opensim-SC-ff12395a3d3b1180156444ef5243a2740e962b7e.tar.xz |
* Relative large ClientView refactoring of packet Events into .Net recommended format.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.cs | 942 |
1 files changed, 686 insertions, 256 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index 1440d6c..9f6af4b 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs | |||
@@ -119,6 +119,103 @@ namespace OpenSim.Region.ClientStack | |||
119 | protected LLVector3 m_startpos; | 119 | protected LLVector3 m_startpos; |
120 | protected EndPoint m_userEndPoint; | 120 | protected EndPoint m_userEndPoint; |
121 | 121 | ||
122 | /* Instantiated Designated Event Delegates */ | ||
123 | //- used so we don't create new objects for each incoming packet and then toss it out later */ | ||
124 | |||
125 | private RequestAvatarProperties handler001 = null; //OnRequestAvatarProperties; | ||
126 | private ChatFromViewer handler002 = null; //OnChatFromViewer; | ||
127 | private ChatFromViewer handler003 = null; //OnChatFromViewer; | ||
128 | private ImprovedInstantMessage handler004 = null; //OnInstantMessage; | ||
129 | private FriendActionDelegate handler005 = null; //OnApproveFriendRequest; | ||
130 | private FriendshipTermination handler006 = null; //OnTerminateFriendship; | ||
131 | private RezObject handler007 = null; //OnRezObject; | ||
132 | private GenericCall4 handler008 = null; //OnDeRezObject; | ||
133 | private ModifyTerrain handler009 = null; | ||
134 | private Action<IClientAPI> handler010 = null; //OnRegionHandShakeReply; | ||
135 | private GenericCall2 handler011 = null; //OnRequestWearables; | ||
136 | private Action<IClientAPI> handler012 = null; //OnRequestAvatarsData; | ||
137 | private SetAppearance handler013 = null; //OnSetAppearance; | ||
138 | private AvatarNowWearing handler014 = null; //OnAvatarNowWearing; | ||
139 | private RezSingleAttachmentFromInv handler015 = null; //OnRezSingleAttachmentFromInv; | ||
140 | private ObjectAttach handler016 = null; //OnObjectAttach; | ||
141 | private SetAlwaysRun handler017 = null; //OnSetAlwaysRun; | ||
142 | private GenericCall2 handler018 = null; //OnCompleteMovementToRegion; | ||
143 | private UpdateAgent handler019 = null; //OnAgentUpdate; | ||
144 | private StartAnim handler020 = null; | ||
145 | private StopAnim handler021 = null; | ||
146 | private AgentRequestSit handler022 = null; //OnAgentRequestSit; | ||
147 | private AgentSit handler023 = null; //OnAgentSit; | ||
148 | private AvatarPickerRequest handler024 = null; //OnAvatarPickerRequest; | ||
149 | private FetchInventory handler025 = null; //OnAgentDataUpdateRequest; | ||
150 | private FetchInventory handler026 = null; //OnUserInfoRequest; | ||
151 | private TeleportLocationRequest handler027 = null; //OnSetStartLocationRequest; | ||
152 | private LinkObjects handler028 = null; //OnLinkObjects; | ||
153 | private DelinkObjects handler029 = null; //OnDelinkObjects; | ||
154 | private AddNewPrim handler030 = null; //OnAddPrim; | ||
155 | private UpdateShape handler031 = null; //null; | ||
156 | private ObjectExtraParams handler032 = null; //OnUpdateExtraParams; | ||
157 | private ObjectDuplicate handler033 = null; | ||
158 | private ObjectSelect handler034 = null; | ||
159 | private ObjectDeselect handler035 = null; | ||
160 | private UpdatePrimFlags handler036 = null; //OnUpdatePrimFlags; | ||
161 | private UpdatePrimTexture handler037 = null; | ||
162 | private UpdateVector handler038 = null; //OnGrabObject; | ||
163 | private MoveObject handler039 = null; //OnGrabUpdate; | ||
164 | private ObjectSelect handler040 = null; //OnDeGrabObject; | ||
165 | private GenericCall7 handler041 = null; | ||
166 | private GenericCall7 handler042 = null; | ||
167 | private ObjectPermissions handler043 = null; | ||
168 | private RequestObjectPropertiesFamily handler044 = null; //OnRequestObjectPropertiesFamily; | ||
169 | private TextureRequest handler045 = null; | ||
170 | private UDPAssetUploadRequest handler046 = null; //OnAssetUploadRequest; | ||
171 | private RequestXfer handler047 = null; //OnRequestXfer; | ||
172 | private XferReceive handler048 = null; //OnXferReceive; | ||
173 | private ConfirmXfer handler049 = null; //OnConfirmXfer; | ||
174 | private CreateInventoryFolder handler050 = null; //OnCreateNewInventoryFolder; | ||
175 | private UpdateInventoryFolder handler051 = null; | ||
176 | private MoveInventoryFolder handler052 = null; | ||
177 | private CreateNewInventoryItem handler053 = null; //OnCreateNewInventoryItem; | ||
178 | private FetchInventory handler054 = null; | ||
179 | private FetchInventoryDescendents handler055 = null; //OnFetchInventoryDescendents; | ||
180 | private PurgeInventoryDescendents handler056 = null; //OnPurgeInventoryDescendents; | ||
181 | private UpdateInventoryItem handler057 = null; | ||
182 | private CopyInventoryItem handler058 = null; | ||
183 | private MoveInventoryItem handler059 = null; | ||
184 | private RemoveInventoryItem handler060 = null; | ||
185 | private RemoveInventoryFolder handler061 = null; | ||
186 | private RequestTaskInventory handler062 = null; //OnRequestTaskInventory; | ||
187 | private UpdateTaskInventory handler063 = null; //OnUpdateTaskInventory; | ||
188 | private RemoveTaskInventory handler064 = null; //OnRemoveTaskItem; | ||
189 | private RezScript handler065 = null; //OnRezScript; | ||
190 | private RequestMapBlocks handler066 = null; //OnRequestMapBlocks; | ||
191 | private RequestMapName handler067 = null; //OnMapNameRequest; | ||
192 | private TeleportLocationRequest handler068 = null; //OnTeleportLocationRequest; | ||
193 | private MoneyBalanceRequest handler069 = null; //OnMoneyBalanceRequest; | ||
194 | private UUIDNameRequest handler070 = null; | ||
195 | private ParcelAccessListRequest handler071 = null; //OnParcelAccessListRequest; | ||
196 | private ParcelAccessListUpdateRequest handler072 = null; //OnParcelAccessListUpdateRequest; | ||
197 | private ParcelPropertiesRequest handler073 = null; //OnParcelPropertiesRequest; | ||
198 | private ParcelDivideRequest handler074 = null; //OnParcelDivideRequest; | ||
199 | private ParcelJoinRequest handler075 = null; //OnParcelJoinRequest; | ||
200 | private ParcelPropertiesUpdateRequest handler076 = null; //OnParcelPropertiesUpdateRequest; | ||
201 | private ParcelSelectObjects handler077 = null; //OnParcelSelectObjects; | ||
202 | private ParcelObjectOwnerRequest handler078 = null; //OnParcelObjectOwnerRequest; | ||
203 | private EstateOwnerMessageRequest handler079 = null; //OnEstateOwnerMessage; | ||
204 | private RegionInfoRequest handler080 = null; //OnRegionInfoRequest; | ||
205 | private EstateCovenantRequest handler081 = null; //OnEstateCovenantRequest; | ||
206 | private RequestGodlikePowers handler082 = null; //OnRequestGodlikePowers; | ||
207 | private GodKickUser handler092 = null; //OnGodKickUser; | ||
208 | private ViewerEffectEventHandler handler083 = null; //OnViewerEffect; | ||
209 | private Action<IClientAPI> handler084 = null; //OnLogout; | ||
210 | private MoneyTransferRequest handler085 = null; //OnMoneyTransferRequest; | ||
211 | private UpdateVector handler086 = null; //OnUpdatePrimSinglePosition; | ||
212 | private UpdatePrimSingleRotation handler087 = null; //OnUpdatePrimSingleRotation; | ||
213 | private UpdateVector handler088 = null; //OnUpdatePrimScale; | ||
214 | private UpdateVector handler089 = null; //OnUpdatePrimGroupPosition; | ||
215 | private UpdatePrimRotation handler090 = null; //OnUpdatePrimGroupRotation; | ||
216 | private UpdatePrimGroupRotation handler091 = null; //OnUpdatePrimGroupMouseRotation; | ||
217 | |||
218 | |||
122 | /* Properties */ | 219 | /* Properties */ |
123 | 220 | ||
124 | public LLUUID SecureSessionId | 221 | public LLUUID SecureSessionId |
@@ -2138,10 +2235,10 @@ namespace OpenSim.Region.ClientStack | |||
2138 | // validate the agent owns the agentID and sessionID | 2235 | // validate the agent owns the agentID and sessionID |
2139 | if (money.MoneyData.SourceID == sender.AgentId && money.AgentData.AgentID == sender.AgentId && money.AgentData.SessionID == sender.SessionId) | 2236 | if (money.MoneyData.SourceID == sender.AgentId && money.AgentData.AgentID == sender.AgentId && money.AgentData.SessionID == sender.SessionId) |
2140 | { | 2237 | { |
2141 | 2238 | handler085 = OnMoneyTransferRequest; | |
2142 | if (OnMoneyTransferRequest != null) | 2239 | if (handler085 != null) |
2143 | { | 2240 | { |
2144 | OnMoneyTransferRequest(money.MoneyData.SourceID, money.MoneyData.DestID, | 2241 | handler085(money.MoneyData.SourceID, money.MoneyData.DestID, |
2145 | money.MoneyData.Amount, money.MoneyData.TransactionType, | 2242 | money.MoneyData.Amount, money.MoneyData.TransactionType, |
2146 | Util.FieldToString(money.MoneyData.Description)); | 2243 | Util.FieldToString(money.MoneyData.Description)); |
2147 | } | 2244 | } |
@@ -2157,10 +2254,10 @@ namespace OpenSim.Region.ClientStack | |||
2157 | private bool HandleViewerEffect(IClientAPI sender, Packet Pack) | 2254 | private bool HandleViewerEffect(IClientAPI sender, Packet Pack) |
2158 | { | 2255 | { |
2159 | ViewerEffectPacket viewer = (ViewerEffectPacket)Pack; | 2256 | ViewerEffectPacket viewer = (ViewerEffectPacket)Pack; |
2160 | 2257 | handler083 = OnViewerEffect; | |
2161 | if (OnViewerEffect != null) | 2258 | if (handler083 != null) |
2162 | { | 2259 | { |
2163 | OnViewerEffect(sender, viewer.Effect); | 2260 | handler083(sender, viewer.Effect); |
2164 | } | 2261 | } |
2165 | 2262 | ||
2166 | return true; | 2263 | return true; |
@@ -2170,9 +2267,11 @@ namespace OpenSim.Region.ClientStack | |||
2170 | { | 2267 | { |
2171 | m_log.Info("[CLIENT]: Got a logout request"); | 2268 | m_log.Info("[CLIENT]: Got a logout request"); |
2172 | 2269 | ||
2173 | if (OnLogout != null) | 2270 | handler084 = OnLogout; |
2271 | |||
2272 | if (handler084 != null) | ||
2174 | { | 2273 | { |
2175 | OnLogout(client); | 2274 | handler084(client); |
2176 | } | 2275 | } |
2177 | 2276 | ||
2178 | return true; | 2277 | return true; |
@@ -2227,96 +2326,144 @@ namespace OpenSim.Region.ClientStack | |||
2227 | { | 2326 | { |
2228 | LLUUID partId = part.UUID; | 2327 | LLUUID partId = part.UUID; |
2229 | 2328 | ||
2329 | |||
2330 | |||
2331 | |||
2332 | |||
2333 | UpdatePrimRotation handler090 = OnUpdatePrimGroupRotation; | ||
2334 | UpdatePrimGroupRotation handler091 = OnUpdatePrimGroupMouseRotation; | ||
2230 | 2335 | ||
2231 | switch (block.Type) | 2336 | switch (block.Type) |
2232 | { | 2337 | { |
2233 | case 1: | 2338 | case 1: |
2234 | if (OnUpdatePrimSinglePosition != null) | 2339 | LLVector3 pos1 = new LLVector3(block.Data, 0); |
2340 | |||
2341 | handler086 = OnUpdatePrimSinglePosition; | ||
2342 | if (handler086 != null) | ||
2235 | { | 2343 | { |
2236 | LLVector3 pos = new LLVector3(block.Data, 0); | 2344 | |
2237 | // System.Console.WriteLine("new movement position is " + pos.X + " , " + pos.Y + " , " + pos.Z); | 2345 | // System.Console.WriteLine("new movement position is " + pos.X + " , " + pos.Y + " , " + pos.Z); |
2238 | OnUpdatePrimSinglePosition(localId, pos, this); | 2346 | handler086(localId, pos1, this); |
2239 | } | 2347 | } |
2240 | break; | 2348 | break; |
2241 | case 2: | 2349 | case 2: |
2242 | if (OnUpdatePrimSingleRotation != null) | 2350 | LLQuaternion rot1 = new LLQuaternion(block.Data, 0, true); |
2351 | |||
2352 | handler087 = OnUpdatePrimSingleRotation; | ||
2353 | if (handler087 != null) | ||
2243 | { | 2354 | { |
2244 | LLQuaternion rot = new LLQuaternion(block.Data, 0, true); | 2355 | |
2245 | //System.Console.WriteLine("new tab rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); | 2356 | //System.Console.WriteLine("new tab rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); |
2246 | OnUpdatePrimSingleRotation(localId, rot, this); | 2357 | handler087(localId, rot1, this); |
2247 | } | 2358 | } |
2248 | break; | 2359 | break; |
2249 | case 3: | 2360 | case 3: |
2250 | if (OnUpdatePrimSingleRotation != null) | 2361 | |
2362 | LLQuaternion rot2 = new LLQuaternion(block.Data, 12, true); | ||
2363 | handler087 = OnUpdatePrimSingleRotation; | ||
2364 | if (handler087 != null) | ||
2251 | { | 2365 | { |
2252 | LLQuaternion rot = new LLQuaternion(block.Data, 12, true); | 2366 | |
2253 | //System.Console.WriteLine("new mouse rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); | 2367 | //System.Console.WriteLine("new mouse rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); |
2254 | OnUpdatePrimSingleRotation(localId, rot, this); | 2368 | handler087(localId, rot2, this); |
2255 | } | 2369 | } |
2256 | break; | 2370 | break; |
2257 | case 5: | 2371 | case 5: |
2258 | if (OnUpdatePrimScale != null) | 2372 | |
2373 | LLVector3 scale1 = new LLVector3(block.Data, 12); | ||
2374 | |||
2375 | handler088 = OnUpdatePrimScale; | ||
2376 | if (handler088 != null) | ||
2259 | { | 2377 | { |
2260 | LLVector3 scale = new LLVector3(block.Data, 12); | 2378 | |
2261 | // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z); | 2379 | // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z); |
2262 | OnUpdatePrimScale(localId, scale, this); | 2380 | handler088(localId, scale1, this); |
2263 | } | 2381 | } |
2264 | break; | 2382 | break; |
2265 | case 9: | 2383 | case 9: |
2266 | if (OnUpdatePrimGroupPosition != null) | 2384 | LLVector3 pos2 = new LLVector3(block.Data, 0); |
2385 | |||
2386 | handler089 = OnUpdatePrimGroupPosition; | ||
2387 | |||
2388 | if (handler089 != null) | ||
2267 | { | 2389 | { |
2268 | LLVector3 pos = new LLVector3(block.Data, 0); | 2390 | |
2269 | OnUpdatePrimGroupPosition(localId, pos, this); | 2391 | handler089(localId, pos2, this); |
2270 | } | 2392 | } |
2271 | break; | 2393 | break; |
2272 | case 10: | 2394 | case 10: |
2273 | if (OnUpdatePrimGroupRotation != null) | 2395 | |
2396 | LLQuaternion rot3 = new LLQuaternion(block.Data, 0, true); | ||
2397 | |||
2398 | handler090 = OnUpdatePrimGroupRotation; | ||
2399 | if (handler090 != null) | ||
2274 | { | 2400 | { |
2275 | LLQuaternion rot = new LLQuaternion(block.Data, 0, true); | 2401 | |
2276 | // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); | 2402 | // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); |
2277 | OnUpdatePrimGroupRotation(localId, rot, this); | 2403 | handler090(localId, rot3, this); |
2278 | } | 2404 | } |
2279 | break; | 2405 | break; |
2280 | case 11: | 2406 | case 11: |
2281 | if (OnUpdatePrimGroupMouseRotation != null) | 2407 | |
2408 | LLVector3 pos3 = new LLVector3(block.Data, 0); | ||
2409 | LLQuaternion rot4 = new LLQuaternion(block.Data, 12, true); | ||
2410 | |||
2411 | handler091 = OnUpdatePrimGroupMouseRotation; | ||
2412 | if (handler091 != null) | ||
2282 | { | 2413 | { |
2283 | LLVector3 pos = new LLVector3(block.Data, 0); | 2414 | |
2284 | LLQuaternion rot = new LLQuaternion(block.Data, 12, true); | ||
2285 | //Console.WriteLine("new rotation position is " + pos.X + " , " + pos.Y + " , " + pos.Z); | 2415 | //Console.WriteLine("new rotation position is " + pos.X + " , " + pos.Y + " , " + pos.Z); |
2286 | // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); | 2416 | // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); |
2287 | OnUpdatePrimGroupMouseRotation(localId, pos, rot, | 2417 | handler091(localId, pos3, rot4, |
2288 | this); | 2418 | this); |
2289 | } | 2419 | } |
2290 | break; | 2420 | break; |
2291 | case 13: | 2421 | case 13: |
2292 | if (OnUpdatePrimScale != null) | 2422 | |
2423 | LLVector3 scale2 = new LLVector3(block.Data, 12); | ||
2424 | LLVector3 pos4 = new LLVector3(block.Data, 0); | ||
2425 | |||
2426 | handler088 = OnUpdatePrimScale; | ||
2427 | if (handler088 != null) | ||
2293 | { | 2428 | { |
2294 | LLVector3 scale = new LLVector3(block.Data, 12); | 2429 | |
2295 | //Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z); | 2430 | //Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z); |
2296 | OnUpdatePrimScale(localId, scale, this); | 2431 | handler088(localId, scale2, this); |
2297 | 2432 | ||
2298 | // Change the position based on scale (for bug number 246) | 2433 | // Change the position based on scale (for bug number 246) |
2299 | LLVector3 pos = new LLVector3(block.Data, 0); | 2434 | handler086 = OnUpdatePrimSinglePosition; |
2300 | // System.Console.WriteLine("new movement position is " + pos.X + " , " + pos.Y + " , " + pos.Z); | 2435 | // System.Console.WriteLine("new movement position is " + pos.X + " , " + pos.Y + " , " + pos.Z); |
2301 | OnUpdatePrimSinglePosition(localId, pos, this); | 2436 | if (handler086 != null) |
2437 | { | ||
2438 | handler086(localId, pos4, this); | ||
2439 | } | ||
2302 | } | 2440 | } |
2303 | break; | 2441 | break; |
2304 | case 29: | 2442 | case 29: |
2305 | if (OnUpdatePrimScale != null) | 2443 | LLVector3 scale5 = new LLVector3(block.Data, 12); |
2444 | LLVector3 pos5 = new LLVector3(block.Data, 0); | ||
2445 | |||
2446 | handler088 = OnUpdatePrimScale; | ||
2447 | if (handler088 != null) | ||
2306 | { | 2448 | { |
2307 | LLVector3 scale = new LLVector3(block.Data, 12); | 2449 | |
2308 | // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z ); | 2450 | // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z ); |
2309 | OnUpdatePrimScale(localId, scale, this); | 2451 | handler088(localId, scale5, this); |
2310 | LLVector3 pos = new LLVector3(block.Data, 0); | 2452 | |
2311 | OnUpdatePrimSinglePosition(localId, pos, this); | 2453 | handler086 = OnUpdatePrimSinglePosition; |
2454 | if (handler086 != null) | ||
2455 | { | ||
2456 | handler086(localId, pos5, this); | ||
2457 | } | ||
2312 | } | 2458 | } |
2313 | break; | 2459 | break; |
2314 | case 21: | 2460 | case 21: |
2315 | if (OnUpdatePrimScale != null) | 2461 | LLVector3 scale6 = new LLVector3(block.Data, 12); |
2462 | handler088 = OnUpdatePrimScale; | ||
2463 | if (handler088 != null) | ||
2316 | { | 2464 | { |
2317 | LLVector3 scale = new LLVector3(block.Data, 12); | ||
2318 | // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z); | 2465 | // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z); |
2319 | OnUpdatePrimScale(localId, scale, this); | 2466 | handler088(localId, scale6, this); |
2320 | } | 2467 | } |
2321 | break; | 2468 | break; |
2322 | } | 2469 | } |
@@ -2344,7 +2491,7 @@ namespace OpenSim.Region.ClientStack | |||
2344 | OutPacket(mapReply, ThrottleOutPacketType.Land); | 2491 | OutPacket(mapReply, ThrottleOutPacketType.Land); |
2345 | } | 2492 | } |
2346 | 2493 | ||
2347 | public void RequestMapBlocks(int minX, int minY, int maxX, int maxY) | 2494 | public void RequestMapBlocksX(int minX, int minY, int maxX, int maxY) |
2348 | { | 2495 | { |
2349 | /* | 2496 | /* |
2350 | IList simMapProfiles = m_gridServer.RequestMapBlocks(minX, minY, maxX, maxY); | 2497 | IList simMapProfiles = m_gridServer.RequestMapBlocks(minX, minY, maxX, maxY); |
@@ -2712,10 +2859,14 @@ namespace OpenSim.Region.ClientStack | |||
2712 | 2859 | ||
2713 | case PacketType.AvatarPropertiesRequest: | 2860 | case PacketType.AvatarPropertiesRequest: |
2714 | AvatarPropertiesRequestPacket avatarProperties = (AvatarPropertiesRequestPacket)Pack; | 2861 | AvatarPropertiesRequestPacket avatarProperties = (AvatarPropertiesRequestPacket)Pack; |
2715 | if (OnRequestAvatarProperties != null) | 2862 | |
2863 | handler001 = OnRequestAvatarProperties; | ||
2864 | if (handler001 != null) | ||
2716 | { | 2865 | { |
2717 | OnRequestAvatarProperties(this, avatarProperties.AgentData.AvatarID); | 2866 | handler001(this, avatarProperties.AgentData.AvatarID); |
2718 | } | 2867 | } |
2868 | |||
2869 | |||
2719 | break; | 2870 | break; |
2720 | case PacketType.ChatFromViewer: | 2871 | case PacketType.ChatFromViewer: |
2721 | ChatFromViewerPacket inchatpack = (ChatFromViewerPacket)Pack; | 2872 | ChatFromViewerPacket inchatpack = (ChatFromViewerPacket)Pack; |
@@ -2740,8 +2891,13 @@ namespace OpenSim.Region.ClientStack | |||
2740 | args.Scene = Scene; | 2891 | args.Scene = Scene; |
2741 | args.Sender = this; | 2892 | args.Sender = this; |
2742 | 2893 | ||
2743 | OnChatFromViewer(this, args); | 2894 | handler002 = OnChatFromViewer; |
2895 | if (handler002 != null) | ||
2896 | handler002(this, args); | ||
2744 | } | 2897 | } |
2898 | |||
2899 | |||
2900 | |||
2745 | break; | 2901 | break; |
2746 | case PacketType.ScriptDialogReply: | 2902 | case PacketType.ScriptDialogReply: |
2747 | ScriptDialogReplyPacket rdialog = (ScriptDialogReplyPacket)Pack; | 2903 | ScriptDialogReplyPacket rdialog = (ScriptDialogReplyPacket)Pack; |
@@ -2757,16 +2913,21 @@ namespace OpenSim.Region.ClientStack | |||
2757 | args.Position = new LLVector3(); | 2913 | args.Position = new LLVector3(); |
2758 | args.Scene = Scene; | 2914 | args.Scene = Scene; |
2759 | args.Sender = this; | 2915 | args.Sender = this; |
2760 | OnChatFromViewer(this, args); | 2916 | handler003 = OnChatFromViewer; |
2917 | if (handler003 != null) | ||
2918 | handler003(this, args); | ||
2761 | } | 2919 | } |
2920 | |||
2762 | break; | 2921 | break; |
2763 | case PacketType.ImprovedInstantMessage: | 2922 | case PacketType.ImprovedInstantMessage: |
2764 | ImprovedInstantMessagePacket msgpack = (ImprovedInstantMessagePacket)Pack; | 2923 | ImprovedInstantMessagePacket msgpack = (ImprovedInstantMessagePacket)Pack; |
2765 | string IMfromName = Util.FieldToString(msgpack.MessageBlock.FromAgentName); | 2924 | string IMfromName = Util.FieldToString(msgpack.MessageBlock.FromAgentName); |
2766 | string IMmessage = Helpers.FieldToUTF8String(msgpack.MessageBlock.Message); | 2925 | string IMmessage = Helpers.FieldToUTF8String(msgpack.MessageBlock.Message); |
2767 | if (OnInstantMessage != null) | 2926 | handler004 = OnInstantMessage; |
2927 | |||
2928 | if (handler004 != null) | ||
2768 | { | 2929 | { |
2769 | OnInstantMessage(this, msgpack.AgentData.AgentID, msgpack.AgentData.SessionID, | 2930 | handler004(this, msgpack.AgentData.AgentID, msgpack.AgentData.SessionID, |
2770 | msgpack.MessageBlock.ToAgentID, msgpack.MessageBlock.ID, | 2931 | msgpack.MessageBlock.ToAgentID, msgpack.MessageBlock.ID, |
2771 | msgpack.MessageBlock.Timestamp, IMfromName, IMmessage, | 2932 | msgpack.MessageBlock.Timestamp, IMfromName, IMmessage, |
2772 | msgpack.MessageBlock.Dialog, msgpack.MessageBlock.FromGroup, | 2933 | msgpack.MessageBlock.Dialog, msgpack.MessageBlock.FromGroup, |
@@ -2774,6 +2935,8 @@ namespace OpenSim.Region.ClientStack | |||
2774 | msgpack.MessageBlock.Position, msgpack.MessageBlock.RegionID, | 2935 | msgpack.MessageBlock.Position, msgpack.MessageBlock.RegionID, |
2775 | msgpack.MessageBlock.BinaryBucket); | 2936 | msgpack.MessageBlock.BinaryBucket); |
2776 | } | 2937 | } |
2938 | |||
2939 | |||
2777 | break; | 2940 | break; |
2778 | 2941 | ||
2779 | case PacketType.AcceptFriendship: | 2942 | case PacketType.AcceptFriendship: |
@@ -2790,11 +2953,14 @@ namespace OpenSim.Region.ClientStack | |||
2790 | callingCardFolders.Add(afriendpack.FolderData[fi].FolderID); | 2953 | callingCardFolders.Add(afriendpack.FolderData[fi].FolderID); |
2791 | } | 2954 | } |
2792 | 2955 | ||
2793 | if (OnApproveFriendRequest != null) | 2956 | handler005 = OnApproveFriendRequest; |
2957 | if (handler005 != null) | ||
2794 | { | 2958 | { |
2795 | OnApproveFriendRequest(this, agentID, transactionID, callingCardFolders); | 2959 | handler005(this, agentID, transactionID, callingCardFolders); |
2796 | } | 2960 | } |
2797 | 2961 | ||
2962 | |||
2963 | |||
2798 | 2964 | ||
2799 | break; | 2965 | break; |
2800 | case PacketType.TerminateFriendship: | 2966 | case PacketType.TerminateFriendship: |
@@ -2802,15 +2968,19 @@ namespace OpenSim.Region.ClientStack | |||
2802 | LLUUID listOwnerAgentID = tfriendpack.AgentData.AgentID; | 2968 | LLUUID listOwnerAgentID = tfriendpack.AgentData.AgentID; |
2803 | LLUUID exFriendID = tfriendpack.ExBlock.OtherID; | 2969 | LLUUID exFriendID = tfriendpack.ExBlock.OtherID; |
2804 | 2970 | ||
2805 | if (OnTerminateFriendship != null) | 2971 | handler006 = OnTerminateFriendship; |
2972 | if (handler006 != null) | ||
2806 | { | 2973 | { |
2807 | OnTerminateFriendship(this, listOwnerAgentID, exFriendID); | 2974 | handler006(this, listOwnerAgentID, exFriendID); |
2808 | } | 2975 | } |
2976 | |||
2809 | 2977 | ||
2810 | break; | 2978 | break; |
2811 | case PacketType.RezObject: | 2979 | case PacketType.RezObject: |
2812 | RezObjectPacket rezPacket = (RezObjectPacket)Pack; | 2980 | RezObjectPacket rezPacket = (RezObjectPacket)Pack; |
2813 | if (OnRezObject != null) | 2981 | |
2982 | handler007 = OnRezObject; | ||
2983 | if (handler007 != null) | ||
2814 | { | 2984 | { |
2815 | //rezPacket.RezData.BypassRaycast; | 2985 | //rezPacket.RezData.BypassRaycast; |
2816 | //rezPacket.RezData.RayEnd; | 2986 | //rezPacket.RezData.RayEnd; |
@@ -2822,7 +2992,7 @@ namespace OpenSim.Region.ClientStack | |||
2822 | //rezPacket.RezData.FromTaskID; | 2992 | //rezPacket.RezData.FromTaskID; |
2823 | //m_log.Info("[REZData]: " + rezPacket.ToString()); | 2993 | //m_log.Info("[REZData]: " + rezPacket.ToString()); |
2824 | 2994 | ||
2825 | OnRezObject(this, rezPacket.InventoryData.ItemID, rezPacket.RezData.RayEnd, | 2995 | handler007(this, rezPacket.InventoryData.ItemID, rezPacket.RezData.RayEnd, |
2826 | rezPacket.RezData.RayStart, rezPacket.RezData.RayTargetID, | 2996 | rezPacket.RezData.RayStart, rezPacket.RezData.RayTargetID, |
2827 | rezPacket.RezData.BypassRaycast, rezPacket.RezData.RayEndIsIntersection, | 2997 | rezPacket.RezData.BypassRaycast, rezPacket.RezData.RayEndIsIntersection, |
2828 | rezPacket.RezData.EveryoneMask, rezPacket.RezData.GroupMask, | 2998 | rezPacket.RezData.EveryoneMask, rezPacket.RezData.GroupMask, |
@@ -2830,12 +3000,15 @@ namespace OpenSim.Region.ClientStack | |||
2830 | rezPacket.RezData.RezSelected, rezPacket.RezData.RemoveItem, | 3000 | rezPacket.RezData.RezSelected, rezPacket.RezData.RemoveItem, |
2831 | rezPacket.RezData.FromTaskID); | 3001 | rezPacket.RezData.FromTaskID); |
2832 | } | 3002 | } |
3003 | |||
2833 | break; | 3004 | break; |
2834 | case PacketType.DeRezObject: | 3005 | case PacketType.DeRezObject: |
2835 | if (OnDeRezObject != null) | 3006 | handler008 = OnDeRezObject; |
3007 | if (handler008 != null) | ||
2836 | { | 3008 | { |
2837 | OnDeRezObject(Pack, this); | 3009 | handler008(Pack, this); |
2838 | } | 3010 | } |
3011 | |||
2839 | break; | 3012 | break; |
2840 | case PacketType.ModifyLand: | 3013 | case PacketType.ModifyLand: |
2841 | ModifyLandPacket modify = (ModifyLandPacket)Pack; | 3014 | ModifyLandPacket modify = (ModifyLandPacket)Pack; |
@@ -2844,39 +3017,59 @@ namespace OpenSim.Region.ClientStack | |||
2844 | { | 3017 | { |
2845 | if (OnModifyTerrain != null) | 3018 | if (OnModifyTerrain != null) |
2846 | { | 3019 | { |
3020 | |||
2847 | for (int i = 0; i < modify.ParcelData.Length; i++) | 3021 | for (int i = 0; i < modify.ParcelData.Length; i++) |
2848 | { | 3022 | { |
2849 | OnModifyTerrain(modify.ModifyBlock.Height, modify.ModifyBlock.Seconds, | 3023 | handler009 = OnModifyTerrain; |
2850 | modify.ModifyBlock.BrushSize, | 3024 | if (handler009 != null) |
2851 | modify.ModifyBlock.Action, modify.ParcelData[i].North, | 3025 | { |
2852 | modify.ParcelData[i].West, modify.ParcelData[i].South, | 3026 | OnModifyTerrain(modify.ModifyBlock.Height, modify.ModifyBlock.Seconds, |
2853 | modify.ParcelData[i].East, this); | 3027 | modify.ModifyBlock.BrushSize, |
3028 | modify.ModifyBlock.Action, modify.ParcelData[i].North, | ||
3029 | modify.ParcelData[i].West, modify.ParcelData[i].South, | ||
3030 | modify.ParcelData[i].East, this); | ||
3031 | } | ||
2854 | } | 3032 | } |
2855 | } | 3033 | } |
2856 | } | 3034 | } |
3035 | |||
2857 | break; | 3036 | break; |
2858 | case PacketType.RegionHandshakeReply: | 3037 | case PacketType.RegionHandshakeReply: |
2859 | if (OnRegionHandShakeReply != null) | 3038 | |
3039 | handler010 = OnRegionHandShakeReply; | ||
3040 | if (handler010 != null) | ||
2860 | { | 3041 | { |
2861 | OnRegionHandShakeReply(this); | 3042 | handler010(this); |
2862 | } | 3043 | } |
3044 | |||
2863 | break; | 3045 | break; |
2864 | case PacketType.AgentWearablesRequest: | 3046 | case PacketType.AgentWearablesRequest: |
2865 | if (OnRequestWearables != null) | 3047 | handler011 = OnRequestWearables; |
3048 | |||
3049 | if (handler011 != null) | ||
2866 | { | 3050 | { |
2867 | OnRequestWearables(); | 3051 | handler011(); |
2868 | } | 3052 | } |
2869 | if (OnRequestAvatarsData != null) | 3053 | |
3054 | |||
3055 | handler012 = OnRequestAvatarsData; | ||
3056 | |||
3057 | if (handler012 != null) | ||
2870 | { | 3058 | { |
2871 | OnRequestAvatarsData(this); | 3059 | handler012(this); |
2872 | } | 3060 | } |
3061 | |||
3062 | |||
2873 | break; | 3063 | break; |
2874 | case PacketType.AgentSetAppearance: | 3064 | case PacketType.AgentSetAppearance: |
2875 | AgentSetAppearancePacket appear = (AgentSetAppearancePacket)Pack; | 3065 | AgentSetAppearancePacket appear = (AgentSetAppearancePacket)Pack; |
2876 | if (OnSetAppearance != null) | 3066 | |
3067 | handler013 = OnSetAppearance; | ||
3068 | if (handler013 != null) | ||
2877 | { | 3069 | { |
2878 | OnSetAppearance(appear.ObjectData.TextureEntry, appear.VisualParam); | 3070 | handler013(appear.ObjectData.TextureEntry, appear.VisualParam); |
2879 | } | 3071 | } |
3072 | |||
2880 | break; | 3073 | break; |
2881 | case PacketType.AgentIsNowWearing: | 3074 | case PacketType.AgentIsNowWearing: |
2882 | if (OnAvatarNowWearing != null) | 3075 | if (OnAvatarNowWearing != null) |
@@ -2890,62 +3083,98 @@ namespace OpenSim.Region.ClientStack | |||
2890 | nowWearing.WearableData[i].WearableType); | 3083 | nowWearing.WearableData[i].WearableType); |
2891 | wearingArgs.NowWearing.Add(wearable); | 3084 | wearingArgs.NowWearing.Add(wearable); |
2892 | } | 3085 | } |
2893 | OnAvatarNowWearing(this, wearingArgs); | 3086 | |
3087 | handler014 = OnAvatarNowWearing; | ||
3088 | if (handler014 != null) | ||
3089 | { | ||
3090 | handler014(this, wearingArgs); | ||
3091 | } | ||
3092 | |||
3093 | |||
2894 | } | 3094 | } |
2895 | break; | 3095 | break; |
2896 | case PacketType.RezSingleAttachmentFromInv: | 3096 | case PacketType.RezSingleAttachmentFromInv: |
2897 | if (OnRezSingleAttachmentFromInv != null) | 3097 | |
3098 | handler015 = OnRezSingleAttachmentFromInv; | ||
3099 | if (handler015 != null) | ||
2898 | { | 3100 | { |
2899 | RezSingleAttachmentFromInvPacket rez = (RezSingleAttachmentFromInvPacket) Pack; | 3101 | RezSingleAttachmentFromInvPacket rez = (RezSingleAttachmentFromInvPacket) Pack; |
2900 | OnRezSingleAttachmentFromInv(this, rez.ObjectData.ItemID, | 3102 | handler015(this, rez.ObjectData.ItemID, |
2901 | rez.ObjectData.AttachmentPt, rez.ObjectData.ItemFlags, rez.ObjectData.NextOwnerMask); | 3103 | rez.ObjectData.AttachmentPt, rez.ObjectData.ItemFlags, rez.ObjectData.NextOwnerMask); |
2902 | } | 3104 | } |
3105 | |||
2903 | break; | 3106 | break; |
2904 | case PacketType.ObjectAttach: | 3107 | case PacketType.ObjectAttach: |
3108 | |||
3109 | |||
2905 | if (OnObjectAttach != null) | 3110 | if (OnObjectAttach != null) |
2906 | { | 3111 | { |
2907 | ObjectAttachPacket att = (ObjectAttachPacket) Pack; | 3112 | ObjectAttachPacket att = (ObjectAttachPacket)Pack; |
2908 | OnObjectAttach(this, att.ObjectData[0].ObjectLocalID, att.AgentData.AttachmentPoint, att.ObjectData[0].Rotation); | 3113 | |
3114 | handler016 = OnObjectAttach; | ||
3115 | |||
3116 | if (handler016 != null) | ||
3117 | { | ||
3118 | handler016(this, att.ObjectData[0].ObjectLocalID, att.AgentData.AttachmentPoint, att.ObjectData[0].Rotation); | ||
3119 | } | ||
2909 | } | 3120 | } |
3121 | |||
2910 | break; | 3122 | break; |
2911 | case PacketType.SetAlwaysRun: | 3123 | case PacketType.SetAlwaysRun: |
2912 | SetAlwaysRunPacket run = (SetAlwaysRunPacket)Pack; | 3124 | SetAlwaysRunPacket run = (SetAlwaysRunPacket)Pack; |
2913 | 3125 | ||
2914 | if (OnSetAlwaysRun != null) | 3126 | handler017 = OnSetAlwaysRun; |
2915 | OnSetAlwaysRun(this, run.AgentData.AlwaysRun); | 3127 | if (handler017 != null) |
3128 | handler017(this, run.AgentData.AlwaysRun); | ||
3129 | |||
3130 | |||
2916 | 3131 | ||
2917 | break; | 3132 | break; |
2918 | case PacketType.CompleteAgentMovement: | 3133 | case PacketType.CompleteAgentMovement: |
2919 | if (OnCompleteMovementToRegion != null) | 3134 | |
3135 | handler018 = OnCompleteMovementToRegion; | ||
3136 | if (handler018 != null) | ||
2920 | { | 3137 | { |
2921 | OnCompleteMovementToRegion(); | 3138 | handler018(); |
2922 | } | 3139 | } |
3140 | handler018 = null; | ||
3141 | |||
2923 | break; | 3142 | break; |
2924 | case PacketType.AgentUpdate: | 3143 | case PacketType.AgentUpdate: |
2925 | if (OnAgentUpdate != null) | 3144 | if (OnAgentUpdate != null) |
2926 | { | 3145 | { |
2927 | AgentUpdatePacket agenUpdate = (AgentUpdatePacket)Pack; | 3146 | AgentUpdatePacket agenUpdate = (AgentUpdatePacket)Pack; |
2928 | 3147 | ||
2929 | OnAgentUpdate(this, agenUpdate); | 3148 | handler019 = OnAgentUpdate; |
3149 | if (handler019 != null) | ||
3150 | OnAgentUpdate(this, agenUpdate); | ||
3151 | |||
3152 | handler019 = null; | ||
2930 | //agenUpdate.AgentData.ControlFlags, agenUpdate.AgentData.BodyRotationa); | 3153 | //agenUpdate.AgentData.ControlFlags, agenUpdate.AgentData.BodyRotationa); |
2931 | } | 3154 | } |
2932 | break; | 3155 | break; |
2933 | case PacketType.AgentAnimation: | 3156 | case PacketType.AgentAnimation: |
2934 | AgentAnimationPacket AgentAni = (AgentAnimationPacket)Pack; | 3157 | AgentAnimationPacket AgentAni = (AgentAnimationPacket)Pack; |
3158 | |||
3159 | handler020 = null; | ||
3160 | handler021 = null; | ||
3161 | |||
2935 | for (int i = 0; i < AgentAni.AnimationList.Length; i++) | 3162 | for (int i = 0; i < AgentAni.AnimationList.Length; i++) |
2936 | { | 3163 | { |
2937 | if (AgentAni.AnimationList[i].StartAnim) | 3164 | if (AgentAni.AnimationList[i].StartAnim) |
2938 | { | 3165 | { |
2939 | if (OnStartAnim != null) | 3166 | handler020 = OnStartAnim; |
3167 | if (handler020 != null) | ||
2940 | { | 3168 | { |
2941 | OnStartAnim(this, AgentAni.AnimationList[i].AnimID, 1); | 3169 | handler020(this, AgentAni.AnimationList[i].AnimID, 1); |
2942 | } | 3170 | } |
2943 | } | 3171 | } |
2944 | else | 3172 | else |
2945 | { | 3173 | { |
2946 | if (OnStopAnim != null) | 3174 | handler021 = OnStopAnim; |
3175 | if (handler021 != null) | ||
2947 | { | 3176 | { |
2948 | OnStopAnim(this, AgentAni.AnimationList[i].AnimID); | 3177 | handler021(this, AgentAni.AnimationList[i].AnimID); |
2949 | } | 3178 | } |
2950 | } | 3179 | } |
2951 | } | 3180 | } |
@@ -2954,7 +3183,10 @@ namespace OpenSim.Region.ClientStack | |||
2954 | if (OnAgentRequestSit != null) | 3183 | if (OnAgentRequestSit != null) |
2955 | { | 3184 | { |
2956 | AgentRequestSitPacket agentRequestSit = (AgentRequestSitPacket)Pack; | 3185 | AgentRequestSitPacket agentRequestSit = (AgentRequestSitPacket)Pack; |
2957 | OnAgentRequestSit(this, agentRequestSit.AgentData.AgentID, | 3186 | |
3187 | handler022 = OnAgentRequestSit; | ||
3188 | if (handler022 != null) | ||
3189 | handler022(this, agentRequestSit.AgentData.AgentID, | ||
2958 | agentRequestSit.TargetObject.TargetID, agentRequestSit.TargetObject.Offset); | 3190 | agentRequestSit.TargetObject.TargetID, agentRequestSit.TargetObject.Offset); |
2959 | } | 3191 | } |
2960 | break; | 3192 | break; |
@@ -2962,7 +3194,12 @@ namespace OpenSim.Region.ClientStack | |||
2962 | if (OnAgentSit != null) | 3194 | if (OnAgentSit != null) |
2963 | { | 3195 | { |
2964 | AgentSitPacket agentSit = (AgentSitPacket)Pack; | 3196 | AgentSitPacket agentSit = (AgentSitPacket)Pack; |
2965 | OnAgentSit(this, agentSit.AgentData.AgentID); | 3197 | |
3198 | handler023 = OnAgentSit; | ||
3199 | if (handler023 != null) | ||
3200 | { | ||
3201 | OnAgentSit(this, agentSit.AgentData.AgentID); | ||
3202 | } | ||
2966 | } | 3203 | } |
2967 | break; | 3204 | break; |
2968 | case PacketType.AvatarPickerRequest: | 3205 | case PacketType.AvatarPickerRequest: |
@@ -2970,37 +3207,45 @@ namespace OpenSim.Region.ClientStack | |||
2970 | AvatarPickerRequestPacket.AgentDataBlock Requestdata = avRequestQuery.AgentData; | 3207 | AvatarPickerRequestPacket.AgentDataBlock Requestdata = avRequestQuery.AgentData; |
2971 | AvatarPickerRequestPacket.DataBlock querydata = avRequestQuery.Data; | 3208 | AvatarPickerRequestPacket.DataBlock querydata = avRequestQuery.Data; |
2972 | //System.Console.WriteLine("Agent Sends:" + Helpers.FieldToUTF8String(querydata.Name)); | 3209 | //System.Console.WriteLine("Agent Sends:" + Helpers.FieldToUTF8String(querydata.Name)); |
2973 | if (OnAvatarPickerRequest != null) | 3210 | |
3211 | handler024 = OnAvatarPickerRequest; | ||
3212 | if (handler024 != null) | ||
2974 | { | 3213 | { |
2975 | OnAvatarPickerRequest(this, Requestdata.AgentID, Requestdata.QueryID, | 3214 | handler024(this, Requestdata.AgentID, Requestdata.QueryID, |
2976 | Helpers.FieldToUTF8String(querydata.Name)); | 3215 | Helpers.FieldToUTF8String(querydata.Name)); |
2977 | } | 3216 | } |
2978 | break; | 3217 | break; |
2979 | case PacketType.AgentDataUpdateRequest: | 3218 | case PacketType.AgentDataUpdateRequest: |
2980 | AgentDataUpdateRequestPacket avRequestDataUpdatePacket = (AgentDataUpdateRequestPacket)Pack; | 3219 | AgentDataUpdateRequestPacket avRequestDataUpdatePacket = (AgentDataUpdateRequestPacket)Pack; |
2981 | 3220 | ||
2982 | if (OnAgentDataUpdateRequest != null) | 3221 | handler025 = OnAgentDataUpdateRequest; |
3222 | |||
3223 | if (handler025 != null) | ||
2983 | { | 3224 | { |
2984 | OnAgentDataUpdateRequest(this, avRequestDataUpdatePacket.AgentData.AgentID, avRequestDataUpdatePacket.AgentData.SessionID); | 3225 | handler025(this, avRequestDataUpdatePacket.AgentData.AgentID, avRequestDataUpdatePacket.AgentData.SessionID); |
2985 | } | 3226 | } |
2986 | 3227 | ||
2987 | break; | 3228 | break; |
2988 | case PacketType.UserInfoRequest: | 3229 | case PacketType.UserInfoRequest: |
2989 | UserInfoRequestPacket avUserInfoRequestPacket = (UserInfoRequestPacket)Pack; | 3230 | UserInfoRequestPacket avUserInfoRequestPacket = (UserInfoRequestPacket)Pack; |
2990 | if (OnUserInfoRequest != null) | 3231 | |
3232 | handler026 = OnUserInfoRequest; | ||
3233 | if (handler026 != null) | ||
2991 | { | 3234 | { |
2992 | OnUserInfoRequest(this,avUserInfoRequestPacket.AgentData.AgentID,avUserInfoRequestPacket.AgentData.SessionID); | 3235 | handler026(this, avUserInfoRequestPacket.AgentData.AgentID, avUserInfoRequestPacket.AgentData.SessionID); |
2993 | 3236 | ||
2994 | } | 3237 | } |
2995 | break; | 3238 | break; |
2996 | 3239 | ||
2997 | case PacketType.SetStartLocationRequest: | 3240 | case PacketType.SetStartLocationRequest: |
2998 | SetStartLocationRequestPacket avSetStartLocationRequestPacket = (SetStartLocationRequestPacket)Pack; | 3241 | SetStartLocationRequestPacket avSetStartLocationRequestPacket = (SetStartLocationRequestPacket)Pack; |
3242 | |||
2999 | if (avSetStartLocationRequestPacket.AgentData.AgentID == AgentId && avSetStartLocationRequestPacket.AgentData.SessionID == SessionId) | 3243 | if (avSetStartLocationRequestPacket.AgentData.AgentID == AgentId && avSetStartLocationRequestPacket.AgentData.SessionID == SessionId) |
3000 | { | 3244 | { |
3001 | if (OnSetStartLocationRequest != null) | 3245 | handler027 = OnSetStartLocationRequest; |
3246 | if (handler027 != null) | ||
3002 | { | 3247 | { |
3003 | OnSetStartLocationRequest(this, 0, avSetStartLocationRequestPacket.StartLocationData.LocationPos, | 3248 | handler027(this, 0, avSetStartLocationRequestPacket.StartLocationData.LocationPos, |
3004 | avSetStartLocationRequestPacket.StartLocationData.LocationLookAt, | 3249 | avSetStartLocationRequestPacket.StartLocationData.LocationLookAt, |
3005 | avSetStartLocationRequestPacket.StartLocationData.LocationID); | 3250 | avSetStartLocationRequestPacket.StartLocationData.LocationID); |
3006 | } | 3251 | } |
@@ -3029,9 +3274,10 @@ namespace OpenSim.Region.ClientStack | |||
3029 | childrenprims.Add(link.ObjectData[i].ObjectLocalID); | 3274 | childrenprims.Add(link.ObjectData[i].ObjectLocalID); |
3030 | } | 3275 | } |
3031 | } | 3276 | } |
3032 | if (OnLinkObjects != null) | 3277 | handler028 = OnLinkObjects; |
3278 | if (handler028 != null) | ||
3033 | { | 3279 | { |
3034 | OnLinkObjects(parentprimid, childrenprims); | 3280 | handler028(parentprimid, childrenprims); |
3035 | } | 3281 | } |
3036 | break; | 3282 | break; |
3037 | case PacketType.ObjectDelink: | 3283 | case PacketType.ObjectDelink: |
@@ -3046,10 +3292,10 @@ namespace OpenSim.Region.ClientStack | |||
3046 | { | 3292 | { |
3047 | prims.Add(delink.ObjectData[i].ObjectLocalID); | 3293 | prims.Add(delink.ObjectData[i].ObjectLocalID); |
3048 | } | 3294 | } |
3049 | 3295 | handler029 = OnDelinkObjects; | |
3050 | if (OnDelinkObjects != null) | 3296 | if (handler029 != null) |
3051 | { | 3297 | { |
3052 | OnDelinkObjects(prims); | 3298 | handler029(prims); |
3053 | } | 3299 | } |
3054 | 3300 | ||
3055 | break; | 3301 | break; |
@@ -3064,37 +3310,47 @@ namespace OpenSim.Region.ClientStack | |||
3064 | //RayEnd: <61.97724, 141.995, 92.58341> | 3310 | //RayEnd: <61.97724, 141.995, 92.58341> |
3065 | //RayTargetID: 00000000-0000-0000-0000-000000000000 | 3311 | //RayTargetID: 00000000-0000-0000-0000-000000000000 |
3066 | 3312 | ||
3067 | OnAddPrim(AgentId, addPacket.ObjectData.RayEnd, addPacket.ObjectData.Rotation, shape, addPacket.ObjectData.BypassRaycast, addPacket.ObjectData.RayStart, addPacket.ObjectData.RayTargetID, addPacket.ObjectData.RayEndIsIntersection); | 3313 | handler030 = OnAddPrim; |
3314 | if (handler030 != null) | ||
3315 | handler030(AgentId, addPacket.ObjectData.RayEnd, addPacket.ObjectData.Rotation, shape, addPacket.ObjectData.BypassRaycast, addPacket.ObjectData.RayStart, addPacket.ObjectData.RayTargetID, addPacket.ObjectData.RayEndIsIntersection); | ||
3068 | } | 3316 | } |
3069 | break; | 3317 | break; |
3070 | case PacketType.ObjectShape: | 3318 | case PacketType.ObjectShape: |
3071 | ObjectShapePacket shapePacket = (ObjectShapePacket)Pack; | 3319 | ObjectShapePacket shapePacket = (ObjectShapePacket)Pack; |
3320 | handler031 = null; | ||
3072 | for (int i = 0; i < shapePacket.ObjectData.Length; i++) | 3321 | for (int i = 0; i < shapePacket.ObjectData.Length; i++) |
3073 | { | 3322 | { |
3074 | if (OnUpdatePrimShape != null) | 3323 | handler031 = OnUpdatePrimShape; |
3324 | if (handler031 != null) | ||
3075 | { | 3325 | { |
3076 | OnUpdatePrimShape(m_agentId, shapePacket.ObjectData[i].ObjectLocalID, | 3326 | handler031(m_agentId, shapePacket.ObjectData[i].ObjectLocalID, |
3077 | shapePacket.ObjectData[i]); | 3327 | shapePacket.ObjectData[i]); |
3078 | } | 3328 | } |
3079 | } | 3329 | } |
3080 | break; | 3330 | break; |
3081 | case PacketType.ObjectExtraParams: | 3331 | case PacketType.ObjectExtraParams: |
3082 | ObjectExtraParamsPacket extraPar = (ObjectExtraParamsPacket)Pack; | 3332 | ObjectExtraParamsPacket extraPar = (ObjectExtraParamsPacket)Pack; |
3083 | if (OnUpdateExtraParams != null) | 3333 | |
3334 | handler032 = OnUpdateExtraParams; | ||
3335 | if (handler032 != null) | ||
3084 | { | 3336 | { |
3085 | OnUpdateExtraParams(m_agentId, extraPar.ObjectData[0].ObjectLocalID, | 3337 | handler032(m_agentId, extraPar.ObjectData[0].ObjectLocalID, |
3086 | extraPar.ObjectData[0].ParamType, | 3338 | extraPar.ObjectData[0].ParamType, |
3087 | extraPar.ObjectData[0].ParamInUse, extraPar.ObjectData[0].ParamData); | 3339 | extraPar.ObjectData[0].ParamInUse, extraPar.ObjectData[0].ParamData); |
3088 | } | 3340 | } |
3089 | break; | 3341 | break; |
3090 | case PacketType.ObjectDuplicate: | 3342 | case PacketType.ObjectDuplicate: |
3091 | ObjectDuplicatePacket dupe = (ObjectDuplicatePacket)Pack; | 3343 | ObjectDuplicatePacket dupe = (ObjectDuplicatePacket)Pack; |
3092 | ObjectDuplicatePacket.AgentDataBlock AgentandGroupData = dupe.AgentData; | 3344 | ObjectDuplicatePacket.AgentDataBlock AgentandGroupData = dupe.AgentData; |
3345 | |||
3346 | handler033 = null; | ||
3347 | |||
3093 | for (int i = 0; i < dupe.ObjectData.Length; i++) | 3348 | for (int i = 0; i < dupe.ObjectData.Length; i++) |
3094 | { | 3349 | { |
3095 | if (OnObjectDuplicate != null) | 3350 | handler033 = OnObjectDuplicate; |
3351 | if (handler033 != null) | ||
3096 | { | 3352 | { |
3097 | OnObjectDuplicate(dupe.ObjectData[i].ObjectLocalID, dupe.SharedData.Offset, | 3353 | handler033(dupe.ObjectData[i].ObjectLocalID, dupe.SharedData.Offset, |
3098 | dupe.SharedData.DuplicateFlags, AgentandGroupData.AgentID, | 3354 | dupe.SharedData.DuplicateFlags, AgentandGroupData.AgentID, |
3099 | AgentandGroupData.GroupID); | 3355 | AgentandGroupData.GroupID); |
3100 | } | 3356 | } |
@@ -3104,19 +3360,27 @@ namespace OpenSim.Region.ClientStack | |||
3104 | 3360 | ||
3105 | case PacketType.ObjectSelect: | 3361 | case PacketType.ObjectSelect: |
3106 | ObjectSelectPacket incomingselect = (ObjectSelectPacket)Pack; | 3362 | ObjectSelectPacket incomingselect = (ObjectSelectPacket)Pack; |
3363 | |||
3364 | handler034 = null; | ||
3365 | |||
3107 | for (int i = 0; i < incomingselect.ObjectData.Length; i++) | 3366 | for (int i = 0; i < incomingselect.ObjectData.Length; i++) |
3108 | { | 3367 | { |
3109 | if (OnObjectSelect != null) | 3368 | handler034 = OnObjectSelect; |
3369 | if (handler034 != null) | ||
3110 | { | 3370 | { |
3111 | OnObjectSelect(incomingselect.ObjectData[i].ObjectLocalID, this); | 3371 | handler034(incomingselect.ObjectData[i].ObjectLocalID, this); |
3112 | } | 3372 | } |
3113 | } | 3373 | } |
3114 | break; | 3374 | break; |
3115 | case PacketType.ObjectDeselect: | 3375 | case PacketType.ObjectDeselect: |
3116 | ObjectDeselectPacket incomingdeselect = (ObjectDeselectPacket)Pack; | 3376 | ObjectDeselectPacket incomingdeselect = (ObjectDeselectPacket)Pack; |
3377 | |||
3378 | handler035 = null; | ||
3379 | |||
3117 | for (int i = 0; i < incomingdeselect.ObjectData.Length; i++) | 3380 | for (int i = 0; i < incomingdeselect.ObjectData.Length; i++) |
3118 | { | 3381 | { |
3119 | if (OnObjectDeselect != null) | 3382 | handler035 = OnObjectDeselect; |
3383 | if (handler035 != null) | ||
3120 | { | 3384 | { |
3121 | OnObjectDeselect(incomingdeselect.ObjectData[i].ObjectLocalID, this); | 3385 | OnObjectDeselect(incomingdeselect.ObjectData[i].ObjectLocalID, this); |
3122 | } | 3386 | } |
@@ -3124,63 +3388,84 @@ namespace OpenSim.Region.ClientStack | |||
3124 | break; | 3388 | break; |
3125 | case PacketType.ObjectFlagUpdate: | 3389 | case PacketType.ObjectFlagUpdate: |
3126 | ObjectFlagUpdatePacket flags = (ObjectFlagUpdatePacket)Pack; | 3390 | ObjectFlagUpdatePacket flags = (ObjectFlagUpdatePacket)Pack; |
3127 | if (OnUpdatePrimFlags != null) | 3391 | |
3392 | handler036 = OnUpdatePrimFlags; | ||
3393 | |||
3394 | if (handler036 != null) | ||
3128 | { | 3395 | { |
3129 | OnUpdatePrimFlags(flags.AgentData.ObjectLocalID, Pack, this); | 3396 | handler036(flags.AgentData.ObjectLocalID, Pack, this); |
3130 | } | 3397 | } |
3131 | break; | 3398 | break; |
3132 | case PacketType.ObjectImage: | 3399 | case PacketType.ObjectImage: |
3133 | ObjectImagePacket imagePack = (ObjectImagePacket)Pack; | 3400 | ObjectImagePacket imagePack = (ObjectImagePacket)Pack; |
3401 | |||
3402 | handler037 = null; | ||
3134 | for (int i = 0; i < imagePack.ObjectData.Length; i++) | 3403 | for (int i = 0; i < imagePack.ObjectData.Length; i++) |
3135 | { | 3404 | { |
3136 | if (OnUpdatePrimTexture != null) | 3405 | handler037 = OnUpdatePrimTexture; |
3406 | if (handler037 != null) | ||
3137 | { | 3407 | { |
3138 | OnUpdatePrimTexture(imagePack.ObjectData[i].ObjectLocalID, | 3408 | handler037(imagePack.ObjectData[i].ObjectLocalID, |
3139 | imagePack.ObjectData[i].TextureEntry, this); | 3409 | imagePack.ObjectData[i].TextureEntry, this); |
3140 | } | 3410 | } |
3141 | } | 3411 | } |
3142 | break; | 3412 | break; |
3143 | case PacketType.ObjectGrab: | 3413 | case PacketType.ObjectGrab: |
3144 | ObjectGrabPacket grab = (ObjectGrabPacket)Pack; | 3414 | ObjectGrabPacket grab = (ObjectGrabPacket)Pack; |
3145 | if (OnGrabObject != null) | 3415 | |
3416 | handler038 = OnGrabObject; | ||
3417 | |||
3418 | if (handler038 != null) | ||
3146 | { | 3419 | { |
3147 | OnGrabObject(grab.ObjectData.LocalID, grab.ObjectData.GrabOffset, this); | 3420 | handler038(grab.ObjectData.LocalID, grab.ObjectData.GrabOffset, this); |
3148 | } | 3421 | } |
3149 | break; | 3422 | break; |
3150 | case PacketType.ObjectGrabUpdate: | 3423 | case PacketType.ObjectGrabUpdate: |
3151 | ObjectGrabUpdatePacket grabUpdate = (ObjectGrabUpdatePacket)Pack; | 3424 | ObjectGrabUpdatePacket grabUpdate = (ObjectGrabUpdatePacket)Pack; |
3152 | if (OnGrabUpdate != null) | 3425 | |
3426 | handler039 = OnGrabUpdate; | ||
3427 | |||
3428 | if (handler039 != null) | ||
3153 | { | 3429 | { |
3154 | OnGrabUpdate(grabUpdate.ObjectData.ObjectID, grabUpdate.ObjectData.GrabOffsetInitial, | 3430 | handler039(grabUpdate.ObjectData.ObjectID, grabUpdate.ObjectData.GrabOffsetInitial, |
3155 | grabUpdate.ObjectData.GrabPosition, this); | 3431 | grabUpdate.ObjectData.GrabPosition, this); |
3156 | } | 3432 | } |
3157 | break; | 3433 | break; |
3158 | case PacketType.ObjectDeGrab: | 3434 | case PacketType.ObjectDeGrab: |
3159 | ObjectDeGrabPacket deGrab = (ObjectDeGrabPacket)Pack; | 3435 | ObjectDeGrabPacket deGrab = (ObjectDeGrabPacket)Pack; |
3160 | if (OnDeGrabObject != null) | 3436 | |
3437 | handler040 = OnDeGrabObject; | ||
3438 | if (handler040 != null) | ||
3161 | { | 3439 | { |
3162 | OnDeGrabObject(deGrab.ObjectData.LocalID, this); | 3440 | handler040(deGrab.ObjectData.LocalID, this); |
3163 | } | 3441 | } |
3164 | break; | 3442 | break; |
3165 | case PacketType.ObjectDescription: | 3443 | case PacketType.ObjectDescription: |
3166 | ObjectDescriptionPacket objDes = (ObjectDescriptionPacket)Pack; | 3444 | ObjectDescriptionPacket objDes = (ObjectDescriptionPacket)Pack; |
3445 | |||
3446 | handler041 = null; | ||
3447 | |||
3167 | for (int i = 0; i < objDes.ObjectData.Length; i++) | 3448 | for (int i = 0; i < objDes.ObjectData.Length; i++) |
3168 | { | 3449 | { |
3169 | if (OnObjectDescription != null) | 3450 | handler041 = OnObjectDescription; |
3451 | if (handler041 != null) | ||
3170 | { | 3452 | { |
3171 | OnObjectDescription(this, objDes.ObjectData[i].LocalID, | 3453 | handler041(this, objDes.ObjectData[i].LocalID, |
3172 | m_encoding.GetString(objDes.ObjectData[i].Description)); | 3454 | m_encoding.GetString(objDes.ObjectData[i].Description)); |
3173 | } | 3455 | } |
3174 | } | 3456 | } |
3175 | break; | 3457 | break; |
3176 | case PacketType.ObjectName: | 3458 | case PacketType.ObjectName: |
3177 | ObjectNamePacket objName = (ObjectNamePacket)Pack; | 3459 | ObjectNamePacket objName = (ObjectNamePacket)Pack; |
3460 | |||
3461 | handler042 = null; | ||
3178 | for (int i = 0; i < objName.ObjectData.Length; i++) | 3462 | for (int i = 0; i < objName.ObjectData.Length; i++) |
3179 | { | 3463 | { |
3180 | if (OnObjectName != null) | 3464 | handler042 = OnObjectName; |
3465 | if (handler042 != null) | ||
3181 | { | 3466 | { |
3182 | OnObjectName(this, objName.ObjectData[i].LocalID, | 3467 | handler042(this, objName.ObjectData[i].LocalID, |
3183 | m_encoding.GetString(objName.ObjectData[i].Name)); | 3468 | m_encoding.GetString(objName.ObjectData[i].Name)); |
3184 | } | 3469 | } |
3185 | } | 3470 | } |
3186 | break; | 3471 | break; |
@@ -3192,6 +3477,8 @@ namespace OpenSim.Region.ClientStack | |||
3192 | LLUUID AgentID = newobjPerms.AgentData.AgentID; | 3477 | LLUUID AgentID = newobjPerms.AgentData.AgentID; |
3193 | LLUUID SessionID = newobjPerms.AgentData.SessionID; | 3478 | LLUUID SessionID = newobjPerms.AgentData.SessionID; |
3194 | 3479 | ||
3480 | handler043 = null; | ||
3481 | |||
3195 | for (int i = 0; i < newobjPerms.ObjectData.Length; i++) | 3482 | for (int i = 0; i < newobjPerms.ObjectData.Length; i++) |
3196 | { | 3483 | { |
3197 | ObjectPermissionsPacket.ObjectDataBlock permChanges = newobjPerms.ObjectData[i]; | 3484 | ObjectPermissionsPacket.ObjectDataBlock permChanges = newobjPerms.ObjectData[i]; |
@@ -3202,7 +3489,10 @@ namespace OpenSim.Region.ClientStack | |||
3202 | uint mask = permChanges.Mask; | 3489 | uint mask = permChanges.Mask; |
3203 | byte set = permChanges.Set; | 3490 | byte set = permChanges.Set; |
3204 | 3491 | ||
3205 | OnObjectPermissions(this, AgentID, SessionID, field, localID, mask, set); | 3492 | handler043 = OnObjectPermissions; |
3493 | |||
3494 | if (handler043 != null) | ||
3495 | OnObjectPermissions(this, AgentID, SessionID, field, localID, mask, set); | ||
3206 | } | 3496 | } |
3207 | } | 3497 | } |
3208 | 3498 | ||
@@ -3228,10 +3518,12 @@ namespace OpenSim.Region.ClientStack | |||
3228 | 3518 | ||
3229 | RequestObjectPropertiesFamilyPacket.ObjectDataBlock packObjBlock = packToolTip.ObjectData; | 3519 | RequestObjectPropertiesFamilyPacket.ObjectDataBlock packObjBlock = packToolTip.ObjectData; |
3230 | 3520 | ||
3231 | if (OnRequestObjectPropertiesFamily != null) | 3521 | handler044 = OnRequestObjectPropertiesFamily; |
3522 | |||
3523 | if (handler044 != null) | ||
3232 | { | 3524 | { |
3233 | OnRequestObjectPropertiesFamily(this, m_agentId, packObjBlock.RequestFlags, | 3525 | handler044(this, m_agentId, packObjBlock.RequestFlags, |
3234 | packObjBlock.ObjectID); | 3526 | packObjBlock.ObjectID); |
3235 | } | 3527 | } |
3236 | 3528 | ||
3237 | break; | 3529 | break; |
@@ -3243,6 +3535,9 @@ namespace OpenSim.Region.ClientStack | |||
3243 | case PacketType.RequestImage: | 3535 | case PacketType.RequestImage: |
3244 | RequestImagePacket imageRequest = (RequestImagePacket)Pack; | 3536 | RequestImagePacket imageRequest = (RequestImagePacket)Pack; |
3245 | //Console.WriteLine("image request: " + Pack.ToString()); | 3537 | //Console.WriteLine("image request: " + Pack.ToString()); |
3538 | |||
3539 | handler045 = null; | ||
3540 | |||
3246 | for (int i = 0; i < imageRequest.RequestImage.Length; i++) | 3541 | for (int i = 0; i < imageRequest.RequestImage.Length; i++) |
3247 | { | 3542 | { |
3248 | if (OnRequestTexture != null) | 3543 | if (OnRequestTexture != null) |
@@ -3252,8 +3547,11 @@ namespace OpenSim.Region.ClientStack | |||
3252 | args.DiscardLevel = imageRequest.RequestImage[i].DiscardLevel; | 3547 | args.DiscardLevel = imageRequest.RequestImage[i].DiscardLevel; |
3253 | args.PacketNumber = imageRequest.RequestImage[i].Packet; | 3548 | args.PacketNumber = imageRequest.RequestImage[i].Packet; |
3254 | args.Priority = imageRequest.RequestImage[i].DownloadPriority; | 3549 | args.Priority = imageRequest.RequestImage[i].DownloadPriority; |
3255 | 3550 | ||
3256 | OnRequestTexture(this, args); | 3551 | handler045 = OnRequestTexture; |
3552 | |||
3553 | if (handler045 != null) | ||
3554 | OnRequestTexture(this, args); | ||
3257 | } | 3555 | } |
3258 | } | 3556 | } |
3259 | break; | 3557 | break; |
@@ -3266,10 +3564,14 @@ namespace OpenSim.Region.ClientStack | |||
3266 | AssetUploadRequestPacket request = (AssetUploadRequestPacket)Pack; | 3564 | AssetUploadRequestPacket request = (AssetUploadRequestPacket)Pack; |
3267 | // Console.WriteLine("upload request " + Pack.ToString()); | 3565 | // Console.WriteLine("upload request " + Pack.ToString()); |
3268 | // Console.WriteLine("upload request was for assetid: " + request.AssetBlock.TransactionID.Combine(this.SecureSessionId).ToString()); | 3566 | // Console.WriteLine("upload request was for assetid: " + request.AssetBlock.TransactionID.Combine(this.SecureSessionId).ToString()); |
3269 | if (OnAssetUploadRequest != null) | 3567 | LLUUID temp = LLUUID.Combine(request.AssetBlock.TransactionID, SecureSessionId); |
3568 | |||
3569 | handler046 = OnAssetUploadRequest; | ||
3570 | |||
3571 | if (handler046 != null) | ||
3270 | { | 3572 | { |
3271 | LLUUID temp = LLUUID.Combine(request.AssetBlock.TransactionID, SecureSessionId); | 3573 | |
3272 | OnAssetUploadRequest(this, temp, | 3574 | handler046(this, temp, |
3273 | request.AssetBlock.TransactionID, request.AssetBlock.Type, | 3575 | request.AssetBlock.TransactionID, request.AssetBlock.Type, |
3274 | request.AssetBlock.AssetData, request.AssetBlock.StoreLocal, | 3576 | request.AssetBlock.AssetData, request.AssetBlock.StoreLocal, |
3275 | request.AssetBlock.Tempfile); | 3577 | request.AssetBlock.Tempfile); |
@@ -3277,112 +3579,158 @@ namespace OpenSim.Region.ClientStack | |||
3277 | break; | 3579 | break; |
3278 | case PacketType.RequestXfer: | 3580 | case PacketType.RequestXfer: |
3279 | RequestXferPacket xferReq = (RequestXferPacket)Pack; | 3581 | RequestXferPacket xferReq = (RequestXferPacket)Pack; |
3280 | if (OnRequestXfer != null) | 3582 | |
3583 | handler047 = OnRequestXfer; | ||
3584 | |||
3585 | if (handler047 != null) | ||
3281 | { | 3586 | { |
3282 | OnRequestXfer(this, xferReq.XferID.ID, Util.FieldToString(xferReq.XferID.Filename)); | 3587 | handler047(this, xferReq.XferID.ID, Util.FieldToString(xferReq.XferID.Filename)); |
3283 | } | 3588 | } |
3284 | break; | 3589 | break; |
3285 | case PacketType.SendXferPacket: | 3590 | case PacketType.SendXferPacket: |
3286 | SendXferPacketPacket xferRec = (SendXferPacketPacket)Pack; | 3591 | SendXferPacketPacket xferRec = (SendXferPacketPacket)Pack; |
3287 | if (OnXferReceive != null) | 3592 | |
3593 | handler048 = OnXferReceive; | ||
3594 | if (handler048 != null) | ||
3288 | { | 3595 | { |
3289 | OnXferReceive(this, xferRec.XferID.ID, xferRec.XferID.Packet, xferRec.DataPacket.Data); | 3596 | handler048(this, xferRec.XferID.ID, xferRec.XferID.Packet, xferRec.DataPacket.Data); |
3290 | } | 3597 | } |
3291 | break; | 3598 | break; |
3292 | case PacketType.ConfirmXferPacket: | 3599 | case PacketType.ConfirmXferPacket: |
3293 | ConfirmXferPacketPacket confirmXfer = (ConfirmXferPacketPacket)Pack; | 3600 | ConfirmXferPacketPacket confirmXfer = (ConfirmXferPacketPacket)Pack; |
3294 | if (OnConfirmXfer != null) | 3601 | |
3602 | handler049 = OnConfirmXfer; | ||
3603 | if (handler049 != null) | ||
3295 | { | 3604 | { |
3296 | OnConfirmXfer(this, confirmXfer.XferID.ID, confirmXfer.XferID.Packet); | 3605 | handler049(this, confirmXfer.XferID.ID, confirmXfer.XferID.Packet); |
3297 | } | 3606 | } |
3298 | break; | 3607 | break; |
3299 | case PacketType.CreateInventoryFolder: | 3608 | case PacketType.CreateInventoryFolder: |
3300 | if (OnCreateNewInventoryFolder != null) | 3609 | CreateInventoryFolderPacket invFolder = (CreateInventoryFolderPacket)Pack; |
3610 | |||
3611 | handler050 = OnCreateNewInventoryFolder; | ||
3612 | if (handler050 != null) | ||
3301 | { | 3613 | { |
3302 | CreateInventoryFolderPacket invFolder = (CreateInventoryFolderPacket)Pack; | 3614 | |
3303 | OnCreateNewInventoryFolder(this, invFolder.FolderData.FolderID, | 3615 | handler050(this, invFolder.FolderData.FolderID, |
3304 | (ushort)invFolder.FolderData.Type, | 3616 | (ushort)invFolder.FolderData.Type, |
3305 | Util.FieldToString(invFolder.FolderData.Name), | 3617 | Util.FieldToString(invFolder.FolderData.Name), |
3306 | invFolder.FolderData.ParentID); | 3618 | invFolder.FolderData.ParentID); |
3307 | } | 3619 | } |
3308 | break; | 3620 | break; |
3309 | case PacketType.UpdateInventoryFolder: | 3621 | case PacketType.UpdateInventoryFolder: |
3310 | if (OnUpdateInventoryFolder != null) | 3622 | if (OnUpdateInventoryFolder != null) |
3311 | { | 3623 | { |
3312 | UpdateInventoryFolderPacket invFolder = (UpdateInventoryFolderPacket)Pack; | 3624 | UpdateInventoryFolderPacket invFolderx = (UpdateInventoryFolderPacket)Pack; |
3313 | for (int i = 0; i < invFolder.FolderData.Length; i++) | 3625 | |
3626 | handler051 = null; | ||
3627 | |||
3628 | for (int i = 0; i < invFolderx.FolderData.Length; i++) | ||
3314 | { | 3629 | { |
3315 | OnUpdateInventoryFolder(this, invFolder.FolderData[i].FolderID, | 3630 | handler051 = OnUpdateInventoryFolder; |
3316 | (ushort)invFolder.FolderData[i].Type, | 3631 | if (handler051 != null) |
3317 | Util.FieldToString(invFolder.FolderData[i].Name), | 3632 | { |
3318 | invFolder.FolderData[i].ParentID); | 3633 | OnUpdateInventoryFolder(this, invFolderx.FolderData[i].FolderID, |
3634 | (ushort)invFolderx.FolderData[i].Type, | ||
3635 | Util.FieldToString(invFolderx.FolderData[i].Name), | ||
3636 | invFolderx.FolderData[i].ParentID); | ||
3637 | } | ||
3319 | } | 3638 | } |
3320 | } | 3639 | } |
3321 | break; | 3640 | break; |
3322 | case PacketType.MoveInventoryFolder: | 3641 | case PacketType.MoveInventoryFolder: |
3323 | if (OnMoveInventoryFolder != null) | 3642 | if (OnMoveInventoryFolder != null) |
3324 | { | 3643 | { |
3325 | MoveInventoryFolderPacket invFolder = (MoveInventoryFolderPacket)Pack; | 3644 | MoveInventoryFolderPacket invFoldery = (MoveInventoryFolderPacket)Pack; |
3326 | for (int i = 0; i < invFolder.InventoryData.Length; i++) | 3645 | |
3646 | handler052 = null; | ||
3647 | |||
3648 | for (int i = 0; i < invFoldery.InventoryData.Length; i++) | ||
3327 | { | 3649 | { |
3328 | OnMoveInventoryFolder(this, invFolder.InventoryData[i].FolderID, | 3650 | handler052 = OnMoveInventoryFolder; |
3329 | invFolder.InventoryData[i].ParentID); | 3651 | if (handler052 != null) |
3652 | { | ||
3653 | OnMoveInventoryFolder(this, invFoldery.InventoryData[i].FolderID, | ||
3654 | invFoldery.InventoryData[i].ParentID); | ||
3655 | } | ||
3330 | } | 3656 | } |
3331 | } | 3657 | } |
3332 | break; | 3658 | break; |
3333 | case PacketType.CreateInventoryItem: | 3659 | case PacketType.CreateInventoryItem: |
3334 | CreateInventoryItemPacket createItem = (CreateInventoryItemPacket)Pack; | 3660 | CreateInventoryItemPacket createItem = (CreateInventoryItemPacket)Pack; |
3335 | if (OnCreateNewInventoryItem != null) | 3661 | |
3662 | handler053 = OnCreateNewInventoryItem; | ||
3663 | if (handler053 != null) | ||
3336 | { | 3664 | { |
3337 | OnCreateNewInventoryItem(this, createItem.InventoryBlock.TransactionID, | 3665 | handler053(this, createItem.InventoryBlock.TransactionID, |
3338 | createItem.InventoryBlock.FolderID, | 3666 | createItem.InventoryBlock.FolderID, |
3339 | createItem.InventoryBlock.CallbackID, | 3667 | createItem.InventoryBlock.CallbackID, |
3340 | Util.FieldToString(createItem.InventoryBlock.Description), | 3668 | Util.FieldToString(createItem.InventoryBlock.Description), |
3341 | Util.FieldToString(createItem.InventoryBlock.Name), | 3669 | Util.FieldToString(createItem.InventoryBlock.Name), |
3342 | createItem.InventoryBlock.InvType, | 3670 | createItem.InventoryBlock.InvType, |
3343 | createItem.InventoryBlock.Type, | 3671 | createItem.InventoryBlock.Type, |
3344 | createItem.InventoryBlock.WearableType, | 3672 | createItem.InventoryBlock.WearableType, |
3345 | createItem.InventoryBlock.NextOwnerMask); | 3673 | createItem.InventoryBlock.NextOwnerMask); |
3346 | } | 3674 | } |
3347 | break; | 3675 | break; |
3348 | case PacketType.FetchInventory: | 3676 | case PacketType.FetchInventory: |
3349 | if (OnFetchInventory != null) | 3677 | if (OnFetchInventory != null) |
3350 | { | 3678 | { |
3351 | FetchInventoryPacket FetchInventory = (FetchInventoryPacket)Pack; | 3679 | FetchInventoryPacket FetchInventoryx = (FetchInventoryPacket)Pack; |
3352 | for (int i = 0; i < FetchInventory.InventoryData.Length; i++) | 3680 | |
3681 | handler054 = null; | ||
3682 | |||
3683 | for (int i = 0; i < FetchInventoryx.InventoryData.Length; i++) | ||
3353 | { | 3684 | { |
3354 | OnFetchInventory(this, FetchInventory.InventoryData[i].ItemID, | 3685 | handler054 = OnFetchInventory; |
3355 | FetchInventory.InventoryData[i].OwnerID); | 3686 | |
3687 | if (handler054 != null) | ||
3688 | { | ||
3689 | OnFetchInventory(this, FetchInventoryx.InventoryData[i].ItemID, | ||
3690 | FetchInventoryx.InventoryData[i].OwnerID); | ||
3691 | } | ||
3356 | } | 3692 | } |
3357 | } | 3693 | } |
3358 | break; | 3694 | break; |
3359 | case PacketType.FetchInventoryDescendents: | 3695 | case PacketType.FetchInventoryDescendents: |
3360 | if (OnFetchInventoryDescendents != null) | 3696 | FetchInventoryDescendentsPacket Fetch = (FetchInventoryDescendentsPacket)Pack; |
3697 | |||
3698 | handler055 = OnFetchInventoryDescendents; | ||
3699 | if (handler055 != null) | ||
3361 | { | 3700 | { |
3362 | FetchInventoryDescendentsPacket Fetch = (FetchInventoryDescendentsPacket)Pack; | 3701 | |
3363 | OnFetchInventoryDescendents(this, Fetch.InventoryData.FolderID, Fetch.InventoryData.OwnerID, | 3702 | handler055(this, Fetch.InventoryData.FolderID, Fetch.InventoryData.OwnerID, |
3364 | Fetch.InventoryData.FetchFolders, Fetch.InventoryData.FetchItems, | 3703 | Fetch.InventoryData.FetchFolders, Fetch.InventoryData.FetchItems, |
3365 | Fetch.InventoryData.SortOrder); | 3704 | Fetch.InventoryData.SortOrder); |
3366 | } | 3705 | } |
3367 | break; | 3706 | break; |
3368 | case PacketType.PurgeInventoryDescendents: | 3707 | case PacketType.PurgeInventoryDescendents: |
3369 | if (OnPurgeInventoryDescendents != null) | 3708 | |
3709 | PurgeInventoryDescendentsPacket Purge = (PurgeInventoryDescendentsPacket)Pack; | ||
3710 | |||
3711 | handler056 = OnPurgeInventoryDescendents; | ||
3712 | if (handler056 != null) | ||
3370 | { | 3713 | { |
3371 | PurgeInventoryDescendentsPacket Purge = (PurgeInventoryDescendentsPacket)Pack; | 3714 | handler056(this, Purge.InventoryData.FolderID); |
3372 | OnPurgeInventoryDescendents(this, Purge.InventoryData.FolderID); | ||
3373 | } | 3715 | } |
3374 | break; | 3716 | break; |
3375 | case PacketType.UpdateInventoryItem: | 3717 | case PacketType.UpdateInventoryItem: |
3376 | UpdateInventoryItemPacket update = (UpdateInventoryItemPacket)Pack; | 3718 | UpdateInventoryItemPacket update = (UpdateInventoryItemPacket)Pack; |
3377 | if (OnUpdateInventoryItem != null) | 3719 | if (OnUpdateInventoryItem != null) |
3378 | { | 3720 | { |
3721 | handler057 = null; | ||
3379 | for (int i = 0; i < update.InventoryData.Length; i++) | 3722 | for (int i = 0; i < update.InventoryData.Length; i++) |
3380 | { | 3723 | { |
3381 | OnUpdateInventoryItem(this, update.InventoryData[i].TransactionID, | 3724 | handler057 = OnUpdateInventoryItem; |
3382 | update.InventoryData[i].ItemID, | 3725 | |
3383 | Util.FieldToString(update.InventoryData[i].Name), | 3726 | if (handler057 != null) |
3384 | Util.FieldToString(update.InventoryData[i].Description), | 3727 | { |
3385 | update.InventoryData[i].NextOwnerMask); | 3728 | OnUpdateInventoryItem(this, update.InventoryData[i].TransactionID, |
3729 | update.InventoryData[i].ItemID, | ||
3730 | Util.FieldToString(update.InventoryData[i].Name), | ||
3731 | Util.FieldToString(update.InventoryData[i].Description), | ||
3732 | update.InventoryData[i].NextOwnerMask); | ||
3733 | } | ||
3386 | } | 3734 | } |
3387 | } | 3735 | } |
3388 | //Console.WriteLine(Pack.ToString()); | 3736 | //Console.WriteLine(Pack.ToString()); |
@@ -3418,13 +3766,19 @@ namespace OpenSim.Region.ClientStack | |||
3418 | break; | 3766 | break; |
3419 | case PacketType.CopyInventoryItem: | 3767 | case PacketType.CopyInventoryItem: |
3420 | CopyInventoryItemPacket copyitem = (CopyInventoryItemPacket)Pack; | 3768 | CopyInventoryItemPacket copyitem = (CopyInventoryItemPacket)Pack; |
3769 | |||
3770 | handler058 = null; | ||
3421 | if (OnCopyInventoryItem != null) | 3771 | if (OnCopyInventoryItem != null) |
3422 | { | 3772 | { |
3423 | foreach (CopyInventoryItemPacket.InventoryDataBlock datablock in copyitem.InventoryData) | 3773 | foreach (CopyInventoryItemPacket.InventoryDataBlock datablock in copyitem.InventoryData) |
3424 | { | 3774 | { |
3425 | OnCopyInventoryItem(this, datablock.CallbackID, datablock.OldAgentID, | 3775 | handler058 = OnCopyInventoryItem; |
3426 | datablock.OldItemID, datablock.NewFolderID, | 3776 | if (handler058 != null) |
3427 | Util.FieldToString(datablock.NewName)); | 3777 | { |
3778 | handler058(this, datablock.CallbackID, datablock.OldAgentID, | ||
3779 | datablock.OldItemID, datablock.NewFolderID, | ||
3780 | Util.FieldToString(datablock.NewName)); | ||
3781 | } | ||
3428 | } | 3782 | } |
3429 | } | 3783 | } |
3430 | break; | 3784 | break; |
@@ -3432,10 +3786,15 @@ namespace OpenSim.Region.ClientStack | |||
3432 | MoveInventoryItemPacket moveitem = (MoveInventoryItemPacket)Pack; | 3786 | MoveInventoryItemPacket moveitem = (MoveInventoryItemPacket)Pack; |
3433 | if (OnMoveInventoryItem != null) | 3787 | if (OnMoveInventoryItem != null) |
3434 | { | 3788 | { |
3789 | handler059 = null; | ||
3435 | foreach (MoveInventoryItemPacket.InventoryDataBlock datablock in moveitem.InventoryData) | 3790 | foreach (MoveInventoryItemPacket.InventoryDataBlock datablock in moveitem.InventoryData) |
3436 | { | 3791 | { |
3437 | OnMoveInventoryItem(this, datablock.FolderID, datablock.ItemID, datablock.Length, | 3792 | handler059 = OnMoveInventoryItem; |
3438 | Util.FieldToString(datablock.NewName)); | 3793 | if (handler059 != null) |
3794 | { | ||
3795 | handler059(this, datablock.FolderID, datablock.ItemID, datablock.Length, | ||
3796 | Util.FieldToString(datablock.NewName)); | ||
3797 | } | ||
3439 | } | 3798 | } |
3440 | } | 3799 | } |
3441 | break; | 3800 | break; |
@@ -3443,9 +3802,14 @@ namespace OpenSim.Region.ClientStack | |||
3443 | RemoveInventoryItemPacket removeItem = (RemoveInventoryItemPacket)Pack; | 3802 | RemoveInventoryItemPacket removeItem = (RemoveInventoryItemPacket)Pack; |
3444 | if (OnRemoveInventoryItem != null) | 3803 | if (OnRemoveInventoryItem != null) |
3445 | { | 3804 | { |
3805 | handler060 = null; | ||
3446 | foreach (RemoveInventoryItemPacket.InventoryDataBlock datablock in removeItem.InventoryData) | 3806 | foreach (RemoveInventoryItemPacket.InventoryDataBlock datablock in removeItem.InventoryData) |
3447 | { | 3807 | { |
3448 | OnRemoveInventoryItem(this, datablock.ItemID); | 3808 | handler060 = OnRemoveInventoryItem; |
3809 | if (handler060 != null) | ||
3810 | { | ||
3811 | handler060(this, datablock.ItemID); | ||
3812 | } | ||
3449 | } | 3813 | } |
3450 | } | 3814 | } |
3451 | break; | 3815 | break; |
@@ -3453,17 +3817,25 @@ namespace OpenSim.Region.ClientStack | |||
3453 | RemoveInventoryFolderPacket removeFolder = (RemoveInventoryFolderPacket)Pack; | 3817 | RemoveInventoryFolderPacket removeFolder = (RemoveInventoryFolderPacket)Pack; |
3454 | if (OnRemoveInventoryFolder != null) | 3818 | if (OnRemoveInventoryFolder != null) |
3455 | { | 3819 | { |
3820 | handler061 = null; | ||
3456 | foreach (RemoveInventoryFolderPacket.FolderDataBlock datablock in removeFolder.FolderData) | 3821 | foreach (RemoveInventoryFolderPacket.FolderDataBlock datablock in removeFolder.FolderData) |
3457 | { | 3822 | { |
3458 | OnRemoveInventoryFolder(this, datablock.FolderID); | 3823 | handler061 = OnRemoveInventoryFolder; |
3824 | |||
3825 | if (handler061 != null) | ||
3826 | { | ||
3827 | handler061(this, datablock.FolderID); | ||
3828 | } | ||
3459 | } | 3829 | } |
3460 | } | 3830 | } |
3461 | break; | 3831 | break; |
3462 | case PacketType.RequestTaskInventory: | 3832 | case PacketType.RequestTaskInventory: |
3463 | RequestTaskInventoryPacket requesttask = (RequestTaskInventoryPacket)Pack; | 3833 | RequestTaskInventoryPacket requesttask = (RequestTaskInventoryPacket)Pack; |
3464 | if (OnRequestTaskInventory != null) | 3834 | |
3835 | handler062 = OnRequestTaskInventory; | ||
3836 | if (handler062 != null) | ||
3465 | { | 3837 | { |
3466 | OnRequestTaskInventory(this, requesttask.InventoryData.LocalID); | 3838 | handler062(this, requesttask.InventoryData.LocalID); |
3467 | } | 3839 | } |
3468 | break; | 3840 | break; |
3469 | case PacketType.UpdateTaskInventory: | 3841 | case PacketType.UpdateTaskInventory: |
@@ -3472,16 +3844,23 @@ namespace OpenSim.Region.ClientStack | |||
3472 | { | 3844 | { |
3473 | if (updatetask.UpdateData.Key == 0) | 3845 | if (updatetask.UpdateData.Key == 0) |
3474 | { | 3846 | { |
3475 | OnUpdateTaskInventory(this, updatetask.InventoryData.ItemID, | 3847 | handler063 = OnUpdateTaskInventory; |
3476 | updatetask.InventoryData.FolderID, updatetask.UpdateData.LocalID); | 3848 | if (handler063 != null) |
3849 | { | ||
3850 | handler063(this, updatetask.InventoryData.ItemID, | ||
3851 | updatetask.InventoryData.FolderID, updatetask.UpdateData.LocalID); | ||
3852 | } | ||
3477 | } | 3853 | } |
3478 | } | 3854 | } |
3479 | break; | 3855 | break; |
3480 | case PacketType.RemoveTaskInventory: | 3856 | case PacketType.RemoveTaskInventory: |
3481 | RemoveTaskInventoryPacket removeTask = (RemoveTaskInventoryPacket)Pack; | 3857 | RemoveTaskInventoryPacket removeTask = (RemoveTaskInventoryPacket)Pack; |
3482 | if (OnRemoveTaskItem != null) | 3858 | |
3859 | handler064 = OnRemoveTaskItem; | ||
3860 | |||
3861 | if (handler064 != null) | ||
3483 | { | 3862 | { |
3484 | OnRemoveTaskItem(this, removeTask.InventoryData.ItemID, removeTask.InventoryData.LocalID); | 3863 | handler064(this, removeTask.InventoryData.ItemID, removeTask.InventoryData.LocalID); |
3485 | } | 3864 | } |
3486 | break; | 3865 | break; |
3487 | case PacketType.MoveTaskInventory: | 3866 | case PacketType.MoveTaskInventory: |
@@ -3489,10 +3868,13 @@ namespace OpenSim.Region.ClientStack | |||
3489 | break; | 3868 | break; |
3490 | case PacketType.RezScript: | 3869 | case PacketType.RezScript: |
3491 | //Console.WriteLine(Pack.ToString()); | 3870 | //Console.WriteLine(Pack.ToString()); |
3492 | RezScriptPacket rezScript = (RezScriptPacket)Pack; | 3871 | RezScriptPacket rezScriptx = (RezScriptPacket)Pack; |
3493 | if (OnRezScript != null) | 3872 | |
3873 | handler065 = OnRezScript; | ||
3874 | |||
3875 | if (handler065 != null) | ||
3494 | { | 3876 | { |
3495 | OnRezScript(this, rezScript.InventoryBlock.ItemID, rezScript.UpdateBlock.ObjectLocalID); | 3877 | handler065(this, rezScriptx.InventoryBlock.ItemID, rezScriptx.UpdateBlock.ObjectLocalID); |
3496 | } | 3878 | } |
3497 | break; | 3879 | break; |
3498 | case PacketType.MapLayerRequest: | 3880 | case PacketType.MapLayerRequest: |
@@ -3500,9 +3882,11 @@ namespace OpenSim.Region.ClientStack | |||
3500 | break; | 3882 | break; |
3501 | case PacketType.MapBlockRequest: | 3883 | case PacketType.MapBlockRequest: |
3502 | MapBlockRequestPacket MapRequest = (MapBlockRequestPacket)Pack; | 3884 | MapBlockRequestPacket MapRequest = (MapBlockRequestPacket)Pack; |
3503 | if (OnRequestMapBlocks != null) | 3885 | |
3886 | handler066 = OnRequestMapBlocks; | ||
3887 | if (handler066 != null) | ||
3504 | { | 3888 | { |
3505 | OnRequestMapBlocks(this, MapRequest.PositionData.MinX, MapRequest.PositionData.MinY, | 3889 | handler066(this, MapRequest.PositionData.MinX, MapRequest.PositionData.MinY, |
3506 | MapRequest.PositionData.MaxX, MapRequest.PositionData.MaxY); | 3890 | MapRequest.PositionData.MaxX, MapRequest.PositionData.MaxY); |
3507 | } | 3891 | } |
3508 | break; | 3892 | break; |
@@ -3510,9 +3894,10 @@ namespace OpenSim.Region.ClientStack | |||
3510 | MapNameRequestPacket map = (MapNameRequestPacket)Pack; | 3894 | MapNameRequestPacket map = (MapNameRequestPacket)Pack; |
3511 | string mapName = UTF8Encoding.UTF8.GetString(map.NameData.Name, 0, | 3895 | string mapName = UTF8Encoding.UTF8.GetString(map.NameData.Name, 0, |
3512 | map.NameData.Name.Length - 1); | 3896 | map.NameData.Name.Length - 1); |
3513 | if (OnMapNameRequest != null) | 3897 | handler067 = OnMapNameRequest; |
3898 | if (handler067 != null) | ||
3514 | { | 3899 | { |
3515 | OnMapNameRequest(this, mapName); | 3900 | handler067(this, mapName); |
3516 | } | 3901 | } |
3517 | break; | 3902 | break; |
3518 | case PacketType.TeleportLandmarkRequest: | 3903 | case PacketType.TeleportLandmarkRequest: |
@@ -3567,9 +3952,10 @@ namespace OpenSim.Region.ClientStack | |||
3567 | TeleportLocationRequestPacket tpLocReq = (TeleportLocationRequestPacket)Pack; | 3952 | TeleportLocationRequestPacket tpLocReq = (TeleportLocationRequestPacket)Pack; |
3568 | // Console.WriteLine(tpLocReq.ToString()); | 3953 | // Console.WriteLine(tpLocReq.ToString()); |
3569 | 3954 | ||
3570 | if (OnTeleportLocationRequest != null) | 3955 | handler068 = OnTeleportLocationRequest; |
3956 | if (handler068 != null) | ||
3571 | { | 3957 | { |
3572 | OnTeleportLocationRequest(this, tpLocReq.Info.RegionHandle, tpLocReq.Info.Position, | 3958 | handler068(this, tpLocReq.Info.RegionHandle, tpLocReq.Info.Position, |
3573 | tpLocReq.Info.LookAt, 16); | 3959 | tpLocReq.Info.LookAt, 16); |
3574 | } | 3960 | } |
3575 | else | 3961 | else |
@@ -3586,9 +3972,12 @@ namespace OpenSim.Region.ClientStack | |||
3586 | 3972 | ||
3587 | case PacketType.MoneyBalanceRequest: | 3973 | case PacketType.MoneyBalanceRequest: |
3588 | MoneyBalanceRequestPacket moneybalancerequestpacket = (MoneyBalanceRequestPacket)Pack; | 3974 | MoneyBalanceRequestPacket moneybalancerequestpacket = (MoneyBalanceRequestPacket)Pack; |
3589 | if (OnMoneyBalanceRequest != null) | 3975 | |
3976 | handler069 = OnMoneyBalanceRequest; | ||
3977 | |||
3978 | if (handler069 != null) | ||
3590 | { | 3979 | { |
3591 | OnMoneyBalanceRequest(this, moneybalancerequestpacket.AgentData.AgentID, moneybalancerequestpacket.AgentData.SessionID, moneybalancerequestpacket.MoneyData.TransactionID); | 3980 | handler069(this, moneybalancerequestpacket.AgentData.AgentID, moneybalancerequestpacket.AgentData.SessionID, moneybalancerequestpacket.MoneyData.TransactionID); |
3592 | } | 3981 | } |
3593 | 3982 | ||
3594 | 3983 | ||
@@ -3597,7 +3986,11 @@ namespace OpenSim.Region.ClientStack | |||
3597 | UUIDNameRequestPacket incoming = (UUIDNameRequestPacket)Pack; | 3986 | UUIDNameRequestPacket incoming = (UUIDNameRequestPacket)Pack; |
3598 | foreach (UUIDNameRequestPacket.UUIDNameBlockBlock UUIDBlock in incoming.UUIDNameBlock) | 3987 | foreach (UUIDNameRequestPacket.UUIDNameBlockBlock UUIDBlock in incoming.UUIDNameBlock) |
3599 | { | 3988 | { |
3600 | OnNameFromUUIDRequest(UUIDBlock.ID, this); | 3989 | handler070 = OnNameFromUUIDRequest; |
3990 | if (handler070 != null) | ||
3991 | { | ||
3992 | handler070(UUIDBlock.ID, this); | ||
3993 | } | ||
3601 | } | 3994 | } |
3602 | break; | 3995 | break; |
3603 | 3996 | ||
@@ -3605,11 +3998,14 @@ namespace OpenSim.Region.ClientStack | |||
3605 | 3998 | ||
3606 | case PacketType.ParcelAccessListRequest: | 3999 | case PacketType.ParcelAccessListRequest: |
3607 | ParcelAccessListRequestPacket requestPacket = (ParcelAccessListRequestPacket)Pack; | 4000 | ParcelAccessListRequestPacket requestPacket = (ParcelAccessListRequestPacket)Pack; |
3608 | if (OnParcelAccessListRequest != null) | 4001 | |
4002 | handler071 = OnParcelAccessListRequest; | ||
4003 | |||
4004 | if (handler071 != null) | ||
3609 | { | 4005 | { |
3610 | OnParcelAccessListRequest(requestPacket.AgentData.AgentID, requestPacket.AgentData.SessionID, | 4006 | handler071(requestPacket.AgentData.AgentID, requestPacket.AgentData.SessionID, |
3611 | requestPacket.Data.Flags, requestPacket.Data.SequenceID, | 4007 | requestPacket.Data.Flags, requestPacket.Data.SequenceID, |
3612 | requestPacket.Data.LocalID, this); | 4008 | requestPacket.Data.LocalID, this); |
3613 | } | 4009 | } |
3614 | break; | 4010 | break; |
3615 | 4011 | ||
@@ -3625,67 +4021,84 @@ namespace OpenSim.Region.ClientStack | |||
3625 | entries.Add(entry); | 4021 | entries.Add(entry); |
3626 | } | 4022 | } |
3627 | 4023 | ||
3628 | if (OnParcelAccessListUpdateRequest != null) | 4024 | handler072 = OnParcelAccessListUpdateRequest; |
4025 | if (handler072 != null) | ||
3629 | { | 4026 | { |
3630 | OnParcelAccessListUpdateRequest(updatePacket.AgentData.AgentID, | 4027 | handler072(updatePacket.AgentData.AgentID, |
3631 | updatePacket.AgentData.SessionID, updatePacket.Data.Flags, | 4028 | updatePacket.AgentData.SessionID, updatePacket.Data.Flags, |
3632 | updatePacket.Data.LocalID, entries, this); | 4029 | updatePacket.Data.LocalID, entries, this); |
3633 | } | 4030 | } |
3634 | break; | 4031 | break; |
3635 | case PacketType.ParcelPropertiesRequest: | 4032 | case PacketType.ParcelPropertiesRequest: |
3636 | 4033 | ||
3637 | ParcelPropertiesRequestPacket propertiesRequest = (ParcelPropertiesRequestPacket)Pack; | 4034 | ParcelPropertiesRequestPacket propertiesRequest = (ParcelPropertiesRequestPacket)Pack; |
3638 | if (OnParcelPropertiesRequest != null) | 4035 | |
4036 | handler073 = OnParcelPropertiesRequest; | ||
4037 | if (handler073 != null) | ||
3639 | { | 4038 | { |
3640 | OnParcelPropertiesRequest((int)Math.Round(propertiesRequest.ParcelData.West), | 4039 | handler073((int)Math.Round(propertiesRequest.ParcelData.West), |
3641 | (int)Math.Round(propertiesRequest.ParcelData.South), | 4040 | (int)Math.Round(propertiesRequest.ParcelData.South), |
3642 | (int)Math.Round(propertiesRequest.ParcelData.East), | 4041 | (int)Math.Round(propertiesRequest.ParcelData.East), |
3643 | (int)Math.Round(propertiesRequest.ParcelData.North), | 4042 | (int)Math.Round(propertiesRequest.ParcelData.North), |
3644 | propertiesRequest.ParcelData.SequenceID, | 4043 | propertiesRequest.ParcelData.SequenceID, |
3645 | propertiesRequest.ParcelData.SnapSelection, this); | 4044 | propertiesRequest.ParcelData.SnapSelection, this); |
3646 | } | 4045 | } |
3647 | break; | 4046 | break; |
3648 | case PacketType.ParcelDivide: | 4047 | case PacketType.ParcelDivide: |
3649 | ParcelDividePacket landDivide = (ParcelDividePacket)Pack; | 4048 | ParcelDividePacket landDivide = (ParcelDividePacket)Pack; |
3650 | if (OnParcelDivideRequest != null) | 4049 | |
4050 | handler074 = OnParcelDivideRequest; | ||
4051 | if (handler074 != null) | ||
3651 | { | 4052 | { |
3652 | OnParcelDivideRequest((int)Math.Round(landDivide.ParcelData.West), | 4053 | handler074((int)Math.Round(landDivide.ParcelData.West), |
3653 | (int)Math.Round(landDivide.ParcelData.South), | 4054 | (int)Math.Round(landDivide.ParcelData.South), |
3654 | (int)Math.Round(landDivide.ParcelData.East), | 4055 | (int)Math.Round(landDivide.ParcelData.East), |
3655 | (int)Math.Round(landDivide.ParcelData.North), this); | 4056 | (int)Math.Round(landDivide.ParcelData.North), this); |
3656 | } | 4057 | } |
3657 | break; | 4058 | break; |
3658 | case PacketType.ParcelJoin: | 4059 | case PacketType.ParcelJoin: |
3659 | ParcelJoinPacket landJoin = (ParcelJoinPacket)Pack; | 4060 | ParcelJoinPacket landJoin = (ParcelJoinPacket)Pack; |
3660 | if (OnParcelJoinRequest != null) | 4061 | |
4062 | handler075 = OnParcelJoinRequest; | ||
4063 | |||
4064 | if (handler075 != null) | ||
3661 | { | 4065 | { |
3662 | OnParcelJoinRequest((int)Math.Round(landJoin.ParcelData.West), | 4066 | handler075((int)Math.Round(landJoin.ParcelData.West), |
3663 | (int)Math.Round(landJoin.ParcelData.South), | 4067 | (int)Math.Round(landJoin.ParcelData.South), |
3664 | (int)Math.Round(landJoin.ParcelData.East), | 4068 | (int)Math.Round(landJoin.ParcelData.East), |
3665 | (int)Math.Round(landJoin.ParcelData.North), this); | 4069 | (int)Math.Round(landJoin.ParcelData.North), this); |
3666 | } | 4070 | } |
3667 | break; | 4071 | break; |
3668 | case PacketType.ParcelPropertiesUpdate: | 4072 | case PacketType.ParcelPropertiesUpdate: |
3669 | ParcelPropertiesUpdatePacket parcelPropertiesPacket = (ParcelPropertiesUpdatePacket)Pack; | 4073 | ParcelPropertiesUpdatePacket parcelPropertiesPacket = (ParcelPropertiesUpdatePacket)Pack; |
3670 | if (OnParcelPropertiesUpdateRequest != null) | 4074 | |
4075 | handler076 = OnParcelPropertiesUpdateRequest; | ||
4076 | |||
4077 | if (handler076 != null) | ||
3671 | { | 4078 | { |
3672 | OnParcelPropertiesUpdateRequest(parcelPropertiesPacket, this); | 4079 | handler076(parcelPropertiesPacket, this); |
3673 | } | 4080 | } |
3674 | break; | 4081 | break; |
3675 | case PacketType.ParcelSelectObjects: | 4082 | case PacketType.ParcelSelectObjects: |
3676 | ParcelSelectObjectsPacket selectPacket = (ParcelSelectObjectsPacket)Pack; | 4083 | ParcelSelectObjectsPacket selectPacket = (ParcelSelectObjectsPacket)Pack; |
3677 | if (OnParcelSelectObjects != null) | 4084 | |
4085 | handler077 = OnParcelSelectObjects; | ||
4086 | |||
4087 | if (handler077 != null) | ||
3678 | { | 4088 | { |
3679 | OnParcelSelectObjects(selectPacket.ParcelData.LocalID, | 4089 | handler077(selectPacket.ParcelData.LocalID, |
3680 | Convert.ToInt32(selectPacket.ParcelData.ReturnType), this); | 4090 | Convert.ToInt32(selectPacket.ParcelData.ReturnType), this); |
3681 | } | 4091 | } |
3682 | break; | 4092 | break; |
3683 | case PacketType.ParcelObjectOwnersRequest: | 4093 | case PacketType.ParcelObjectOwnersRequest: |
3684 | //System.Console.WriteLine(Pack.ToString()); | 4094 | //System.Console.WriteLine(Pack.ToString()); |
3685 | ParcelObjectOwnersRequestPacket reqPacket = (ParcelObjectOwnersRequestPacket)Pack; | 4095 | ParcelObjectOwnersRequestPacket reqPacket = (ParcelObjectOwnersRequestPacket)Pack; |
3686 | if (OnParcelObjectOwnerRequest != null) | 4096 | |
4097 | handler078 = OnParcelObjectOwnerRequest; | ||
4098 | |||
4099 | if (handler078 != null) | ||
3687 | { | 4100 | { |
3688 | OnParcelObjectOwnerRequest(reqPacket.ParcelData.LocalID, this); | 4101 | handler078(reqPacket.ParcelData.LocalID, this); |
3689 | } | 4102 | } |
3690 | break; | 4103 | break; |
3691 | 4104 | ||
@@ -3695,25 +4108,32 @@ namespace OpenSim.Region.ClientStack | |||
3695 | 4108 | ||
3696 | case PacketType.EstateOwnerMessage: | 4109 | case PacketType.EstateOwnerMessage: |
3697 | EstateOwnerMessagePacket messagePacket = (EstateOwnerMessagePacket)Pack; | 4110 | EstateOwnerMessagePacket messagePacket = (EstateOwnerMessagePacket)Pack; |
3698 | if (OnEstateOwnerMessage != null) | 4111 | |
4112 | handler079 = OnEstateOwnerMessage; | ||
4113 | |||
4114 | if (handler079 != null) | ||
3699 | { | 4115 | { |
3700 | OnEstateOwnerMessage(messagePacket, this); | 4116 | handler079(messagePacket, this); |
3701 | } | 4117 | } |
3702 | break; | 4118 | break; |
3703 | case PacketType.RequestRegionInfo: | 4119 | case PacketType.RequestRegionInfo: |
3704 | RequestRegionInfoPacket.AgentDataBlock mPacket = ((RequestRegionInfoPacket)Pack).AgentData; | 4120 | RequestRegionInfoPacket.AgentDataBlock mPacket = ((RequestRegionInfoPacket)Pack).AgentData; |
3705 | if (OnRegionInfoRequest != null) | 4121 | |
4122 | handler080 = OnRegionInfoRequest; | ||
4123 | if (handler080 != null) | ||
3706 | { | 4124 | { |
3707 | OnRegionInfoRequest(this, mPacket.SessionID); | 4125 | handler080(this, mPacket.SessionID); |
3708 | } | 4126 | } |
3709 | break; | 4127 | break; |
3710 | case PacketType.EstateCovenantRequest: | 4128 | case PacketType.EstateCovenantRequest: |
3711 | // TODO: handle this packet | 4129 | |
3712 | EstateCovenantRequestPacket.AgentDataBlock epack = | 4130 | EstateCovenantRequestPacket.AgentDataBlock epack = |
3713 | ((EstateCovenantRequestPacket)Pack).AgentData; | 4131 | ((EstateCovenantRequestPacket)Pack).AgentData; |
3714 | if (OnEstateCovenantRequest != null) | 4132 | |
4133 | handler081 = OnEstateCovenantRequest; | ||
4134 | if (handler081 != null) | ||
3715 | { | 4135 | { |
3716 | OnEstateCovenantRequest(this, epack.SessionID); | 4136 | handler081(this, epack.SessionID); |
3717 | } | 4137 | } |
3718 | break; | 4138 | break; |
3719 | 4139 | ||
@@ -3728,7 +4148,12 @@ namespace OpenSim.Region.ClientStack | |||
3728 | LLUUID token = rblock.Token; | 4148 | LLUUID token = rblock.Token; |
3729 | RequestGodlikePowersPacket.AgentDataBlock ablock = rglpPack.AgentData; | 4149 | RequestGodlikePowersPacket.AgentDataBlock ablock = rglpPack.AgentData; |
3730 | 4150 | ||
3731 | OnRequestGodlikePowers(ablock.AgentID, ablock.SessionID, token, this); | 4151 | handler082 = OnRequestGodlikePowers; |
4152 | |||
4153 | if (handler082 != null) | ||
4154 | { | ||
4155 | handler082(ablock.AgentID, ablock.SessionID, token, this); | ||
4156 | } | ||
3732 | 4157 | ||
3733 | break; | 4158 | break; |
3734 | case PacketType.GodKickUser: | 4159 | case PacketType.GodKickUser: |
@@ -3736,10 +4161,15 @@ namespace OpenSim.Region.ClientStack | |||
3736 | 4161 | ||
3737 | GodKickUserPacket gkupack = (GodKickUserPacket)Pack; | 4162 | GodKickUserPacket gkupack = (GodKickUserPacket)Pack; |
3738 | 4163 | ||
4164 | |||
3739 | if (gkupack.UserInfo.GodSessionID == SessionId && AgentId == gkupack.UserInfo.GodID) | 4165 | if (gkupack.UserInfo.GodSessionID == SessionId && AgentId == gkupack.UserInfo.GodID) |
3740 | { | 4166 | { |
3741 | OnGodKickUser(gkupack.UserInfo.GodID, gkupack.UserInfo.GodSessionID, | 4167 | handler092 = OnGodKickUser; |
3742 | gkupack.UserInfo.AgentID, (uint)0, gkupack.UserInfo.Reason); | 4168 | if (handler092 != null) |
4169 | { | ||
4170 | handler092(gkupack.UserInfo.GodID, gkupack.UserInfo.GodSessionID, | ||
4171 | gkupack.UserInfo.AgentID, (uint)0, gkupack.UserInfo.Reason); | ||
4172 | } | ||
3743 | } | 4173 | } |
3744 | else | 4174 | else |
3745 | { | 4175 | { |