Beispiel #1
0
        public void aaThawAvatar(string ID)
        {
            if (!ScriptProtection.CheckThreatLevel(ThreatLevel.Moderate, "AAThawAvatar", m_host, "AA", m_itemID))
            {
                return;
            }
            UUID AgentID = UUID.Zero;

            if (UUID.TryParse(ID, out AgentID))
            {
                IScenePresence SP;
                if (World.TryGetScenePresence(AgentID, out SP))
                {
                    ICombatModule module = World.RequestModuleInterface <ICombatModule>();
                    if (module.CheckCombatPermission(AgentID) || World.Permissions.IsGod(AgentID))
                    {
                        //If they have combat permission on, do it whether the threat level is enabled or not
                        SP.AllowMovement = true;
                        return;
                    }

                    if (!ScriptProtection.CheckThreatLevel(ThreatLevel.High, "AAThawAvatar", m_host, "AA", m_itemID))
                    {
                        return;
                    }
                    SP.AllowMovement = true;
                }
            }
        }
Beispiel #2
0
        //This asks the agent whether they would like to participate in the combat
        public void aaRequestCombatPermission(string ID)
        {
            ScriptProtection.CheckThreatLevel(ThreatLevel.None, "AARequestCombatPermission", m_host, "AA");
            IScenePresence SP;
            UUID           AgentID = UUID.Zero;

            if (UUID.TryParse(ID, out AgentID))
            {
                if (World.TryGetScenePresence(AgentID, out SP))
                {
                    ICombatModule module = World.RequestModuleInterface <ICombatModule>();
                    if (!module.CheckCombatPermission(AgentID)) //Don't ask multiple times
                    {
                        RequestPermissions(SP, ScriptBaseClass.PERMISSION_COMBAT);
                    }
                }
            }
        }