Exemple #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.");
     }
 }
Exemple #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.");
     }
 }
Exemple #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.");
     }
 }
Exemple #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);
        }
Exemple #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.");
     }
 }
Exemple #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.");
     }
 }
Exemple #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.");
     }
 }
Exemple #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.");
     }
 }
Exemple #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.");
     }
 }
 public virtual void OnExit(DungeonZone zone, Mobile m)
 {
     if (m is PlayerMobile)
     {
         m.CloseGump(typeof(DungeonUI));
     }
 }
Exemple #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.");
     }
 }
Exemple #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...");
     }
 }
 public virtual void OnEnter(DungeonZone zone, Mobile m)
 {
     if (m is PlayerMobile)
     {
         DungeonUI.DisplayTo((PlayerMobile)m, false, this);
     }
 }
Exemple #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);
            }
        }
Exemple #16
0
        public bool AllowSpawn(DungeonZone zone)
        {
            if (CheckAllowSpawn(zone))
            {
                OnAllowSpawnAccept(zone);
                return(true);
            }

            OnAllowSpawnDeny(zone);
            return(false);
        }
Exemple #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);
        }
Exemple #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);
        }
Exemple #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);
        }
Exemple #20
0
        public bool CanUseStuckMenu(DungeonZone zone, Mobile m)
        {
            if (CheckCanUseStuckMenu(zone, m))
            {
                OnCanUseStuckMenuAccept(zone, m);
                return(true);
            }

            OnCanUseStuckMenuDeny(zone, m);
            return(false);
        }
Exemple #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);
        }
Exemple #22
0
        public bool OnBeforeDeath(DungeonZone zone, Mobile m)
        {
            if (CheckDeath(zone, m))
            {
                OnDeathAccept(zone, m);
                return(true);
            }

            OnDeathDeny(zone, m);
            return(false);
        }
Exemple #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);
        }
Exemple #24
0
        public bool OnResurrect(DungeonZone zone, Mobile m)
        {
            if (CheckResurrect(zone, m))
            {
                OnResurrectAccept(zone, m);
                return(true);
            }

            OnResurrectDeny(zone, m);
            return(false);
        }
Exemple #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);
        }
Exemple #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);
        }
Exemple #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);
        }
Exemple #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);
        }
Exemple #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);
        }
Exemple #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);
        }