Darklady73
Member
- ServUO Version
- Publish 57
- Ultima Expansion
- Endless Journey
So I have an error in my evo script.
CS0508: Line 182: 'EvolutionDragon.Damage(int, Mobile)': return type must be 'int' to match overridden member 'BaseCreature.Damage(int, Mobile)'
This is the line in question:
public override int Damage( int amount, Mobile defender )
I have tried to change the 'defender' to 'from' but that didn't work. Or does anyone have a working evo dragon script that works with pub 57 so I can compare? I managed to fix a lot of my errors using winmerge. But this one has me stumped.
CS0508: Line 182: 'EvolutionDragon.Damage(int, Mobile)': return type must be 'int' to match overridden member 'BaseCreature.Damage(int, Mobile)'
This is the line in question:
public override int Damage( int amount, Mobile defender )
I have tried to change the 'defender' to 'from' but that didn't work. Or does anyone have a working evo dragon script that works with pub 57 so I can compare? I managed to fix a lot of my errors using winmerge. But this one has me stumped.
public override void Damage( int amount, Mobile defender )
{
int kpgainmin, kpgainmax;
if ( this.Stage == 1 )
{
if ( defender is BaseCreature )
{
BaseCreature bc = (BaseCreature)defender;
if ( bc.Controlled != true )
{
kpgainmin = 5 + ( bc.HitsMax ) / 10;
kpgainmax = 5 + ( bc.HitsMax ) / 5;
this.KP += Utility.RandomList( kpgainmin, kpgainmax );
}
}