Added handler for MapNameRequest - OnMapNameRequest

afrisby
Dalien Talbot 2007-11-18 04:00:04 +00:00
parent 8c5add18a2
commit 793813a6a6
4 changed files with 14 additions and 0 deletions

View File

@ -180,6 +180,8 @@ namespace OpenSim.Framework
public delegate void RequestMapBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY);
public delegate void RequestMapName(IClientAPI remoteClient, string mapName);
public delegate void TeleportLocationRequest(
IClientAPI remoteClient, ulong regionHandle, LLVector3 position, LLVector3 lookAt, uint flags);
@ -297,6 +299,7 @@ namespace OpenSim.Framework
event LinkObjects OnLinkObjects;
event DelinkObjects OnDelinkObjects;
event RequestMapBlocks OnRequestMapBlocks;
event RequestMapName OnMapNameRequest;
event TeleportLocationRequest OnTeleportLocationRequest;
event DisconnectUser OnDisconnectUser;
event RequestAvatarProperties OnRequestAvatarProperties;

View File

@ -84,6 +84,7 @@ namespace OpenSim.Region.ClientStack
public event GenericCall2 OnStopMovement;
public event Action<LLUUID> OnRemoveAvatar;
public event RequestMapBlocks OnRequestMapBlocks;
public event RequestMapName OnMapNameRequest;
public event TeleportLocationRequest OnTeleportLocationRequest;
public event DisconnectUser OnDisconnectUser;
public event RequestAvatarProperties OnRequestAvatarProperties;

View File

@ -611,6 +611,15 @@ namespace OpenSim.Region.ClientStack
MapRequest.PositionData.MaxX, MapRequest.PositionData.MaxY);
}
break;
case PacketType.MapNameRequest:
MapNameRequestPacket map = (MapNameRequestPacket) Pack;
string mapName = UTF8Encoding.UTF8.GetString(map.NameData.Name, 0,
map.NameData.Name.Length - 1);
if (OnMapNameRequest != null)
{
OnMapNameRequest(this, mapName);
}
break;
case PacketType.TeleportLandmarkRequest:
TeleportLandmarkRequestPacket tpReq = (TeleportLandmarkRequestPacket) Pack;

View File

@ -59,6 +59,7 @@ namespace SimpleApp
public event LinkObjects OnLinkObjects;
public event DelinkObjects OnDelinkObjects;
public event RequestMapBlocks OnRequestMapBlocks;
public event RequestMapName OnMapNameRequest;
public event TeleportLocationRequest OnTeleportLocationRequest;
public event DisconnectUser OnDisconnectUser;
public event RequestAvatarProperties OnRequestAvatarProperties;