Hi can you tell me what i need to fix here for this warning
CODE |
Warnings: + Custom Scripts 2.0/Zeus/Zeus Weapons/SwordOfZeus.cs: CS0108: Line 94: 'Server.Items.SwordOfZeus.OnHit(Server.Mobile, Server.Mobil e)' hides inherited member 'Server.Items.BaseWeapon.OnHit(Server.Mobile, Server. Mobile)'. Use the new keyword if hiding was intended. |
And heres the script
CODE |
using System; using Server; using Server.Network; using Server.Items;
using Server.Targeting; using Server.Misc; using System.Collections;
namespace Server.Items { public class SwordOfZeus : BaseSword { public override int ArtifactRarity{ get{ return 69; } } public override WeaponAbility PrimaryAbility{ get{ return WeaponAbility.Disarm; } } //public override WeaponAbility PrimaryAbility{ get{ return WeaponAbility.ArmorIgnore; } } public override WeaponAbility SecondaryAbility{ get{ return WeaponAbility.ParalyzingBlow; } } //public override WeaponAbility SecondaryAbility{ get{ return WeaponAbility.MortalStrike; } } public override int AosMinDamage{ get{ return 20; } } public override int AosMaxDamage{ get{ return 25; } } public override int AosSpeed{ get{ return 30; } } public override int OldMinDamage{ get{ return 20; } } public override int OldMaxDamage{ get{ return 25; } } public override int OldSpeed{ get{ return 30; } }
public override int DefMaxRange{ get{return 3; } } public override int DefHitSound{ get{ return 0x237; } } public override int DefMissSound{ get{ return 0x23A; } }
private DateTime timeTalk = DateTime.Now; // To set delay time for sword speech [Constructable] public SwordOfZeus() : base( 0x26CF ) { Name = "Sword Of Zeus"; Weight = 1.0; Hue = 1175; /*AccuracyLevel = WeaponAccuracyLevel.Supremely; DurabilityLevel = WeaponDurabilityLevel.Indestructible;*/ DamageLevel = WeaponDamageLevel.Vanq; Quality = WeaponQuality.Exceptional; //Resource = CraftResource.Valorite; Attributes.AttackChance = 50; //Attributes.WeaponDamage = 20; Attributes.Luck = 200; //Attributes.RegenMana = 5; //Attributes.RegenHits = 5; //Attributes.RegenStam = 5; //Attributes.BonusDex = 20; //Attributes.BonusStr = 20; //Attributes.BonusInt = 20; Attributes.SpellChanneling = 1; //AosWeaponAttribute WeaponAttributes.SelfRepair = 5; Attributes.WeaponSpeed = 30; WeaponAttributes.HitLeechMana = 20; WeaponAttributes.HitLeechHits = 15; WeaponAttributes.HitLeechStam = 15; WeaponAttributes.HitHarm = 20; WeaponAttributes.HitLowerAttack = 20; WeaponAttributes.HitLowerDefend = 15; WeaponAttributes.HitDispel = 15; WeaponAttributes.HitFireball = 30; WeaponAttributes.HitLightning = 10; //LootType = LootType.Blessed; }
public override void GetDamageTypes( Mobile weilder, out int phys, out int fire, out int cold, out int pois, out int nrgy ) { phys = 20; nrgy = 18; pois = 18; fire = 20; cold = 18; }
public void OnHit( Mobile attacker, Mobile defender ) { base.OnHit( attacker, defender );
if( DateTime.Now >= timeTalk ) { switch ( Utility.Random( 8 )) { case 0: attacker.SendMessage( "You feel the power of Zeus aiding you in combat!" ); break; case 1: attacker.Say( "Curse thine Offspring!" ); break; case 2: attacker.Say( "Thy blood shall soil the land!" ); break; case 3: attacker.Say( "Feel the wrath of Zeus!" ); break; case 4: attacker.Say( "Your death is at hand fiend!" ); break; case 5: attacker.Say( "There can be only one!" ); break; case 6: attacker.Say( "I have something to say, it's better to burn out than to fade away!" ); break; case 7: attacker.Say( "Suffer the wrath of Zeus rogue!" ); break; //defender.Say( "Forgive my ignorance please!" ); } timeTalk = DateTime.Now + TimeSpan.FromSeconds(2.5); // To set delay time for sword speech
}
} //public Poison HitPoison{ get{ return Poison.Lethal; } }
public SwordOfZeus( Serial serial ) : base( serial ) { }
public override void Serialize( GenericWriter writer ) { base.Serialize( writer );
writer.Write( (int) 0 ); // version }
public override void Deserialize( GenericReader reader ) { base.Deserialize( reader );
int version = reader.ReadInt(); } } } |
QUOTE (Erica @ April 08, 2007 11:36 am) |
Hi can you tell me what i need to fix here for this warningCODE | Warnings: + Custom Scripts 2.0/Zeus/Zeus Weapons/SwordOfZeus.cs: CS0108: Line 94: 'Server.Items.SwordOfZeus.OnHit(Server.Mobile, Server.Mobil e)' hides inherited member 'Server.Items.BaseWeapon.OnHit(Server.Mobile, Server. Mobile)'. Use the new keyword if hiding was intended. |
And heres the script
CODE | using System; using Server; using Server.Network; using Server.Items;
using Server.Targeting; using Server.Misc; using System.Collections;
namespace Server.Items { public class SwordOfZeus : BaseSword { public override int ArtifactRarity{ get{ return 69; } } public override WeaponAbility PrimaryAbility{ get{ return WeaponAbility.Disarm; } } //public override WeaponAbility PrimaryAbility{ get{ return WeaponAbility.ArmorIgnore; } } public override WeaponAbility SecondaryAbility{ get{ return WeaponAbility.ParalyzingBlow; } } //public override WeaponAbility SecondaryAbility{ get{ return WeaponAbility.MortalStrike; } } public override int AosMinDamage{ get{ return 20; } } public override int AosMaxDamage{ get{ return 25; } } public override int AosSpeed{ get{ return 30; } } public override int OldMinDamage{ get{ return 20; } } public override int OldMaxDamage{ get{ return 25; } } public override int OldSpeed{ get{ return 30; } }
public override int DefMaxRange{ get{return 3; } } public override int DefHitSound{ get{ return 0x237; } } public override int DefMissSound{ get{ return 0x23A; } }
private DateTime timeTalk = DateTime.Now; // To set delay time for sword speech [Constructable] public SwordOfZeus() : base( 0x26CF ) { Name = "Sword Of Zeus"; Weight = 1.0; Hue = 1175; /*AccuracyLevel = WeaponAccuracyLevel.Supremely; DurabilityLevel = WeaponDurabilityLevel.Indestructible;*/ DamageLevel = WeaponDamageLevel.Vanq; Quality = WeaponQuality.Exceptional; //Resource = CraftResource.Valorite; Attributes.AttackChance = 50; //Attributes.WeaponDamage = 20; Attributes.Luck = 200; //Attributes.RegenMana = 5; //Attributes.RegenHits = 5; //Attributes.RegenStam = 5; //Attributes.BonusDex = 20; //Attributes.BonusStr = 20; //Attributes.BonusInt = 20; Attributes.SpellChanneling = 1; //AosWeaponAttribute WeaponAttributes.SelfRepair = 5; Attributes.WeaponSpeed = 30; WeaponAttributes.HitLeechMana = 20; WeaponAttributes.HitLeechHits = 15; WeaponAttributes.HitLeechStam = 15; WeaponAttributes.HitHarm = 20; WeaponAttributes.HitLowerAttack = 20; WeaponAttributes.HitLowerDefend = 15; WeaponAttributes.HitDispel = 15; WeaponAttributes.HitFireball = 30; WeaponAttributes.HitLightning = 10; //LootType = LootType.Blessed; }
public override void GetDamageTypes( Mobile weilder, out int phys, out int fire, out int cold, out int pois, out int nrgy ) { phys = 20; nrgy = 18; pois = 18; fire = 20; cold = 18; }
public void OnHit( Mobile attacker, Mobile defender ) { base.OnHit( attacker, defender );
if( DateTime.Now >= timeTalk ) { switch ( Utility.Random( 8 )) { case 0: attacker.SendMessage( "You feel the power of Zeus aiding you in combat!" ); break; case 1: attacker.Say( "Curse thine Offspring!" ); break; case 2: attacker.Say( "Thy blood shall soil the land!" ); break; case 3: attacker.Say( "Feel the wrath of Zeus!" ); break; case 4: attacker.Say( "Your death is at hand fiend!" ); break; case 5: attacker.Say( "There can be only one!" ); break; case 6: attacker.Say( "I have something to say, it's better to burn out than to fade away!" ); break; case 7: attacker.Say( "Suffer the wrath of Zeus rogue!" ); break; //defender.Say( "Forgive my ignorance please!" ); } timeTalk = DateTime.Now + TimeSpan.FromSeconds(2.5); // To set delay time for sword speech
}
} //public Poison HitPoison{ get{ return Poison.Lethal; } }
public SwordOfZeus( Serial serial ) : base( serial ) { }
public override void Serialize( GenericWriter writer ) { base.Serialize( writer );
writer.Write( (int) 0 ); // version }
public override void Deserialize( GenericReader reader ) { base.Deserialize( reader );
int version = reader.ReadInt(); } } } |
|
Never Mind got the warning fixed and there was something else wrong with the script so got that as well fixed