Added IDevourable for PlaugeBeast and any other creatures that devour corpses.

Corpses no longer have booleans all over the place, I converted the main variables to CorpseFlag
Added something to the Repair when deeds are deleted it'll also send a message in regards to repairing
Added OnBefore and OnAfter Convert/Unconvert for Paragon which is used in PlaugeBeast... Basically if the plauge beast is a paragon, then the devour corpse total will increase.
This commit is contained in:
ravenal 2009-10-18 15:49:24 +00:00
parent 123af436f9
commit 5d07b8f64a
5 changed files with 311 additions and 49 deletions

View file

@ -955,6 +955,22 @@ namespace Server.Mobiles
base.OnBeforeSpawn( location, m );
}
public virtual void OnBeforeParagonConvert()
{
}
public virtual void OnAfterParagonConvert()
{
}
public virtual void OnBeforeParagonUnConvert()
{
}
public virtual void OnAfterParagonUnConvert()
{
}
public override ApplyPoisonResult ApplyPoison( Mobile from, Poison poison )
{
if ( !Alive || IsDeadPet )

View file

@ -46,6 +46,8 @@ namespace Server.Mobiles
if ( bc.IsParagon )
return;
bc.OnBeforeParagonConvert();
bc.Hue = Hue;
if ( bc.HitsMaxSeed >= 0 )
@ -88,6 +90,8 @@ namespace Server.Mobiles
if( Math.Abs( bc.Karma ) > 32000 )
bc.Karma = 32000 * Math.Sign( bc.Karma );
}
bc.OnAfterParagonConvert();
}
public static void UnConvert( BaseCreature bc )
@ -95,6 +99,7 @@ namespace Server.Mobiles
if ( !bc.IsParagon )
return;
bc.OnBeforeParagonUnConvert();
bc.Hue = 0;
if ( bc.HitsMaxSeed >= 0 )
@ -126,6 +131,8 @@ namespace Server.Mobiles
bc.Fame = (int)( bc.Fame / FameBuff );
if ( bc.Karma != 0 )
bc.Karma = (int)( bc.Karma / KarmaBuff );
bc.OnAfterParagonUnConvert();
}
public static bool CheckConvert( BaseCreature bc )