Esempio n. 1
0
            public override void OnResponse(NetState sender, RelayInfo info)
            {
                if (sender.Mobile == null || sender.Mobile.Alive)
                {
                    return;
                }
                else if (info.ButtonID == 0)
                {
                    return;
                }

                Mobile m = sender.Mobile;

                AutoLifeSpell.ResurrectEffect(m);

                if (m is PlayerMobile)
                {
                    AutoLifeSpell.EndAutoLife((PlayerMobile)m);
                }

                Misc.Titles.AwardFame(m, -(m.Fame / 10), true);
                m.Resurrect();

                if (m.AccessLevel == AccessLevel.Player)
                {
                    VirtueLevel level = VirtueHelper.GetLevel(m, VirtueName.Compassion);

                    switch (level)
                    {
                    case VirtueLevel.Seeker: m.Hits = AOS.Scale(m.HitsMax, 20); break;

                    case VirtueLevel.Follower: m.Hits = AOS.Scale(m.HitsMax, 40); break;

                    case VirtueLevel.Knight: m.Hits = AOS.Scale(m.HitsMax, 80); break;

                    default: m.Hits = 10; break;
                    }
                }
                else
                {
                    m.Hits      = m.HitsMax;
                    m.Stam      = m.StamMax;
                    m.Mana      = m.ManaMax;
                    m.Karma     = m.Fame = 0;
                    m.BodyValue = 987;
                }
            }
Esempio n. 2
0
 protected override void OnTick()
 {
     if (m_PM == null)
     {
         Stop();
     }
     else if (!AutoLifeSpell.HasAutoLife(m_PM))
     {
         Stop();
     }
     else if (m_Count > m_MaxCount)
     {
         AutoLifeSpell.EndAutoLife(m_PM);
     }
     else
     {
         AutoLifeSpell.CheckStatus(m_PM);
         m_Count++;
     }
 }