Example #1
0
            protected override void OnTick()
            {
                foreach (Item ps in m_Owner.GetItemsInRange(m_Owner.Hue))
                {
                    if (ps != null && ps is XmlSpawner)
                    {
                        XmlSpawner sp = (XmlSpawner)ps;
                        if (ps.Hue == 10)
                        {
                            sp.Running = true;
                        }
                    }
                }

                if (m_Owner.Weight == 1.0)
                {
                    Orc orc = new Orc();
                    orc.MoveToWorld(m_Owner.Location, m_Owner.Map);
                    orc.Hidden = true;
                    Regions.GuardedRegion reg = (Regions.GuardedRegion)orc.Region.GetRegion(typeof(Regions.GuardedRegion));
                    if (reg != null && reg.Disabled)
                    {
                        reg.Disabled = false;
                    }

                    orc.Delete();
                }

                StopTimer(m_Owner);
                m_Owner.Delete();
            }