* Moved script packet handlers from 'unimplemented' to 'Script Packets'

0.6.0-stable
lbsa71 2008-07-08 11:02:53 +00:00
parent 35f5db2a1c
commit b1b529f94e
1 changed files with 180 additions and 173 deletions

View File

@ -4127,7 +4127,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
uint regionX = 0;
uint regionY = 0;
try
{
Helpers.LongToUInts(Scene.RegionInfo.RegionHandle, out regionX, out regionY);
locx = Convert.ToSingle(Helpers.FieldToUTF8String(gmParams[0].Parameter)) - (float)regionX;
@ -6136,6 +6135,37 @@ namespace OpenSim.Region.ClientStack.LindenUDP
#endregion
#region Script Packets
case PacketType.GetScriptRunning:
GetScriptRunningPacket scriptRunning = (GetScriptRunningPacket)Pack;
handlerGetScriptRunning = OnGetScriptRunning;
if (handlerGetScriptRunning != null)
{
handlerGetScriptRunning(this, scriptRunning.Script.ObjectID, scriptRunning.Script.ItemID);
}
break;
case PacketType.SetScriptRunning:
SetScriptRunningPacket setScriptRunning = (SetScriptRunningPacket)Pack;
handlerSetScriptRunning = OnSetScriptRunning;
if (handlerSetScriptRunning != null)
{
handlerSetScriptRunning(this, setScriptRunning.Script.ObjectID, setScriptRunning.Script.ItemID, setScriptRunning.Script.Running);
}
break;
case PacketType.ScriptReset:
ScriptResetPacket scriptResetPacket = (ScriptResetPacket)Pack;
handlerScriptReset = OnScriptReset;
if (handlerScriptReset != null)
{
handlerScriptReset(this, scriptResetPacket.Script.ObjectID, scriptResetPacket.Script.ItemID);
}
break;
#endregion
#region unimplemented handlers
case PacketType.StartPingCheck:
@ -6148,14 +6178,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// TODO: Perhaps this should be processed on the Sim to determine whether or not to drop a dead client
//m_log.Warn("[CLIENT]: unhandled CompletePingCheck packet");
break;
case PacketType.ScriptReset:
ScriptResetPacket scriptResetPacket = (ScriptResetPacket)Pack;
handlerScriptReset = OnScriptReset;
if (handlerScriptReset != null)
{
handlerScriptReset(this, scriptResetPacket.Script.ObjectID, scriptResetPacket.Script.ItemID);
}
break;
case PacketType.ViewerStats:
// TODO: handle this packet
m_log.Warn("[CLIENT]: unhandled ViewerStats packet");
@ -6206,22 +6229,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// TODO: handle this packet
m_log.Warn("[CLIENT]: unhandled InventoryDescent packet");
break;
case PacketType.GetScriptRunning:
GetScriptRunningPacket scriptRunning = (GetScriptRunningPacket)Pack;
handlerGetScriptRunning = OnGetScriptRunning;
if (handlerGetScriptRunning != null)
{
handlerGetScriptRunning(this, scriptRunning.Script.ObjectID, scriptRunning.Script.ItemID);
}
break;
case PacketType.SetScriptRunning:
SetScriptRunningPacket setScriptRunning = (SetScriptRunningPacket)Pack;
handlerSetScriptRunning = OnSetScriptRunning;
if (handlerSetScriptRunning != null)
{
handlerSetScriptRunning(this, setScriptRunning.Script.ObjectID, setScriptRunning.Script.ItemID, setScriptRunning.Script.Running);
}
break;
default:
m_log.Warn("[CLIENT]: unhandled packet " + Pack.ToString());
break;