Ejemplo n.º 1
0
 protected virtual void OnSpellCastDeny(DungeonZone zone, Mobile caster, ISpell spell)
 {
     if (caster != null && !caster.Deleted && spell != null)
     {
         caster.SendMessage("You can not use that spell at this time.");
     }
 }
Ejemplo n.º 2
0
 protected virtual void OnSkillUseDeny(DungeonZone zone, Mobile user, int skill)
 {
     if (user != null && !user.Deleted && skill >= 0)
     {
         user.SendMessage("You can not use that skill at this time.");
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// </summary>
 /// <param name="zone"></param>
 /// <param name="healer">CONSTANT NULL</param>
 /// <param name="healed"></param>
 /// <param name="heal"></param>
 protected virtual void OnHealDeny(DungeonZone zone, Mobile healer, Mobile healed, ref int heal)
 {
     if (healed != null && !healed.Deleted && heal > 0)
     {
         healed.SendMessage("You can not be healed at this time.");
     }
 }
Ejemplo n.º 4
0
        public void OnSpeech(DungeonZone zone, SpeechEventArgs args)
        {
            if (args.Mobile is PlayerMobile)
            {
                var pm = (PlayerMobile)args.Mobile;

                if (HandleSubCommand(zone, pm, args.Speech))
                {
                    args.Handled = true;
                    args.Blocked = true;
                    return;
                }
            }

            if (CheckSpeech(zone, args))
            {
                OnSpeechAccept(zone, args);
                return;
            }

            args.Handled = true;
            args.Blocked = true;

            OnSpeechDeny(zone, args);
        }
Ejemplo n.º 5
0
 protected virtual void OnResurrectDeny(DungeonZone zone, Mobile m)
 {
     if (m != null && !m.Deleted)
     {
         m.SendMessage("You can not be resurrected at this time.");
     }
 }
Ejemplo n.º 6
0
 protected virtual void OnSpeechDeny(DungeonZone zone, SpeechEventArgs args)
 {
     if (args.Mobile != null && !args.Mobile.Deleted)
     {
         args.Mobile.SendMessage("You can not talk at this time.");
     }
 }
Ejemplo n.º 7
0
 protected virtual void OnCanUseStuckMenuDeny(DungeonZone zone, Mobile m)
 {
     if (m != null && !m.Deleted)
     {
         m.SendMessage("You can not use the stuck menu at this time.");
     }
 }
Ejemplo n.º 8
0
 protected virtual void OnAllowBeneficialDeny(DungeonZone zone, Mobile source, Mobile target)
 {
     if (source != null && !source.Deleted && target != null && !target.Deleted && source != target)
     {
         source.SendMessage("You can not perform beneficial actions on your target.");
     }
 }
Ejemplo n.º 9
0
 protected virtual void OnAllowHousingDeny(DungeonZone zone, Mobile m, Point3D p)
 {
     if (m != null && !m.Deleted)
     {
         m.SendMessage("You can not place structures here at this time.");
     }
 }
Ejemplo n.º 10
0
 public virtual void OnExit(DungeonZone zone, Mobile m)
 {
     if (m is PlayerMobile)
     {
         m.CloseGump(typeof(DungeonUI));
     }
 }
Ejemplo n.º 11
0
 protected virtual void OnDismounted(DungeonZone zone, Mobile m, IMount mount)
 {
     if (m != null && !m.Deleted && mount != null)
     {
         m.SendMessage("You have been dismounted.");
     }
 }
Ejemplo n.º 12
0
 public virtual void OnDamageDeny(DungeonZone zone, Mobile attacker, Mobile damaged, ref int damage)
 {
     if (damaged != null && !damaged.Deleted && damage > 0)
     {
         damaged.SendMessage("You have been spared damage, this time...");
     }
 }
Ejemplo n.º 13
0
 public virtual void OnEnter(DungeonZone zone, Mobile m)
 {
     if (m is PlayerMobile)
     {
         DungeonUI.DisplayTo((PlayerMobile)m, false, this);
     }
 }
Ejemplo n.º 14
0
        public virtual bool CheckAllowBeneficial(DungeonZone zone, Mobile source, Mobile target)
        {
            if (source != null && !source.Deleted && source.AccessLevel > AccessLevel.Counselor)
            {
                return(true);
            }

            return(Options.Rules.AllowBeneficial);
        }
        public override void OnAlterLightLevel(DungeonZone zone, Mobile m, ref int global, ref int personal)
        {
            base.OnAlterLightLevel(zone, m, ref global, ref personal);

            if (zone.Name != "Staging Area")
            {
                global   = Math.Min(5, global);
                personal = Math.Min(10, personal);
            }
        }
Ejemplo n.º 16
0
        public bool AllowSpawn(DungeonZone zone)
        {
            if (CheckAllowSpawn(zone))
            {
                OnAllowSpawnAccept(zone);
                return(true);
            }

            OnAllowSpawnDeny(zone);
            return(false);
        }
Ejemplo n.º 17
0
        public bool OnHeal(DungeonZone zone, Mobile healer, Mobile healed, ref int heal)
        {
            if (CheckHeal(zone, healer, healed, ref heal))
            {
                OnHealAccept(zone, healer, healed, ref heal);
                return(true);
            }

            OnHealDeny(zone, healer, healed, ref heal);
            return(false);
        }
Ejemplo n.º 18
0
        public bool AllowHousing(DungeonZone zone, Mobile m, Point3D p)
        {
            if (CheckAllowHousing(zone, m, p))
            {
                OnAllowHousingAccept(zone, m, p);
                return(true);
            }

            OnAllowHousingDeny(zone, m, p);
            return(false);
        }
Ejemplo n.º 19
0
        public bool CanMoveThrough(DungeonZone zone, Mobile m, IEntity e)
        {
            if (CheckCanMoveThrough(zone, m, e))
            {
                OnCanMoveThroughAccept(zone, m, e);
                return(true);
            }

            OnCanMoveThroughDeny(zone, m, e);
            return(false);
        }
Ejemplo n.º 20
0
        public bool CanUseStuckMenu(DungeonZone zone, Mobile m)
        {
            if (CheckCanUseStuckMenu(zone, m))
            {
                OnCanUseStuckMenuAccept(zone, m);
                return(true);
            }

            OnCanUseStuckMenuDeny(zone, m);
            return(false);
        }
Ejemplo n.º 21
0
        public bool AllowBeneficial(DungeonZone zone, Mobile source, Mobile target)
        {
            if (CheckAllowBeneficial(zone, source, target))
            {
                OnAllowBeneficialAccept(zone, source, target);
                return(true);
            }

            OnAllowBeneficialDeny(zone, source, target);
            return(false);
        }
Ejemplo n.º 22
0
        public bool OnBeforeDeath(DungeonZone zone, Mobile m)
        {
            if (CheckDeath(zone, m))
            {
                OnDeathAccept(zone, m);
                return(true);
            }

            OnDeathDeny(zone, m);
            return(false);
        }
Ejemplo n.º 23
0
        public bool OnSkillUse(DungeonZone zone, Mobile user, int skill)
        {
            if (CheckSkillUse(zone, user, skill))
            {
                OnSkillUseAccept(zone, user, skill);
                return(true);
            }

            OnSkillUseDeny(zone, user, skill);
            return(false);
        }
Ejemplo n.º 24
0
        public bool OnResurrect(DungeonZone zone, Mobile m)
        {
            if (CheckResurrect(zone, m))
            {
                OnResurrectAccept(zone, m);
                return(true);
            }

            OnResurrectDeny(zone, m);
            return(false);
        }
Ejemplo n.º 25
0
        public bool OnBeginSpellCast(DungeonZone zone, Mobile caster, ISpell spell)
        {
            if (CheckSpellCast(zone, caster, spell))
            {
                OnSpellCastAccept(zone, caster, spell);
                return(true);
            }

            OnSpellCastDeny(zone, caster, spell);
            return(false);
        }
Ejemplo n.º 26
0
        public bool AllowHarmful(DungeonZone zone, Mobile source, Mobile target)
#endif
        {
            if (CheckAllowHarmful(zone, source, target))
            {
                OnAllowHarmfulAccept(zone, source, target);
                return(true);
            }

            OnAllowHarmfulDeny(zone, source, target);
            return(false);
        }
Ejemplo n.º 27
0
        public virtual void Dismount(DungeonZone zone, Mobile m)
        {
            if (m == null || m.Deleted || !m.Mounted || m.Mount == null)
            {
                return;
            }

            var mount = m.Mount;

            mount.Rider = null;

            OnDismounted(zone, m, mount);
        }
Ejemplo n.º 28
0
        public virtual bool OnDoubleClick(DungeonZone zone, Mobile m, Mobile target)
        {
            if (m == null || m.Deleted || target == null || target.Deleted)
            {
                return(false);
            }

            if (target is BaseCreature)
            {
                return(OnDoubleClick(zone, m, (BaseCreature)target));
            }

            return(true);
        }
Ejemplo n.º 29
0
        public virtual bool CheckSpeech(DungeonZone zone, SpeechEventArgs e)
        {
            if (e.Mobile == null || e.Mobile.Deleted)
            {
                return(false);
            }

            if (e.Mobile.AccessLevel > AccessLevel.Counselor)
            {
                return(true);
            }

            return(Options.Rules.AllowSpeech);
        }
Ejemplo n.º 30
0
        public virtual bool CheckResurrect(DungeonZone zone, Mobile m)
        {
            if (m == null || m.Deleted)
            {
                return(false);
            }

            if (m.AccessLevel > AccessLevel.Counselor)
            {
                return(true);
            }

            return(Options.Rules.CanResurrect);
        }