예제 #1
0
        public override void OnTarget(Mobile target)
        {
            if (CheckBSequence(target, true))
            {
                if (target is BaseCreature)
                {
                    BaseCreature bc = (BaseCreature)target;

                    if (!bc.IsDeadPet)
                    {
                        Caster.SendMessage("That animal is still alive.");
                    }
                    else if (bc.ControlMaster != null)
                    {
                        bc.ControlMaster.CloseGump(typeof(PetResurrectGump));
                        bc.ControlMaster.SendGump(new PetResurrectGump(Caster, bc));
                        AutoLifeSpell.ResurrectEffect(bc);
                    }
                }
                else if (!target.Alive)
                {
                    target.CloseGump(typeof(AutoLifeGump));
                    target.SendGump(new AutoLifeGump());
                }
                else if (target is PlayerMobile)
                {
                    PlayerMobile pm = (PlayerMobile)target;
                    BeginAutoLife(pm, (int)(ScaleBySkill(Caster, DamageSkill) * 3));
                    BlueMageControl.CheckKnown(target, this, CanTeach(target));
                }
            }

            FinishSequence();
        }
예제 #2
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;
                }
            }