RevealingAction() 공개 메소드

public RevealingAction ( ) : void
리턴 void
예제 #1
0
        private static void Shoot(PlayerMobile from, Mobile target, INinjaWeapon weapon)
        {
            if (from != target && CanUseWeapon(from, weapon) && from.CanBeHarmful(target))
            {
                if (weapon.WeaponMinRange == 0 || !from.InRange(target, weapon.WeaponMinRange))
                {
                    from.NinjaWepCooldown = true;

                    from.Direction = from.GetDirectionTo(target);

                    from.RevealingAction();

                    weapon.AttackAnimation(from, target);

                    ConsumeUse(weapon);

                    if (CombatCheck(from, target))
                    {
                        Timer.DelayCall(TimeSpan.FromSeconds(1.0), new TimerStateCallback<object[]>(OnHit), new object[] { from, target, weapon });
                    }

                    Timer.DelayCall(TimeSpan.FromSeconds(2.5), new TimerStateCallback<PlayerMobile>(ResetUsing), from);
                }
                else
                {
                    from.SendLocalizedMessage(1063303); // Your target is too close!
                }
            }
        }
예제 #2
0
        public void Release(PlayerMobile pm, GovernmentEntity g)
        {
            if( !(GovernmentEntity.IsGuildOfficer(pm, g)) )
            {
                pm.SendMessage("Only officers may order a resource to be abandoned.");
                return;
            }

            pm.RevealingAction();
            pm.SendMessage("You order the " + this.Resource.ToString() + " to be abandoned by " + this.Government.Name.ToString() + ".");
            Owned = false;
            Name = BaseName;
            Government = null;
        }
예제 #3
0
        public void Claim(PlayerMobile pm, GovernmentEntity g)
        {
            if (Government != null && !Government.Deleted && Government == g)
            {
                pm.SendMessage(g.Name.ToString() + " already owns this resource.");
                return;
            }

            if (m_ClaimantGovernment != null && !m_ClaimantGovernment.Deleted && m_ClaimantGovernment == g)
            {
                pm.SendMessage(g.Name.ToString() + " is already laying claim to this resource.");
                return;
            }

            if (Owned && (DateTime.Now < m_LastCapture + TimeSpan.FromDays(1)) )
            {
                pm.SendMessage("It is too soon to claim this resource.");
                return;
            }

            if (Owned && ( DateTime.Now < (pm.LastDeath + TimeSpan.FromHours(1)) ) )
            {
                pm.SendMessage("You have been injured in the last hour. Try resting before attempting to claim these resources.");
                return;
            }

            if (!CustomGuildStone.IsGuildOfficer(pm, g))
            {
                pm.SendMessage("Only officers of " + g.Name.ToString() + " may claim resources.");
                return;
            }

            pm.RevealingAction();

            m_Claimant = pm;
            m_ClaimantGovernment = g;
            m_ClaimTimer = new ClaimResourceTimer(this);
            m_ClaimTimer.Start();

            if (m_Government != null && !m_Government.Deleted)
            {
                bool nodeThief = true;

                foreach (CustomGuildStone c in CustomGuildStone.Guilds)
                {
                    if (CustomGuildStone.IsGuildMember(pm, c))
                    {
                        if (m_Government.AlliedGuilds.Contains(c))
                        {
                            nodeThief = false;
                            continue;
                        }
                    }
                }

                if (nodeThief)
                {
                    XmlAttachment attachment = null;
                    attachment = XmlAttach.FindAttachmentOnMobile(pm, typeof(XmlCriminal), m_Government.Nation.ToString());

                    if (attachment == null)
                    {
                        XmlAttach.AttachTo(pm, new XmlCriminal(m_Government.Nation));
                        pm.SendMessage(Soldier.CriminalAlertMessage(m_Government.Nation));

                        pm.RevealingAction();
                    }
                }
            }

            m_Claimant.SendMessage("You begin laying claim to the " + Resource.ToString() + " in the name of " + m_ClaimantGovernment.Name.ToString() + ".");
        }