Example #1
0
        public BaseMount(/*string name,*/ int bodyID, AIType aiType, FightMode fightMode, int rangePerception, int rangeFight, double activeSpeed, double passiveSpeed) : base(aiType, fightMode, rangePerception, rangeFight, activeSpeed, passiveSpeed)
        {
            //Name = name;
            Body = bodyID;

            m_InternalItem = new MountItem(this, InternalItemItemID);
        }
Example #2
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            switch (version)
            {
            case 1:
            {
                m_NextMountAbility = reader.ReadDateTime();
                goto case 0;
            }

            case 0:
            {
                m_Rider        = reader.ReadMobile();
                m_InternalItem = reader.ReadItem() as IMountItem;

                if (m_InternalItem == null || !(m_InternalItem is IMountItem))
                {
                    //Delete(); // don't delete it anymore, make a new one
                    NewInternalItem();
                }
                break;
            }
            }
        }
Example #3
0
		public BaseMount( /*string name,*/ int bodyID, AIType aiType, FightMode fightMode, int rangePerception, int rangeFight, double activeSpeed, double passiveSpeed ) : base ( aiType, fightMode, rangePerception, rangeFight, activeSpeed, passiveSpeed )
		{
			//Name = name;
			Body = bodyID;

			m_InternalItem = new MountItem( this, InternalItemItemID );
		}
Example #4
0
 public void NewInternalItem()
 {
     if (m_InternalItem != null)
     {
         m_InternalItem.Mount = null;
     }
     m_InternalItem = new MountItem(this, InternalItemItemID);
     if (m_InternalItem is Item)
         ((Item)m_InternalItem).Hue = this.Hue;
 }
Example #5
0
        public override void OnAfterDelete()
        {
            if (m_InternalItem != null && m_InternalItem is Item)
            {
                ((Item)m_InternalItem).Delete();
            }

            m_InternalItem = null;

            base.OnAfterDelete();
        }
Example #6
0
 public void NewInternalItem()
 {
     if (m_InternalItem != null)
     {
         m_InternalItem.Mount = null;
     }
     m_InternalItem = new MountItem(this, InternalItemItemID);
     if (m_InternalItem is Item)
     {
         ((Item)m_InternalItem).Hue = this.Hue;
     }
 }
Example #7
0
		public override void OnAfterDelete()
		{
			if ( m_InternalItem != null && m_InternalItem is Item)
				((Item)m_InternalItem).Delete();

			m_InternalItem = null;

			base.OnAfterDelete();
		}
Example #8
0
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();

			switch ( version )
			{
				case 1:
				{
					m_NextMountAbility = reader.ReadDateTime();
					goto case 0;
				}
				case 0:
				{
					m_Rider = reader.ReadMobile();
					m_InternalItem = reader.ReadItem() as IMountItem;

                    if (m_InternalItem == null || !(m_InternalItem is IMountItem))
                        //Delete(); // don't delete it anymore, make a new one
                        NewInternalItem();
					break;
				}
			}
		}