Пример #1
0
        public void Target(Corpse c)
        {
            Mobile m = c.Owner;

            if (!Caster.CanSee(c))
            {
                Caster.SendLocalizedMessage(500237);                   // Target can not be seen.
            }
            else if (m == Caster)
            {
                Caster.SendLocalizedMessage(501039);                   // Thou can not resurrect thyself.
            }
            else if (!Caster.InRange(c, 5))
            {
                Caster.SendLocalizedMessage(501042);                   // Target is not close enough.
            }
            else if (!m.Player)
            {
                Caster.SendLocalizedMessage(501043);                   // Target is not a being.
            }
            else if (CheckSequence() && m != null)
            {
                PlayerMobile pm = m as PlayerMobile;

                if (pm != null && Caster is PlayerMobile && (pm.MortEngine.MortCurrentState == MortState.Assomage || pm.MortEngine.MortCurrentState == MortState.MortDefinitive))
                {
                    SpellHelper.Turn(Caster, pm);

                    /*((PlayerMobile)Caster).AddFatigue(250);
                     * pm.AddFatigue(-250);*/

                    pm.PlaySound(0x214);
                    Effects.SendTargetEffect(pm, 0x376A, 10, 16);

                    if (pm.MortEngine.TimerEvanouie != null)
                    {
                        pm.MortEngine.TimerEvanouie.Stop();
                        pm.MortEngine.TimerEvanouie = null;
                    }

                    if (pm.MortEngine.TimerMort != null)
                    {
                        pm.MortEngine.TimerMort.Stop();
                        pm.MortEngine.TimerMort = null;
                    }

                    pm.Location = c.Location;
                    pm.MortEngine.EndroitMort  = c.Location;
                    pm.MortEngine.RisqueDeMort = false;
                    pm.MortEngine.Mort         = false;
                    pm.Frozen = false;

                    pm.Direction = c.Direction;
                    pm.Animate(21, 5, 1, false, false, 0);

                    pm.Resurrect();

                    if (c != null)
                    {
                        ArrayList list = new ArrayList();

                        foreach (Item item in c.Items)
                        {
                            list.Add(item);
                        }

                        foreach (Item item in list)
                        {
                            if (item.Layer == Layer.Hair || item.Layer == Layer.FacialHair)
                            {
                                item.Delete();
                            }

                            if (item is RaceSkin || c.EquipItems.Contains(item))
                            {
                                if (!m.EquipItem(item))
                                {
                                    m.AddToBackpack(item);
                                }
                            }
                            else
                            {
                                m.AddToBackpack(item);
                            }
                        }
                    }

                    pm.CheckRaceSkin();
                    pm.CheckStatTimers();

                    pm.MortEngine.MortCurrentState = MortState.Resurrection;
                }
                else
                {
                    Caster.SendMessage("Vous devez cibler le corps d'un joueur MORT !");
                }
            }

            FinishSequence();
        }
