Adds style cop (#109)
This commit is contained in:
parent
3e715bcb60
commit
556a17aba8
1725 changed files with 33831 additions and 38046 deletions
|
|
@ -31,13 +31,13 @@ namespace Server.Factions
|
|||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public Faction Faction{ get; set; }
|
||||
public Faction Faction { get; set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public Mobile Placer{ get; set; }
|
||||
public Mobile Placer { get; set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public DateTime TimeOfPlacement{ get; set; }
|
||||
public DateTime TimeOfPlacement { get; set; }
|
||||
|
||||
public virtual int EffectSound => 0;
|
||||
|
||||
|
|
@ -120,32 +120,32 @@ namespace Server.Factions
|
|||
switch (AllowedPlacing)
|
||||
{
|
||||
case AllowedPlacing.FactionStronghold:
|
||||
{
|
||||
StrongholdRegion region = Region.Find(p, m).GetRegion<StrongholdRegion>();
|
||||
{
|
||||
StrongholdRegion region = Region.Find(p, m).GetRegion<StrongholdRegion>();
|
||||
|
||||
if (region != null && region.Faction == Faction)
|
||||
return 0;
|
||||
if (region != null && region.Faction == Faction)
|
||||
return 0;
|
||||
|
||||
return 1010355; // This trap can only be placed in your stronghold
|
||||
}
|
||||
return 1010355; // This trap can only be placed in your stronghold
|
||||
}
|
||||
case AllowedPlacing.AnyFactionTown:
|
||||
{
|
||||
Town town = Town.FromRegion(Region.Find(p, m));
|
||||
{
|
||||
Town town = Town.FromRegion(Region.Find(p, m));
|
||||
|
||||
if (town != null)
|
||||
return 0;
|
||||
if (town != null)
|
||||
return 0;
|
||||
|
||||
return 1010356; // This trap can only be placed in a faction town
|
||||
}
|
||||
return 1010356; // This trap can only be placed in a faction town
|
||||
}
|
||||
case AllowedPlacing.ControlledFactionTown:
|
||||
{
|
||||
Town town = Town.FromRegion(Region.Find(p, m));
|
||||
{
|
||||
Town town = Town.FromRegion(Region.Find(p, m));
|
||||
|
||||
if (town != null && town.Owner == Faction)
|
||||
return 0;
|
||||
if (town != null && town.Owner == Faction)
|
||||
return 0;
|
||||
|
||||
return 1010357; // This trap can only be placed in a town your faction controls
|
||||
}
|
||||
return 1010357; // This trap can only be placed in a town your faction controls
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ namespace Server.Factions
|
|||
{
|
||||
private Faction m_Faction;
|
||||
|
||||
public BaseFactionTrapDeed(int itemID= 0x14F0) : base(itemID)
|
||||
public BaseFactionTrapDeed(int itemID = 0x14F0) : base(itemID)
|
||||
{
|
||||
Weight = 1.0;
|
||||
LootType = LootType.Blessed;
|
||||
|
|
@ -19,7 +19,7 @@ namespace Server.Factions
|
|||
{
|
||||
}
|
||||
|
||||
public abstract Type TrapType{ get; }
|
||||
public abstract Type TrapType { get; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public Faction Faction
|
||||
|
|
@ -34,8 +34,6 @@ namespace Server.Factions
|
|||
}
|
||||
}
|
||||
|
||||
#region ICraftable Members
|
||||
|
||||
public int OnCraft(int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool,
|
||||
CraftItem craftItem, int resHue)
|
||||
{
|
||||
|
|
@ -45,8 +43,6 @@ namespace Server.Factions
|
|||
return 1;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public virtual BaseFactionTrap Construct(Mobile from)
|
||||
{
|
||||
try
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace Server.Factions
|
|||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int Charges{ get; set; }
|
||||
public int Charges { get; set; }
|
||||
|
||||
public override int LabelNumber => 1041508; // a faction trap removal kit
|
||||
|
||||
|
|
@ -56,15 +56,15 @@ namespace Server.Factions
|
|||
switch (version)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
Charges = reader.ReadEncodedInt();
|
||||
break;
|
||||
}
|
||||
{
|
||||
Charges = reader.ReadEncodedInt();
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
Charges = 25;
|
||||
break;
|
||||
}
|
||||
{
|
||||
Charges = 25;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue