Esempio n. 1
0
 public override bool OnEquip(Mobile from)
 {
     if (Faction.InSkillLoss(from))
     {
         Faction.SkillLossContext context;
         Faction.m_SkillLoss.TryGetValue(from, out context);
         if (context != null && DateTime.UtcNow >= (context.m_Timer.Next - TimeSpan.FromMinutes(5.0)))
         {
             Faction.ClearSkillLoss(from);
         }
     }
     return(base.OnEquip(from));
 }
Esempio n. 2
0
        public override bool Use(Mobile from)
        {
            if (Faction.ClearSkillLoss(from))
            {
                from.LocalOverheadMessage(UltimaOnline.Network.MessageType.Regular, 2219, false, "The gem shatters as you invoke its power.");
                from.PlaySound(909);

                from.FixedEffect(0x373A, 10, 30);
                from.PlaySound(0x209);

                return(true);
            }

            return(false);
        }
Esempio n. 3
0
        public override bool Use(Mobile from)
        {
            Faction ourFaction = Faction.Find(from);

            bool used = false;

            foreach (Mobile mob in from.GetMobilesInRange(8))
            {
                if (mob.Player && !mob.Alive && from.InLOS(mob))
                {
                    if (Faction.Find(mob) != ourFaction)
                    {
                        continue;
                    }

                    BaseHouse house = BaseHouse.FindHouseAt(mob);

                    if (house == null || (house.IsFriend(from) || house.IsFriend(mob)))
                    {
                        Faction.ClearSkillLoss(mob);

                        mob.SendGump(new ResurrectGump(mob, from, ResurrectMessage.Generic));
                        used = true;
                    }
                }
            }

            if (used)
            {
                from.LocalOverheadMessage(UltimaOnline.Network.MessageType.Regular, 2219, false, "The urn shatters as you invoke its power.");
                from.PlaySound(64);

                Effects.PlaySound(from.Location, from.Map, 1481);
            }

            return(used);
        }