Пример #2
0
        public void Target(Corpse c)
        {
            Mobile m = c.Owner;

            if (m == null)
            {
            }
            else if (!Caster.CanSee(c))
            {
                Caster.SendLocalizedMessage(500237);                   // Target can not be seen.
            }
            else if (m == Caster)
            {
                Caster.SendLocalizedMessage(501039);                   // Thou can not resurrect thyself.
            }
            else if (!Caster.Alive)
            {
                Caster.SendLocalizedMessage(501040);                   // The resurrecter must be alive.
            }
            else if (m.Alive)
            {
                Caster.SendLocalizedMessage(501041);                   // Target is not dead.
            }
            else if (!Caster.InRange(c, 1))
            {
                Caster.SendLocalizedMessage(501042);                   // Target is not close enough.
            }
            else if (!m.Player)
            {
                Caster.SendLocalizedMessage(501043);                   // Target is not a being.
            }
            else if (CheckBSequence(m, true))
            {
                PlayerMobile pm = m as PlayerMobile;

                if (pm != null)
                {
                    SpellHelper.Turn(Caster, pm);

                    pm.PlaySound(0x214);
                    Effects.SendTargetEffect(pm, 0x376A, 10, 16);

                    if (pm.MortEngine.TimerEvanouie != null)
                    {
                        pm.MortEngine.TimerEvanouie.Stop();
                        pm.MortEngine.TimerEvanouie = null;
                    }

                    if (pm.MortEngine.TimerMort != null)
                    {
                        pm.MortEngine.TimerMort.Stop();
                        pm.MortEngine.TimerMort = null;
                    }

                    pm.Location = c.Location;
                    pm.MortEngine.EndroitMort  = c.Location;
                    pm.MortEngine.RisqueDeMort = false;
                    pm.MortEngine.Mort         = false;
                    pm.Frozen = false;

                    ArrayList list = new ArrayList();

                    foreach (Item item in c.Items)
                    {
                        list.Add(item);
                    }

                    foreach (Item item in list)
                    {
                        if (item.Layer == Layer.Hair || item.Layer == Layer.FacialHair)
                        {
                            item.Delete();
                        }

                        if (item is RaceSkin || c.EquipItems.Contains(item))
                        {
                            if (!pm.EquipItem(item))
                            {
                                pm.AddToBackpack(item);
                            }
                        }
                        else
                        {
                            pm.AddToBackpack(item);
                        }
                    }

                    pm.Direction = c.Direction;
                    pm.Animate(21, 5, 1, false, false, 0);

                    c.Delete();

                    pm.Resurrect();

                    pm.CheckRaceSkin();
                }
            }
            FinishSequence();
        }
Пример #3
0
        protected override void OnTick()
        {
            PlayerMobile pm = m as PlayerMobile;

            Stop();
            m.Frozen = false;

            if (!pm.MortEngine.Mort)
            {
                //pm.MortEngine.RisqueDeMort = true;
                m.Resurrect();

                if (m_Corpse != null)
                {
                    ArrayList list = new ArrayList();

                    foreach (Item item in m_Corpse.Items)
                    {
                        list.Add(item);
                    }

                    foreach (Item item in list)
                    {
                        if (item.Layer == Layer.Hair || item.Layer == Layer.FacialHair)
                        {
                            item.Delete();
                        }

                        if (item is RaceSkin || (m_Corpse is Corpse && ((Corpse)m_Corpse).EquipItems.Contains(item)))
                        {
                            if (!m.EquipItem(item))
                            {
                                m.AddToBackpack(item);
                            }
                        }
                        else
                        {
                            m.AddToBackpack(item);
                        }
                    }

                    m_Corpse.Delete();
                }

                m.Direction = (Direction)m_Direction;
                m.Animate(21, 5, 1, false, false, 0);

                //RisqueDeMortTimer Timer = new RisqueDeMortTimer(m);
                pm.MortEngine.TimerMort = this;
                //Timer.Start();

                pm.MortEngine.MortCurrentState = MortState.Ebranle;
            }
            else
            {
                pm.MortEngine.MortCurrentState = MortState.MortDefinitive;
                pm.MoveToWorld(new Point3D(new Point2D(5277, 2159), 5), Map.Felucca);
                pm.Resurrect();
            }

            /*else
             * {
             *  pm.MortEngine.RisqueDeMort = false;
             *  m.Resurrect();
             * }*/

            pm.CheckRaceSkin();
        }
