Resource icon

Mod for BaseDesItem / DamagableItem Ver. 1

Author
zerodowned
Downloads
21
Views
1,268
First release
Last update
Rating
5.00 star(s) 1 ratings
No permission to download Join the discussion
Instructions:
You can manually modify the base script with the instructions below or use the download and just replace your existing script.
** No matter which option you choose you'll need to make the change to BaseCreature and BaseWeapon manually
--------------------------------------------------------------

Ran into some other problems but I have it working now.

To share my work, if you want modify your (implying who ever happens to be reading this) existing script
After the Constructable for IDamageableItem, add

C#:
public override bool CanRegenHits { get { return false; } } // prevents mobile from regenerating hits

public override void OnHitsChange( int oldvalue )
{
if ( m_Parent.Hits != Hits )
{ m_Parent.Hits = Hits; }

InvalidateProperties();
}

Now, if you also want to prevent the child mobile from bleeding when you hit the DamagableItem you'll need to go into BaseCreature

below public virtual bool BleedImmune { get { return false; } }
I added public virtual bool DoesNotBleed { get { return false;} }


Then in BaseWeapon find
public virtual void AddBlood(Mobile attacker, Mobile defender, int damage)

and change the top part to this
*edit: noticed an error that wasn't happening in Orb and I posted this before testing the same code for Serv. You need to add the extra if (defender is BaseCreature) as shown below.

C#:
public virtual void AddBlood(Mobile attacker, Mobile defender, int damage)
     {
   
     if (defender is BaseCreature)
     {
           if( ((BaseCreature)defender).DoesNotBleed )
           {
             return;
           }
     }
       
  else if (damage > 0)
       {


Then back to BaseDesItem and add
public override bool DoesNotBleed{ get{ return true;}}
after private DamageableItem m_Parent;

--------------------------

fyi - for family shards that want to disable bleeding you'll need to change the part in BaseCreature

public virtual bool DoesNotBleed { get { return false;} }
to true instead of false and still add the part in BaseWeapon

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back