protected override void OnTick()
 {
     if (DateTime.Now < m_End)
     {
         if (!m_Totem.Deleted)
         {
             Effects.SendLocationParticles(m_Totem, 0x376A, 2, 50, 0);
             foreach (Mobile m in m_Totem.GetMobilesInRange(5))
             {
                 m.Heal(m_HealPerTick);
                 Effects.SendTargetParticles(m, 0x376A, 2, 50, 9919, 0x527, 0, EffectLayer.Waist);
             }
         }
         else
         {
             Stop();
         }
     }
     else
     {
         Effects.PlaySound(m_Totem.Location, m_Caster.Map, 0x201);
         Effects.SendLocationParticles(m_Totem, 0x3728, 10, 10, 0);
         m_Totem.Delete();
         Stop();
     }
 }
 public override void OnClick()
 {
     if (m_From.Alive)
     {
         Totem.timer.Stop();
         Totem.Delete();
     }
 }
Beispiel #3
0
            protected override void OnTick()
            {
                if (m_BaseTotem == null || m_BaseTotem.Deleted || m_BaseTotem.Caster == null || m_BaseTotem.Caster.Deleted || !m_BaseTotem.Caster.Alive)
                {
                    Stop();
                    m_BaseTotem.Delete();
                    return;
                }

                foreach (Mobile m in m_BaseTotem.GetMobilesInRange(1 + (int)(m_BaseTotem.Caster.Skills[SkillName.ArtMagique].Base / 10)))
                {
                    /*if (m != null && m.Alive && m.CanSee(m_BaseTotem) && m is PlayerMobile)
                     *  ((PlayerMobile)m).AddFatigue(-1 * (int)m_BaseTotem.Bonus);*/
                }
            }
Beispiel #4
0
            protected override void OnTick()
            {
                if (m_BaseTotem == null || m_BaseTotem.Deleted || m_BaseTotem.Caster == null || m_BaseTotem.Caster.Deleted || !m_BaseTotem.Caster.Alive)
                {
                    Stop();
                    m_BaseTotem.Delete();
                    return;
                }

                foreach (Mobile m in m_BaseTotem.GetMobilesInRange(m_BaseTotem.MaxRange))
                {
                    if (m != null && m.Alive && m.CanSee(m_BaseTotem) && m is PlayerMobile)
                    {
                        SpellHelper.Heal(m, (int)m_BaseTotem.Bonus + Utility.Random(0, 5), true);
                    }
                }
            }
Beispiel #5
0
            protected override void OnTick()
            {
                if (m_BaseTotem == null || m_BaseTotem.Deleted || m_BaseTotem.Caster == null || m_BaseTotem.Caster.Deleted || !m_BaseTotem.Caster.Alive)
                {
                    Stop();
                    m_BaseTotem.Delete();
                    return;
                }

                foreach (Mobile m in m_BaseTotem.GetMobilesInRange(1 + (int)(m_BaseTotem.Caster.Skills[SkillName.ArtMagique].Base / 10)))
                {
                    if (m != null && m.Alive && m.CanSee(m_BaseTotem))
                    {
                        m_BaseTotem.Caster.Heal(1 + (int)(m_BaseTotem.Caster.Skills[SkillName.ArtMagique].Base / 10));
                    }
                }
            }
Beispiel #6
0
            protected override void OnTick()
            {
                if (m_BaseTotem == null || m_BaseTotem.Deleted || m_BaseTotem.Caster == null || m_BaseTotem.Caster.Deleted || !m_BaseTotem.Caster.Alive)
                {
                    Stop();
                    m_BaseTotem.Delete();
                    return;
                }

                foreach (Item itema in m_BaseTotem.GetItemsInRange(1 + (int)(m_BaseTotem.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.MortEngine.MortCurrentState == MortState.MortDefinitive)
                            {
                                //pm.AddFatigue(-100);

                                SpellHelper.Turn(m_BaseTotem.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.Resurrection;
                            }
                        }
                    }
                }
            }