Пример #4
0
        public override void OnCast()
        {
            if (Caster == null || Caster.Deleted || !Caster.Alive)
            {
                return;
            }

            foreach (Item itema in Caster.GetItemsInRange(1 + (int)(Caster.Skills[SkillName.ArtMagique].Base / 10)))
            {
                if (itema != null && itema is Corpse)
                {
                    Corpse c = (Corpse)itema;

                    if (c != null && c.Owner != null && c.Owner is PlayerMobile)
                    {
                        PlayerMobile pm = (PlayerMobile)(c.Owner);

                        if (pm.MortEngine.MortCurrentState == MortState.Assomage)
                        {
                            //pm.AddFatigue(-100);

                            SpellHelper.Turn(Caster, pm);

                            pm.PlaySound(0x214);
                            Effects.SendTargetEffect(pm, 0x376A, 10, 16);

                            if (pm.MortEngine.TimerEvanouie != null)
                            {
                                pm.MortEngine.TimerEvanouie.Stop();
                                pm.MortEngine.TimerEvanouie = null;
                            }

                            if (pm.MortEngine.TimerMort != null)
                            {
                                pm.MortEngine.TimerMort.Stop();
                                pm.MortEngine.TimerMort = null;
                            }

                            pm.Location = c.Location;
                            pm.MortEngine.EndroitMort  = c.Location;
                            pm.MortEngine.RisqueDeMort = false;
                            pm.MortEngine.Mort         = false;
                            pm.Frozen = false;

                            pm.Direction = c.Direction;
                            pm.MoveToWorld(c.Location, c.Map);
                            pm.Animate(21, 5, 1, false, false, 0);

                            pm.Resurrect();

                            if (c != null)
                            {
                                ArrayList list = new ArrayList();

                                foreach (Item item in c.Items)
                                {
                                    list.Add(item);
                                }

                                foreach (Item item in list)
                                {
                                    if (item.Layer == Layer.Hair || item.Layer == Layer.FacialHair)
                                    {
                                        item.Delete();
                                    }

                                    if (item is RaceSkin || c.EquipItems.Contains(item))
                                    {
                                        if (!pm.EquipItem(item))
                                        {
                                            pm.AddToBackpack(item);
                                        }
                                    }
                                    else
                                    {
                                        pm.AddToBackpack(item);
                                    }
                                }
                            }

                            pm.CheckRaceSkin();
                            pm.CheckStatTimers();

                            pm.MortEngine.MortCurrentState = MortState.Ebranle;
                        }
                    }
                }
            }
        }
Пример #5
0
        public override void OnResponse(NetState sender, RelayInfo info)
        {
            Mobile from = sender.Mobile;

            if (from.Deleted)
            {
                return;
            }

            switch (info.ButtonID)
            {
            case 1:
                if (!(m_From.MortEngine.MortCurrentState == MortState.MortVivant))
                {
                    m_From.MortEngine.AmeLastFed = DateTime.Now;

                    m_From.MortEngine.MortVivant       = true;
                    m_From.MortEngine.MortCurrentState = MortState.MortVivant;

                    MortVivantEvoTimer timer = new MortVivantEvoTimer(m_From);
                    m_From.MortEngine.MortVivantTimer = timer;
                    timer.Start();

                    m_From.Hits   = (m_From.HitsMax / 2) + Utility.RandomMinMax(-5, 5);
                    m_From.Frozen = true;
                    //if (Temrael.beta)
                    //    m_From.Map = Map.Ilshenar;
                    m_From.Location        = m_From.MortEngine.EndroitMort;
                    m_From.MortEngine.Mort = false;
                    m_From.Resurrect();
                    m_From.Frozen = false;

                    if (m_From.Corpse != null)
                    {
                        ArrayList list = new ArrayList();

                        foreach (Item item in m_From.Corpse.Items)
                        {
                            list.Add(item);
                        }

                        foreach (Item item in list)
                        {
                            if (item.Layer == Layer.Hair || item.Layer == Layer.FacialHair)
                            {
                                item.Delete();
                            }

                            if (item is RaceSkin || (m_From.Corpse is Corpse && ((Corpse)m_From.Corpse).EquipItems.Contains(item)))
                            {
                                if (!m_From.EquipItem(item))
                                {
                                    m_From.AddToBackpack(item);
                                }
                            }
                            else
                            {
                                m_From.AddToBackpack(item);
                            }
                        }

                        m_From.Corpse.Delete();
                    }

                    m_From.CheckStatTimers();
                    m_From.CheckRaceSkin();
                }
                break;
            }
        }