Example #1
0
        public Orders(BaseFactionGuard guard, GenericReader reader)
        {
            m_Guard = guard;

            int version = reader.ReadEncodedInt();

            switch (version)
            {
            case 1:
            {
                m_Follow = reader.ReadMobile();
                goto case 0;
            }

            case 0:
            {
                int count = reader.ReadEncodedInt();
                m_Reactions = new List <Reaction>(count);

                for (int i = 0; i < count; ++i)
                {
                    m_Reactions.Add(new Reaction(reader));
                }

                m_Movement = (MovementType)reader.ReadEncodedInt();

                break;
            }
            }
        }
Example #2
0
        public Orders( BaseFactionGuard guard, GenericReader reader )
        {
            m_Guard = guard;

            int version = reader.ReadEncodedInt();

            switch ( version )
            {
                case 1:
                {
                    m_Follow = reader.ReadMobile();
                    goto case 0;
                }
                case 0:
                {
                    int count = reader.ReadEncodedInt();
                    m_Reactions = new ArrayList( count );

                    for ( int i = 0; i < count; ++i )
                        m_Reactions.Add( new Reaction( reader ) );

                    m_Movement = (MovementType)reader.ReadEncodedInt();

                    break;
                }
            }
        }
Example #3
0
        public Orders(BaseFactionGuard guard, IGenericReader reader)
        {
            Guard = guard;

            var version = reader.ReadEncodedInt();

            switch (version)
            {
            case 1:
            {
                Follow = reader.ReadEntity <Mobile>();
                goto case 0;
            }

            case 0:
            {
                var count = reader.ReadEncodedInt();
                m_Reactions = new List <Reaction>(count);

                for (var i = 0; i < count; ++i)
                {
                    m_Reactions.Add(new Reaction(reader));
                }

                Movement = (MovementType)reader.ReadEncodedInt();

                break;
            }
            }
        }
Example #4
0
		public Orders( BaseFactionGuard guard )
		{
			m_Guard = guard;
			m_Reactions = new List<Reaction>();
			m_Movement = MovementType.Patrol;
		}
Example #5
0
 public Orders(BaseFactionGuard guard)
 {
     m_Guard     = guard;
     m_Reactions = new List <Reaction>();
     m_Movement  = MovementType.Patrol;
 }
Example #6
0
 public FactionGuardAI(BaseFactionGuard guard) : base(guard) => m_Guard = guard;