Adds style cop (#109)
This commit is contained in:
parent
3e715bcb60
commit
556a17aba8
1725 changed files with 33831 additions and 38046 deletions
|
|
@ -149,8 +149,8 @@ namespace Server.Items
|
|||
|
||||
private class FacingGump : Gump
|
||||
{
|
||||
private FirefliesDeed m_Deed;
|
||||
private Mobile m_Placer;
|
||||
private readonly FirefliesDeed m_Deed;
|
||||
private readonly Mobile m_Placer;
|
||||
|
||||
public FacingGump(FirefliesDeed deed, Mobile player)
|
||||
: base(150, 50)
|
||||
|
|
@ -202,8 +202,8 @@ namespace Server.Items
|
|||
|
||||
private class InternalTarget : Target
|
||||
{
|
||||
private FirefliesDeed m_FirefliesDeed;
|
||||
private int m_ItemID;
|
||||
private readonly FirefliesDeed m_FirefliesDeed;
|
||||
private readonly int m_ItemID;
|
||||
|
||||
public InternalTarget(FirefliesDeed m_Deed, int itemid)
|
||||
: base(-1, true, TargetFlags.None)
|
||||
|
|
@ -243,7 +243,7 @@ namespace Server.Items
|
|||
|
||||
bool isclear = !Map.Malas.GetItemsInRange(p3d, 0).OfType<Fireflies>().Any();
|
||||
|
||||
if ((m_ItemID == 0x2336 && north || m_ItemID == 0x2332 && west) && isclear)
|
||||
if (((m_ItemID == 0x2336 && north) || (m_ItemID == 0x2332 && west)) && isclear)
|
||||
{
|
||||
Fireflies flies = new Fireflies(m_ItemID);
|
||||
|
||||
|
|
@ -253,7 +253,6 @@ namespace Server.Items
|
|||
|
||||
m_FirefliesDeed.Delete();
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1150065); // Holiday fireflies must be placed next to a wall.
|
||||
|
|
|
|||
|
|
@ -139,8 +139,6 @@ namespace Server.Engines.Events
|
|||
|
||||
DateTime now = DateTime.UtcNow;
|
||||
|
||||
|
||||
|
||||
if (CheckMobile(begged))
|
||||
{
|
||||
if (begged.NextTrickOrTreat > now)
|
||||
|
|
@ -202,7 +200,7 @@ namespace Server.Engines.Events
|
|||
|
||||
public class NaughtyTwin : BaseCreature
|
||||
{
|
||||
private static Point3D[] Felucca_Locations =
|
||||
private static readonly Point3D[] Felucca_Locations =
|
||||
{
|
||||
new Point3D(4467, 1283, 5), // Moonglow
|
||||
new Point3D(1336, 1997, 5), // Britain
|
||||
|
|
@ -214,13 +212,13 @@ namespace Server.Engines.Events
|
|||
new Point3D(3563, 2139, Map.Trammel.GetAverageZ(3563, 2139)) // (New) Magincia
|
||||
};
|
||||
|
||||
private static Point3D[] Malas_Locations =
|
||||
private static readonly Point3D[] Malas_Locations =
|
||||
{
|
||||
new Point3D(1015, 527, -65), // Luna
|
||||
new Point3D(1997, 1386, -85) // Umbra
|
||||
};
|
||||
|
||||
private static Point3D[] Ilshenar_Locations =
|
||||
private static readonly Point3D[] Ilshenar_Locations =
|
||||
{
|
||||
new Point3D(1215, 467, -13), // Compassion
|
||||
new Point3D(722, 1366, -60), // Honesty
|
||||
|
|
@ -233,14 +231,14 @@ namespace Server.Engines.Events
|
|||
new Point3D(1721, 218, 96) // Chaos
|
||||
};
|
||||
|
||||
private static Point3D[] Tokuno_Locations =
|
||||
private static readonly Point3D[] Tokuno_Locations =
|
||||
{
|
||||
new Point3D(1169, 998, 41), // Isamu-Jima
|
||||
new Point3D(802, 1204, 25), // Makoto-Jima
|
||||
new Point3D(270, 628, 15) // Homare-Jima
|
||||
};
|
||||
|
||||
private Mobile m_From;
|
||||
private readonly Mobile m_From;
|
||||
|
||||
public NaughtyTwin(Mobile from)
|
||||
: base(AIType.AI_Melee, FightMode.None, 10, 1, 0.2, 0.4)
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ namespace Server.Engines.Events
|
|||
{
|
||||
private static Timer m_Timer;
|
||||
|
||||
private static Rectangle2D[] m_PumpkinFields =
|
||||
private static readonly Rectangle2D[] m_PumpkinFields =
|
||||
{
|
||||
new Rectangle2D(4557, 1471, 20, 10),
|
||||
new Rectangle2D(796, 2152, 36, 24),
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
//using System.Collections.Generic;
|
||||
// using System.Collections.Generic;
|
||||
|
||||
namespace Server.Items.Holiday
|
||||
{
|
||||
[TypeAlias("Server.Items.ClownMask", "Server.Items.DaemonMask", "Server.Items.PlagueMask")]
|
||||
public class BasePaintedMask : Item
|
||||
{
|
||||
private static string[] m_Staffers =
|
||||
private static readonly string[] m_Staffers =
|
||||
{
|
||||
"Ryan",
|
||||
"Mark",
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using System.Collections.Generic;
|
||||
using Server.Events.Halloween;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Events
|
||||
{
|
||||
|
|
@ -20,24 +20,24 @@ namespace Server.Engines.Events
|
|||
|
||||
private static List<PlayerMobile> m_DeathQueue;
|
||||
|
||||
private static Rectangle2D[] m_Cemetaries = {
|
||||
new Rectangle2D(1272,3712,30,20), // Jhelom
|
||||
new Rectangle2D(1337,1444,48,52), // Britain
|
||||
new Rectangle2D(2424,1098,20,28), // Trinsic
|
||||
new Rectangle2D(2728,840,54,54), // Vesper
|
||||
new Rectangle2D(4528,1314,20,28), // Moonglow
|
||||
new Rectangle2D(712,1104,30,22), // Yew
|
||||
new Rectangle2D(5824,1464,22,6), // Fire Dungeon
|
||||
new Rectangle2D(5224,3655,14,5), // T2A
|
||||
private static readonly Rectangle2D[] m_Cemetaries = {
|
||||
new Rectangle2D(1272, 3712, 30, 20), // Jhelom
|
||||
new Rectangle2D(1337, 1444, 48, 52), // Britain
|
||||
new Rectangle2D(2424, 1098, 20, 28), // Trinsic
|
||||
new Rectangle2D(2728, 840, 54, 54), // Vesper
|
||||
new Rectangle2D(4528, 1314, 20, 28), // Moonglow
|
||||
new Rectangle2D(712, 1104, 30, 22), // Yew
|
||||
new Rectangle2D(5824, 1464, 22, 6), // Fire Dungeon
|
||||
new Rectangle2D(5224, 3655, 14, 5), // T2A
|
||||
|
||||
new Rectangle2D(1272,3712,20,30), // Jhelom
|
||||
new Rectangle2D(1337,1444,52,48), // Britain
|
||||
new Rectangle2D(2424,1098,28,20), // Trinsic
|
||||
new Rectangle2D(2728,840,54,54), // Vesper
|
||||
new Rectangle2D(4528,1314,28,20), // Moonglow
|
||||
new Rectangle2D(712,1104,22,30), // Yew
|
||||
new Rectangle2D(5824,1464,6,22), // Fire Dungeon
|
||||
new Rectangle2D(5224,3655,5,14) // T2A
|
||||
new Rectangle2D(1272, 3712, 20, 30), // Jhelom
|
||||
new Rectangle2D(1337, 1444, 52, 48), // Britain
|
||||
new Rectangle2D(2424, 1098, 28, 20), // Trinsic
|
||||
new Rectangle2D(2728, 840, 54, 54), // Vesper
|
||||
new Rectangle2D(4528, 1314, 28, 20), // Moonglow
|
||||
new Rectangle2D(712, 1104, 22, 30), // Yew
|
||||
new Rectangle2D(5824, 1464, 6, 22), // Fire Dungeon
|
||||
new Rectangle2D(5224, 3655, 5, 14) // T2A
|
||||
};
|
||||
|
||||
public static void Initialize()
|
||||
|
|
@ -48,17 +48,17 @@ namespace Server.Engines.Events
|
|||
m_QueueClearIntervalSeconds = 1800;
|
||||
|
||||
DateTime today = DateTime.UtcNow;
|
||||
TimeSpan tick = TimeSpan.FromSeconds( m_QueueDelaySeconds );
|
||||
TimeSpan clear = TimeSpan.FromSeconds( m_QueueClearIntervalSeconds );
|
||||
TimeSpan tick = TimeSpan.FromSeconds(m_QueueDelaySeconds);
|
||||
TimeSpan clear = TimeSpan.FromSeconds(m_QueueClearIntervalSeconds);
|
||||
|
||||
ReAnimated = new Dictionary<PlayerMobile, ZombieSkeleton>();
|
||||
m_DeathQueue = new List<PlayerMobile>();
|
||||
|
||||
if ( today >= HolidaySettings.StartHalloween && today <= HolidaySettings.FinishHalloween )
|
||||
if (today >= HolidaySettings.StartHalloween && today <= HolidaySettings.FinishHalloween)
|
||||
{
|
||||
m_Timer = Timer.DelayCall( tick, tick, Timer_Callback );
|
||||
m_Timer = Timer.DelayCall(tick, tick, Timer_Callback);
|
||||
|
||||
m_ClearTimer = Timer.DelayCall( clear, clear, Clear_Callback );
|
||||
m_ClearTimer = Timer.DelayCall(clear, clear, Clear_Callback);
|
||||
|
||||
EventSink.PlayerDeath += EventSink_PlayerDeath;
|
||||
}
|
||||
|
|
@ -76,40 +76,40 @@ namespace Server.Engines.Events
|
|||
|
||||
m_DeathQueue.Clear();
|
||||
|
||||
if ( DateTime.UtcNow <= HolidaySettings.FinishHalloween ) m_ClearTimer.Stop();
|
||||
if (DateTime.UtcNow <= HolidaySettings.FinishHalloween) m_ClearTimer.Stop();
|
||||
}
|
||||
|
||||
private static void Timer_Callback()
|
||||
{
|
||||
PlayerMobile player = null;
|
||||
|
||||
if ( DateTime.UtcNow <= HolidaySettings.FinishHalloween )
|
||||
if (DateTime.UtcNow <= HolidaySettings.FinishHalloween)
|
||||
{
|
||||
for ( int index = 0; m_DeathQueue.Count > 0 && index < m_DeathQueue.Count; index++ )
|
||||
if ( !ReAnimated.ContainsKey( m_DeathQueue[ index ] ) )
|
||||
for (int index = 0; m_DeathQueue.Count > 0 && index < m_DeathQueue.Count; index++)
|
||||
if (!ReAnimated.ContainsKey(m_DeathQueue[index]))
|
||||
{
|
||||
player = m_DeathQueue[ index ];
|
||||
player = m_DeathQueue[index];
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if (player?.Deleted == false && ReAnimated.Count < m_TotalZombieLimit )
|
||||
if (player?.Deleted == false && ReAnimated.Count < m_TotalZombieLimit)
|
||||
{
|
||||
Map map = Utility.RandomBool() ? Map.Trammel : Map.Felucca;
|
||||
|
||||
Point3D home = GetRandomPointInRect( m_Cemetaries[ Utility.Random( m_Cemetaries.Length ) ], map );
|
||||
Point3D home = GetRandomPointInRect(m_Cemetaries[Utility.Random(m_Cemetaries.Length)], map);
|
||||
|
||||
if ( map.CanSpawnMobile( home ) )
|
||||
if (map.CanSpawnMobile(home))
|
||||
{
|
||||
ZombieSkeleton zombieskel = new ZombieSkeleton( player );
|
||||
ZombieSkeleton zombieskel = new ZombieSkeleton(player);
|
||||
|
||||
ReAnimated.Add( player, zombieskel );
|
||||
ReAnimated.Add(player, zombieskel);
|
||||
zombieskel.Home = home;
|
||||
zombieskel.RangeHome = 10;
|
||||
|
||||
zombieskel.MoveToWorld( home, map );
|
||||
zombieskel.MoveToWorld(home, map);
|
||||
|
||||
m_DeathQueue.Remove( player );
|
||||
m_DeathQueue.Remove(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -119,20 +119,20 @@ namespace Server.Engines.Events
|
|||
}
|
||||
}
|
||||
|
||||
private static Point3D GetRandomPointInRect( Rectangle2D rect, Map map )
|
||||
private static Point3D GetRandomPointInRect(Rectangle2D rect, Map map)
|
||||
{
|
||||
int x = Utility.Random( rect.X, rect.Width );
|
||||
int y = Utility.Random( rect.Y, rect.Height );
|
||||
int x = Utility.Random(rect.X, rect.Width);
|
||||
int y = Utility.Random(rect.Y, rect.Height);
|
||||
|
||||
return new Point3D( x, y, map.GetAverageZ( x, y ) );
|
||||
return new Point3D(x, y, map.GetAverageZ(x, y));
|
||||
}
|
||||
}
|
||||
|
||||
public class PlayerBones : BaseContainer
|
||||
{
|
||||
[Constructible]
|
||||
public PlayerBones( string name )
|
||||
: base( Utility.RandomMinMax( 0x0ECA, 0x0ED2 ) )
|
||||
public PlayerBones(string name)
|
||||
: base(Utility.RandomMinMax(0x0ECA, 0x0ED2))
|
||||
{
|
||||
Name = $"{name}'s bones";
|
||||
|
||||
|
|
@ -145,20 +145,20 @@ namespace Server.Engines.Events
|
|||
};
|
||||
}
|
||||
|
||||
public PlayerBones( Serial serial )
|
||||
: base( serial )
|
||||
public PlayerBones(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer )
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( 0 );
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize( IGenericReader reader )
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
|
@ -171,7 +171,7 @@ namespace Server.Engines.Events
|
|||
private PlayerMobile m_DeadPlayer;
|
||||
|
||||
public ZombieSkeleton(PlayerMobile player = null)
|
||||
: base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
|
||||
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
m_DeadPlayer = player;
|
||||
|
||||
|
|
@ -180,28 +180,28 @@ namespace Server.Engines.Events
|
|||
Body = 0x93;
|
||||
BaseSoundID = 0x1c3;
|
||||
|
||||
SetStr( 500 );
|
||||
SetDex( 500 );
|
||||
SetInt( 500 );
|
||||
SetStr(500);
|
||||
SetDex(500);
|
||||
SetInt(500);
|
||||
|
||||
SetHits( 2500 );
|
||||
SetMana( 500 );
|
||||
SetStam( 500 );
|
||||
SetHits(2500);
|
||||
SetMana(500);
|
||||
SetStam(500);
|
||||
|
||||
SetDamage( 8, 18 );
|
||||
SetDamage(8, 18);
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 40 );
|
||||
SetDamageType( ResistanceType.Cold, 60 );
|
||||
SetDamageType(ResistanceType.Physical, 40);
|
||||
SetDamageType(ResistanceType.Cold, 60);
|
||||
|
||||
SetResistance( ResistanceType.Fire, 50 );
|
||||
SetResistance( ResistanceType.Energy, 50 );
|
||||
SetResistance( ResistanceType.Physical, 50 );
|
||||
SetResistance( ResistanceType.Cold, 50 );
|
||||
SetResistance( ResistanceType.Poison, 50 );
|
||||
SetResistance(ResistanceType.Fire, 50);
|
||||
SetResistance(ResistanceType.Energy, 50);
|
||||
SetResistance(ResistanceType.Physical, 50);
|
||||
SetResistance(ResistanceType.Cold, 50);
|
||||
SetResistance(ResistanceType.Poison, 50);
|
||||
|
||||
SetSkill( SkillName.MagicResist, 65.1, 80.0 );
|
||||
SetSkill( SkillName.Tactics, 95.1, 100 );
|
||||
SetSkill( SkillName.Wrestling, 85.1, 95 );
|
||||
SetSkill(SkillName.MagicResist, 65.1, 80.0);
|
||||
SetSkill(SkillName.Tactics, 95.1, 100);
|
||||
SetSkill(SkillName.Wrestling, 85.1, 95);
|
||||
|
||||
Fame = 1000;
|
||||
Karma = -1000;
|
||||
|
|
@ -211,48 +211,49 @@ namespace Server.Engines.Events
|
|||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
switch( Utility.Random( 10 ) )
|
||||
switch (Utility.Random(10))
|
||||
{
|
||||
case 0: PackItem( new LeftArm() ); break;
|
||||
case 1: PackItem( new RightArm() ); break;
|
||||
case 2: PackItem( new Torso() ); break;
|
||||
case 3: PackItem( new Bone() ); break;
|
||||
case 4: PackItem( new RibCage() ); break;
|
||||
case 5: if (m_DeadPlayer?.Deleted == false) PackItem( new PlayerBones( m_DeadPlayer.Name ) );
|
||||
case 0: PackItem(new LeftArm()); break;
|
||||
case 1: PackItem(new RightArm()); break;
|
||||
case 2: PackItem(new Torso()); break;
|
||||
case 3: PackItem(new Bone()); break;
|
||||
case 4: PackItem(new RibCage()); break;
|
||||
case 5:
|
||||
if (m_DeadPlayer?.Deleted == false) PackItem(new PlayerBones(m_DeadPlayer.Name));
|
||||
break;
|
||||
}
|
||||
|
||||
AddLoot( LootPack.Meager );
|
||||
AddLoot(LootPack.Meager);
|
||||
}
|
||||
|
||||
public override bool BleedImmune => true;
|
||||
|
||||
public override Poison PoisonImmune => Poison.Regular;
|
||||
|
||||
public ZombieSkeleton( Serial serial )
|
||||
: base( serial )
|
||||
public ZombieSkeleton(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnDelete()
|
||||
{
|
||||
if ( HalloweenHauntings.ReAnimated != null )
|
||||
if (HalloweenHauntings.ReAnimated != null)
|
||||
if (m_DeadPlayer?.Deleted == false)
|
||||
if ( HalloweenHauntings.ReAnimated.ContainsKey( m_DeadPlayer ) )
|
||||
HalloweenHauntings.ReAnimated.Remove( m_DeadPlayer );
|
||||
if (HalloweenHauntings.ReAnimated.ContainsKey(m_DeadPlayer))
|
||||
HalloweenHauntings.ReAnimated.Remove(m_DeadPlayer);
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer )
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( 0 );
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
|
||||
writer.WriteMobile( m_DeadPlayer );
|
||||
writer.WriteMobile(m_DeadPlayer);
|
||||
}
|
||||
|
||||
public override void Deserialize( IGenericReader reader )
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
|
||||
m_DeadPlayer = reader.ReadMobile<PlayerMobile>();
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ namespace Server.Events.Halloween
|
|||
{
|
||||
internal class HolidaySettings
|
||||
{
|
||||
private static Type[] m_GMBeggarTreats =
|
||||
private static readonly Type[] m_GMBeggarTreats =
|
||||
{
|
||||
typeof(CreepyCake),
|
||||
typeof(PumpkinPizza),
|
||||
|
|
@ -21,7 +21,7 @@ namespace Server.Events.Halloween
|
|||
typeof(ColoredSmallWebs)
|
||||
};
|
||||
|
||||
private static Type[] m_Treats =
|
||||
private static readonly Type[] m_Treats =
|
||||
{
|
||||
typeof(Lollipops),
|
||||
typeof(WrappedCandy),
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public DateTime EditLimit{ get; set; }
|
||||
public DateTime EditLimit { get; set; }
|
||||
|
||||
public bool IsSigned => m_Line1 != null || m_Line2 != null || m_Line3 != null;
|
||||
|
||||
|
|
@ -158,7 +158,7 @@ namespace Server.Items
|
|||
|
||||
private class InternalGump : Gump
|
||||
{
|
||||
private StValentinesBear m_Bear;
|
||||
private readonly StValentinesBear m_Bear;
|
||||
|
||||
public InternalGump(StValentinesBear bear)
|
||||
: base(50, 50)
|
||||
|
|
|
|||
|
|
@ -12,14 +12,14 @@ namespace Server.Items
|
|||
private string m_From;
|
||||
private string m_To;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public string From
|
||||
{
|
||||
get => m_From;
|
||||
set { m_From = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public string To
|
||||
{
|
||||
get => m_To;
|
||||
|
|
@ -30,59 +30,59 @@ namespace Server.Items
|
|||
|
||||
[Constructible]
|
||||
public CupidsArrow()
|
||||
: base( 0x4F7F ) =>
|
||||
: base(0x4F7F) =>
|
||||
LootType = LootType.Blessed;
|
||||
|
||||
public override void AddNameProperty( ObjectPropertyList list )
|
||||
public override void AddNameProperty(ObjectPropertyList list)
|
||||
{
|
||||
base.AddNameProperty( list );
|
||||
base.AddNameProperty(list);
|
||||
|
||||
if ( IsSigned )
|
||||
list.Add( 1152273, $"{m_From}\t{m_To}"); // ~1_val~ is madly in love with ~2_val~
|
||||
if (IsSigned)
|
||||
list.Add(1152273, $"{m_From}\t{m_To}"); // ~1_val~ is madly in love with ~2_val~
|
||||
}
|
||||
|
||||
public static bool CheckSeason( Mobile from )
|
||||
public static bool CheckSeason(Mobile from)
|
||||
{
|
||||
if ( DateTime.UtcNow.Month == 2 )
|
||||
if (DateTime.UtcNow.Month == 2)
|
||||
return true;
|
||||
|
||||
from.SendLocalizedMessage( 1152318 ); // You may not use this item out of season.
|
||||
from.SendLocalizedMessage(1152318); // You may not use this item out of season.
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnSingleClick( Mobile from )
|
||||
public override void OnSingleClick(Mobile from)
|
||||
{
|
||||
base.OnSingleClick( from );
|
||||
base.OnSingleClick(from);
|
||||
|
||||
if ( IsSigned )
|
||||
LabelTo( from, 1152273, $"{m_From}\t{m_To}"); // ~1_val~ is madly in love with ~2_val~
|
||||
if (IsSigned)
|
||||
LabelTo(from, 1152273, $"{m_From}\t{m_To}"); // ~1_val~ is madly in love with ~2_val~
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if ( IsSigned || !CheckSeason( from ) )
|
||||
if (IsSigned || !CheckSeason(from))
|
||||
return;
|
||||
|
||||
if ( !IsChildOf( from.Backpack ) )
|
||||
if (!IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage( 1080063 ); // This must be in your backpack to use it.
|
||||
from.SendLocalizedMessage(1080063); // This must be in your backpack to use it.
|
||||
return;
|
||||
}
|
||||
|
||||
from.BeginTarget( 10, false, TargetFlags.None, OnTarget );
|
||||
from.SendMessage( "Who do you wish to use this on?" );
|
||||
from.BeginTarget(10, false, TargetFlags.None, OnTarget);
|
||||
from.SendMessage("Who do you wish to use this on?");
|
||||
}
|
||||
|
||||
private void OnTarget( Mobile from, object targeted )
|
||||
private void OnTarget(Mobile from, object targeted)
|
||||
{
|
||||
if ( IsSigned || !IsChildOf( from.Backpack ) )
|
||||
if (IsSigned || !IsChildOf(from.Backpack))
|
||||
return;
|
||||
|
||||
if ( targeted is Mobile m )
|
||||
if (targeted is Mobile m)
|
||||
{
|
||||
if ( !m.Alive )
|
||||
if (!m.Alive)
|
||||
{
|
||||
from.SendLocalizedMessage( 1152269 ); // That target is dead and even Cupid's arrow won't make them love you.
|
||||
from.SendLocalizedMessage(1152269); // That target is dead and even Cupid's arrow won't make them love you.
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -91,37 +91,37 @@ namespace Server.Items
|
|||
|
||||
InvalidateProperties();
|
||||
|
||||
from.SendMessage( "You inscribe the arrow." );
|
||||
from.SendMessage("You inscribe the arrow.");
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage( "That is not a person." );
|
||||
from.SendMessage("That is not a person.");
|
||||
}
|
||||
}
|
||||
|
||||
public CupidsArrow( Serial serial )
|
||||
: base( serial )
|
||||
public CupidsArrow(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer )
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize( writer );
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( 0 );
|
||||
writer.Write(0);
|
||||
|
||||
writer.Write( m_From );
|
||||
writer.Write( m_To );
|
||||
writer.Write(m_From);
|
||||
writer.Write(m_To);
|
||||
}
|
||||
|
||||
public override void Deserialize( IGenericReader reader )
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
m_From = Utility.Intern( reader.ReadString() );
|
||||
m_To = Utility.Intern( reader.ReadString() );
|
||||
m_From = Utility.Intern(reader.ReadString());
|
||||
m_To = Utility.Intern(reader.ReadString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue