Example #1
0
 public static void RemoveTransformationOnAggressiveAction(AggressiveActionEventArgs e)
 {
     if (TransformationSpellHelper.UnderTransformation(e.Aggressor, typeof(EtherealVoyageSpell)))
     {
         TransformationSpellHelper.RemoveContext(e.Aggressor, true);
     }
 }
        public static void EventSink_AggressiveAction(AggressiveActionEventArgs e)
        {
            Mobile aggressor = e.Aggressor;
            Mobile aggressed = e.Aggressed;

            if (!CheckAggressions(aggressor, aggressed) && !(aggressor is Mobiles.BaseGuard))
            {
                if (aggressor.Player && aggressed.Player)
                {
                    aggressor.LocalOverheadMessage(MessageType.Regular, Hue, true, String.Format(AggressorFormat, aggressed.Name));
                    aggressed.LocalOverheadMessage(MessageType.Regular, Hue, true, String.Format(AggressedFormat, aggressor.Name));
                }

                /*Map map = aggressor.Map;
                 *
                 * if ( map == null || map == Map.Internal )
                 *      return;
                 *
                 * IPooledEnumerable eable = map.GetClientsInRange( aggressor.Location, 15);
                 * Packet p = null;
                 * foreach (NetState ns in eable)
                 * {
                 * Mobile m = ns.Mobile;
                 * if (m != null && m.CanSee(aggressor) && m != aggressed && m != aggressor)
                 * {
                 * if (p == null)
                 * p = Packet.Acquire(new AsciiMessage(Serial.MinusOne, -1, MessageType.Regular, 0x3b2, 3, "System", String.Format("You see {0} attacking {1}!", aggressor.Name, aggressed.Name)));
                 * ns.Send(p);
                 * }
                 * }
                 * eable.Free();
                 * Packet.Release(ref p);*/
            }
        }
Example #3
0
        public static void EventSink_AggressiveAction(AggressiveActionEventArgs e)
        {
            var aggressor = e.Aggressor;
            var aggressed = e.Aggressed;

            if (!aggressor.Player || !aggressed.Player)
            {
                return;
            }

            if (!CheckAggressions(aggressor, aggressed))
            {
                aggressor.LocalOverheadMessage(
                    MessageType.Regular,
                    Hue,
                    true,
                    string.Format(AggressorFormat, aggressed.Name)
                    );
                aggressed.LocalOverheadMessage(
                    MessageType.Regular,
                    Hue,
                    true,
                    string.Format(AggressedFormat, aggressor.Name)
                    );
            }
        }
Example #4
0
        public static void EventSink_AggressiveAction(AggressiveActionEventArgs e)
        {
            Mobile aggressor = e.Aggressor;
            Mobile aggressed = e.Aggressed;

            if (!aggressor.Player || !aggressed.Player)
                return;

            if (!CheckAggressions(aggressor, aggressed))
            {
                aggressor.LocalOverheadMessage(MessageType.Regular, Hue, true, String.Format(AggressorFormat, aggressed.Name));
                aggressed.LocalOverheadMessage(MessageType.Regular, Hue, true, String.Format(AggressedFormat, aggressor.Name));
            }
        }
        private static void EventSink_AggressiveAction(AggressiveActionEventArgs e)
        {
            Mobile aggressor = e.Aggressor;
            Mobile aggressed = e.Aggressed;

            if (!aggressor.Player || !aggressed.Player)
            {
                return;
            }

            // remember for 10 minutes
            m_AggressiveActionMemory.Remember(aggressor, 60 * 10);
            m_AggressiveActionMemory.Remember(aggressed, 60 * 10);
        }
Example #6
0
 public static void OnAggressiveAction(AggressiveActionEventArgs e)
 {
     if (e.Aggressed.Player && e.Aggressor != e.Aggressed.Combatant && !DisabledPlayers.Contains(e.Aggressed.Serial.Value))
     {
         if (e.Aggressed.Combatant == null)
         {
             e.Aggressed.Warmode   = true;
             e.Aggressed.Combatant = e.Aggressor;
         }
         else if (e.Aggressor.GetDistanceToSqrt(e.Aggressed) < e.Aggressed.Combatant.GetDistanceToSqrt(e.Aggressed))
         {
             e.Aggressed.Warmode   = true;
             e.Aggressed.Combatant = e.Aggressor;
         }
     }
 }
Example #7
0
        public static void EventSink_AggressiveAction(AggressiveActionEventArgs args)
        {
            Mobile aggressor = args.Aggressor;
            Mobile aggressed = args.Aggressed;

            if (aggressor == null || aggressed == null)
            {
                return;
            }

            if (!Server.Misc.AttackMessage.CheckAggressions(aggressor, aggressed))
            {
                if (aggressor is PlayerMobile && aggressed is PlayerMobile)
                {
                    WriteLine(aggressor, "{0}: {1} {2}", LogManager.Format(aggressor), "initiated aggressive action against", LogManager.Format(aggressed));
                }
            }
        }
Example #8
0
        public static void EventSink_AggressiveAction(AggressiveActionEventArgs e)
        {
            PlayerMobile pm_From   = e.Aggressor as PlayerMobile;
            PlayerMobile pm_Target = e.Aggressed as PlayerMobile;

            BaseCreature bc_Target = e.Aggressed as BaseCreature;

            if (pm_From == null || pm_Target == null)
            {
                return;
            }

            if (!CheckAggressions(pm_From, pm_Target) && pm_From.AccessLevel == AccessLevel.Player)
            {
                pm_From.LocalOverheadMessage(MessageType.Regular, Hue, true, String.Format(AggressorFormat, pm_Target.Name));
                pm_Target.LocalOverheadMessage(MessageType.Regular, Hue, true, String.Format(AggressedFormat, pm_From.Name));
            }
        }
Example #9
0
        public static void EventSink_AggressiveAction(AggressiveActionEventArgs e)
        {
            Mobile aggressor = e.Aggressor;
            Mobile aggressed = e.Aggressed;

            if (!aggressor.Player || !aggressed.Player)
            {
                return;
            }

            if (!CheckAggressions(aggressor, aggressed))
            {
                aggressor.LocalOverheadMessage(MessageType.Regular, Hue, true, String.Format(AggressorFormat, aggressed.Name));
                aggressed.LocalOverheadMessage(MessageType.Regular, Hue, true, String.Format(AggressedFormat, aggressor.Name));
            }

            BuffInfo.AddBuff(aggressor, new BuffInfo(BuffIcon.HeatOfBattleStatus, 1153801, 1153827, Delay, aggressor, true));
            BuffInfo.AddBuff(aggressed, new BuffInfo(BuffIcon.HeatOfBattleStatus, 1153801, 1153827, Delay, aggressed, true));
        }
Example #10
0
        public static void EventSink_AggressiveAction(AggressiveActionEventArgs e)
        {
            Mobile aggressor = e.Aggressor;
            Mobile aggressed = e.Aggressed;

            if (!aggressor.IsPlayer || !aggressed.IsPlayer)
            {
                return;
            }

            if (!CheckAggressions(aggressor, aggressed))
            {
                aggressor.LocalOverheadMessage(MessageType.Regular, Hue, true, String.Format(AggressorFormat, aggressed.Name));
                aggressed.LocalOverheadMessage(MessageType.Regular, Hue, true, String.Format(AggressedFormat, aggressor.Name));

                aggressor.Delta(MobileDelta.Noto);
                aggressed.Delta(MobileDelta.Noto);
            }
        }
