Fixes code according to modern code style. Fixes a few expression bugs.
This commit is contained in:
parent
89eea25e5f
commit
970fd563b2
3324 changed files with 441118 additions and 433755 deletions
|
|
@ -1,76 +1,78 @@
|
|||
using Server.SkillHandlers;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class EggBomb : Item
|
||||
{
|
||||
public override int LabelNumber => 1030249;
|
||||
public class EggBomb : Item
|
||||
{
|
||||
[Constructible]
|
||||
public EggBomb() : base(0x2808)
|
||||
{
|
||||
// Item ID should be 0x2809 - Temporary solution for clients 7.0.0.0 and up
|
||||
Stackable = Core.ML;
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public EggBomb() : base( 0x2808 )
|
||||
{
|
||||
// Item ID should be 0x2809 - Temporary solution for clients 7.0.0.0 and up
|
||||
Stackable = Core.ML;
|
||||
Weight = 1.0;
|
||||
}
|
||||
public EggBomb(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public EggBomb( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public override int LabelNumber => 1030249;
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( !IsChildOf( from.Backpack ) )
|
||||
{
|
||||
// The item must be in your backpack to use it.
|
||||
from.SendLocalizedMessage( 1060640 );
|
||||
}
|
||||
else if ( from.Skills.Ninjitsu.Value < 50.0 )
|
||||
{
|
||||
// You need at least ~1_SKILL_REQUIREMENT~ ~2_SKILL_NAME~ skill to use that ability.
|
||||
from.SendLocalizedMessage( 1063013, "50\tNinjitsu" );
|
||||
}
|
||||
else if (Core.TickCount - from.NextSkillTime < 0)
|
||||
{
|
||||
// You must wait a few seconds before you can use that item.
|
||||
from.SendLocalizedMessage( 1070772 );
|
||||
}
|
||||
else if ( from.Mana < 10 )
|
||||
{
|
||||
// You don't have enough mana to do that.
|
||||
from.SendLocalizedMessage( 1049456 );
|
||||
}
|
||||
else
|
||||
{
|
||||
SkillHandlers.Hiding.CombatOverride = true;
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (!IsChildOf(from.Backpack))
|
||||
{
|
||||
// The item must be in your backpack to use it.
|
||||
from.SendLocalizedMessage(1060640);
|
||||
}
|
||||
else if (from.Skills.Ninjitsu.Value < 50.0)
|
||||
{
|
||||
// You need at least ~1_SKILL_REQUIREMENT~ ~2_SKILL_NAME~ skill to use that ability.
|
||||
from.SendLocalizedMessage(1063013, "50\tNinjitsu");
|
||||
}
|
||||
else if (Core.TickCount - from.NextSkillTime < 0)
|
||||
{
|
||||
// You must wait a few seconds before you can use that item.
|
||||
from.SendLocalizedMessage(1070772);
|
||||
}
|
||||
else if (from.Mana < 10)
|
||||
{
|
||||
// You don't have enough mana to do that.
|
||||
from.SendLocalizedMessage(1049456);
|
||||
}
|
||||
else
|
||||
{
|
||||
Hiding.CombatOverride = true;
|
||||
|
||||
if ( from.UseSkill( SkillName.Hiding ) )
|
||||
{
|
||||
from.Mana -= 10;
|
||||
if (from.UseSkill(SkillName.Hiding))
|
||||
{
|
||||
from.Mana -= 10;
|
||||
|
||||
from.FixedParticles( 0x3709, 1, 30, 9904, 1108, 6, EffectLayer.RightFoot );
|
||||
from.PlaySound( 0x22F );
|
||||
from.FixedParticles(0x3709, 1, 30, 9904, 1108, 6, EffectLayer.RightFoot);
|
||||
from.PlaySound(0x22F);
|
||||
|
||||
Consume();
|
||||
}
|
||||
Consume();
|
||||
}
|
||||
|
||||
SkillHandlers.Hiding.CombatOverride = false;
|
||||
}
|
||||
}
|
||||
Hiding.CombatOverride = false;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if ( ItemID == 0x2809 ) // Temporary solution for clients 7.0.0.0 and up
|
||||
ItemID = 0x2808;
|
||||
}
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if (ItemID == 0x2809) // Temporary solution for clients 7.0.0.0 and up
|
||||
ItemID = 0x2808;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue