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); }
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; } } }
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 ); }
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; }
public override void OnAfterDelete() { if (m_InternalItem != null && m_InternalItem is Item) { ((Item)m_InternalItem).Delete(); } m_InternalItem = null; base.OnAfterDelete(); }
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; } }
public override void OnAfterDelete() { if ( m_InternalItem != null && m_InternalItem is Item) ((Item)m_InternalItem).Delete(); m_InternalItem = null; base.OnAfterDelete(); }
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; } } }