Example #11
0
		public static void EventSink_AggressiveAction( AggressiveActionEventArgs e )
		{
			Mobile aggressor = e.Aggressor;
			Mobile aggressed = e.Aggressed;

            if (aggressor == null || aggressed == null)
                return;

			if ( !CheckAggressions( aggressor, aggressed ) )
			{
				//aggressor.LocalOverheadMessage( MessageType.Regular, Hue, true, String.Format( AggressorFormat, aggressed.Name ) );
                //aggressor.NonlocalOverheadMessage(MessageType.Regular, Hue, true, "IM agressor: " + aggressor.Name);
                //aggressed.NonlocalOverheadMessage(MessageType.Regular, Hue, true, "IM agressor: " + aggressed.Name);


                //Show the 2 players
                aggressed.LocalOverheadMessage(MessageType.Regular, Hue, true, String.Format(AggressedFormat, aggressor.Name));
                aggressor.LocalOverheadMessage(MessageType.Regular, Hue, true, String.Format(AggressedFormat, aggressed.Name));
            }
		}
Example #12
0
        public static void EventSink_AggressiveAction(AggressiveActionEventArgs e)
        {
            PlayerMobile pm_From   = e.Aggressor as PlayerMobile;
            PlayerMobile pm_Target = e.Aggressed as PlayerMobile;

            BaseCreature bc_Target = e.Aggressed as BaseCreature;

            //UOACZ
            if (pm_From != null && bc_Target != null)
            {
                if (pm_From.IsUOACZHuman && bc_Target is UOACZBaseHuman)
                {
                    if (!CheckAggressions(pm_From, bc_Target) && pm_From.AccessLevel == AccessLevel.Player)
                    {
                        UOACZSystem.ChangeStat(pm_From, UOACZSystem.UOACZStatType.Honor, UOACZSystem.HumanAttackCivilianHonorLoss, true);
                    }
                }
            }

            if (pm_From == null || pm_Target == null)
            {
                return;
            }

            if (!CheckAggressions(pm_From, pm_Target) && pm_From.AccessLevel == AccessLevel.Player)
            {
                pm_From.LocalOverheadMessage(MessageType.Regular, Hue, true, String.Format(AggressorFormat, pm_Target.Name));
                pm_Target.LocalOverheadMessage(MessageType.Regular, Hue, true, String.Format(AggressedFormat, pm_From.Name));

                //UOACZ
                if (pm_From.IsUOACZHuman && pm_Target.IsUOACZHuman)
                {
                    if (Notoriety.Compute(pm_From, pm_Target) == Notoriety.Innocent)
                    {
                        UOACZSystem.ChangeStat(pm_From, UOACZSystem.UOACZStatType.Honor, UOACZSystem.HumanAttackPlayerHonorLoss, true);
                    }
                }
            }
        }
Example #13
0
        public static void EventSink_AggressiveAction(AggressiveActionEventArgs e)
        {
            Mobile aggressor = e.Aggressor;
            Mobile aggressed = e.Aggressed;

            if (aggressor == null || aggressed == null)
            {
                return;
            }

            if (!CheckAggressions(aggressor, aggressed))
            {
                //aggressor.LocalOverheadMessage( MessageType.Regular, Hue, true, String.Format( AggressorFormat, aggressed.Name ) );
                //aggressor.NonlocalOverheadMessage(MessageType.Regular, Hue, true, "IM agressor: " + aggressor.Name);
                //aggressed.NonlocalOverheadMessage(MessageType.Regular, Hue, true, "IM agressor: " + aggressed.Name);


                //Show the 2 players
                aggressed.LocalOverheadMessage(MessageType.Regular, Hue, true, String.Format(AggressedFormat, aggressor.Name));
                aggressor.LocalOverheadMessage(MessageType.Regular, Hue, true, String.Format(AggressedFormat, aggressed.Name));
            }
        }
Example #14
0
        public static AggressiveActionEventArgs Create( Mobile aggressed, Mobile aggressor, bool criminal )
        {
            AggressiveActionEventArgs args;

            if ( m_Pool.Count > 0 )
            {
                args = m_Pool.Dequeue();

                args.m_Aggressed = aggressed;
                args.m_Aggressor = aggressor;
                args.m_Criminal = criminal;
            }
            else
            {
                args = new AggressiveActionEventArgs( aggressed, aggressor, criminal );
            }

            return args;
        }
Example #15
0
 public void InvokeAggressiveAction( AggressiveActionEventArgs e )
 {
     if ( AggressiveAction != null )
         AggressiveAction( e );
 }