Experimental. Expand Fire & Forget for NPC delete

avinationmerge
Melanie 2012-02-06 22:26:25 +01:00
parent 54fc78013d
commit a829f20828
1 changed files with 7 additions and 7 deletions

View File

@ -2584,15 +2584,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
CheckThreatLevel(ThreatLevel.High, "osNpcRemove"); CheckThreatLevel(ThreatLevel.High, "osNpcRemove");
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
INPCModule module = World.RequestModuleInterface<INPCModule>(); Util.FireAndForget(delegate(object x) {
if (module != null) INPCModule module = World.RequestModuleInterface<INPCModule>();
{ if (module != null)
UUID npcId = new UUID(npc.m_string); {
UUID npcId = new UUID(npc.m_string);
if (!module.CheckPermissions(npcId, m_host.OwnerID)) if (!module.CheckPermissions(npcId, m_host.OwnerID))
return; return;
Util.FireAndForget(delegate(object x) {
module.DeleteNPC(npcId, World); module.DeleteNPC(npcId, World);
}); });
} }