Adds style cop (#109)

This commit is contained in:
Kamron Batman 2020-04-26 00:16:02 -07:00 • committed by GitHub
parent 3e715bcb60
commit 556a17aba8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1725 changed files with 33831 additions and 38046 deletions

View file

@ -22,7 +22,7 @@ namespace Server.Engines.Quests.Haven
public class UzeraanFirstTaskConversation : QuestConversation
{
private static QuestItemInfo[] m_Info =
private static readonly QuestItemInfo[] m_Info =
{
new QuestItemInfo(1023676, 0xE68) // glowing rune
};
@ -36,29 +36,29 @@ namespace Server.Engines.Quests.Haven
if (System.From.Profession == 2) // magician
return 1049386;
/* <I>Uzeraan nods at you with approval and begins to speak...</I><BR><BR>
*
* Now that you are ready, let me give you your first task.<BR><BR>
*
* As I mentioned earlier, we have been trying to fight back the wicked
* <I>Horde Minions</I> which have recently begun attacking our cities
* - but to no avail. Our need is great!<BR><BR>
*
* Your first task will be to assess the situation in the mountain pass,
* and help our troops defeat the Horde Minions there.<BR><BR>
*
* Take the road marked with glowing runes, that starts just outside of this mansion.
* Before you go into battle, it would be prudent to
* <a href="?ForceTopic27">review combat techniques</a> as well as
* <a href = "?ForceTopic29">information on healing yourself,
* using your Paladin ability 'Close Wounds'</a>.<BR><BR>
*
* To aid you in your fight, you may also wish to
* <a href = "?ForceTopic33">purchase equipment</a> from Frank the Blacksmith,
* who is standing just <a href = "?ForceTopic13">South</a> of here.<BR><BR>
*
* Good luck young Paladin!
*/
/* <I>Uzeraan nods at you with approval and begins to speak...</I><BR><BR>
*
* Now that you are ready, let me give you your first task.<BR><BR>
*
* As I mentioned earlier, we have been trying to fight back the wicked
* <I>Horde Minions</I> which have recently begun attacking our cities
* - but to no avail. Our need is great!<BR><BR>
*
* Your first task will be to assess the situation in the mountain pass,
* and help our troops defeat the Horde Minions there.<BR><BR>
*
* Take the road marked with glowing runes, that starts just outside of this mansion.
* Before you go into battle, it would be prudent to
* <a href="?ForceTopic27">review combat techniques</a> as well as
* <a href = "?ForceTopic29">information on healing yourself,
* using your Paladin ability 'Close Wounds'</a>.<BR><BR>
*
* To aid you in your fight, you may also wish to
* <a href = "?ForceTopic33">purchase equipment</a> from Frank the Blacksmith,
* who is standing just <a href = "?ForceTopic13">South</a> of here.<BR><BR>
*
* Good luck young Paladin!
*/
return 1060388;
}
}
@ -73,7 +73,7 @@ namespace Server.Engines.Quests.Haven
public class UzeraanReportConversation : QuestConversation
{
private static QuestItemInfo[] m_Info =
private static readonly QuestItemInfo[] m_Info =
{
new QuestItemInfo(1026153, 0x1822), // teleporter
new QuestItemInfo(1048032, 0xE76) // a bag
@ -126,7 +126,7 @@ namespace Server.Engines.Quests.Haven
public class SchmendrickConversation : QuestConversation
{
private static QuestItemInfo[] m_Info =
private static readonly QuestItemInfo[] m_Info =
{
new QuestItemInfo(1023637, 0xE34) // scroll
};
@ -169,7 +169,7 @@ namespace Server.Engines.Quests.Haven
public class UzeraanScrollOfPowerConversation : QuestConversation
{
private static QuestItemInfo[] m_Info =
private static readonly QuestItemInfo[] m_Info =
{
new QuestItemInfo(1048030, 0x14EB), // a Treasure Map
new QuestItemInfo(1023969, 0xF81), // Fertile Dirt
@ -198,7 +198,7 @@ namespace Server.Engines.Quests.Haven
public class UzeraanFertileDirtConversation : QuestConversation
{
private static QuestItemInfo[] m_Info =
private static readonly QuestItemInfo[] m_Info =
{
new QuestItemInfo(1023965, 0xF7D), // Daemon Blood
new QuestItemInfo(1022581, 0xA22) // lantern
@ -245,12 +245,12 @@ namespace Server.Engines.Quests.Haven
public class UzeraanDaemonBloodConversation : QuestConversation
{
private static QuestItemInfo[] m_Info =
private static readonly QuestItemInfo[] m_Info =
{
new QuestItemInfo(1017412, 0xF80) // Daemon Bone
};
private static QuestItemInfo[] m_InfoPaladin =
private static readonly QuestItemInfo[] m_InfoPaladin =
{
new QuestItemInfo(1017412, 0xF80), // Daemon Bone
new QuestItemInfo(1060577, 0x1F14) // Recall Rune

View file

@ -20,37 +20,37 @@ namespace Server.Engines.Quests.Haven
switch (direction)
{
case CannonDirection.North:
{
AddComponent(new CannonComponent(0xE8D), 0, 0, 0);
AddComponent(new CannonComponent(0xE8C), 0, 1, 0);
AddComponent(new CannonComponent(0xE8B), 0, 2, 0);
{
AddComponent(new CannonComponent(0xE8D), 0, 0, 0);
AddComponent(new CannonComponent(0xE8C), 0, 1, 0);
AddComponent(new CannonComponent(0xE8B), 0, 2, 0);
break;
}
break;
}
case CannonDirection.East:
{
AddComponent(new CannonComponent(0xE96), 0, 0, 0);
AddComponent(new CannonComponent(0xE95), -1, 0, 0);
AddComponent(new CannonComponent(0xE94), -2, 0, 0);
{
AddComponent(new CannonComponent(0xE96), 0, 0, 0);
AddComponent(new CannonComponent(0xE95), -1, 0, 0);
AddComponent(new CannonComponent(0xE94), -2, 0, 0);
break;
}
break;
}
case CannonDirection.South:
{
AddComponent(new CannonComponent(0xE91), 0, 0, 0);
AddComponent(new CannonComponent(0xE92), 0, -1, 0);
AddComponent(new CannonComponent(0xE93), 0, -2, 0);
{
AddComponent(new CannonComponent(0xE91), 0, 0, 0);
AddComponent(new CannonComponent(0xE92), 0, -1, 0);
AddComponent(new CannonComponent(0xE93), 0, -2, 0);
break;
}
break;
}
default:
{
AddComponent(new CannonComponent(0xE8E), 0, 0, 0);
AddComponent(new CannonComponent(0xE8F), 1, 0, 0);
AddComponent(new CannonComponent(0xE90), 2, 0, 0);
{
AddComponent(new CannonComponent(0xE8E), 0, 0, 0);
AddComponent(new CannonComponent(0xE8F), 1, 0, 0);
AddComponent(new CannonComponent(0xE90), 2, 0, 0);
break;
}
break;
}
}
}
@ -59,10 +59,10 @@ namespace Server.Engines.Quests.Haven
}
[CommandProperty(AccessLevel.GameMaster)]
public CannonDirection CannonDirection{ get; private set; }
public CannonDirection CannonDirection { get; private set; }
[CommandProperty(AccessLevel.GameMaster)]
public MilitiaCanoneer Canoneer{ get; set; }
public MilitiaCanoneer Canoneer { get; set; }
public override bool HandlesOnMovement => Canoneer?.Deleted == false && Canoneer.Active;
@ -97,10 +97,10 @@ namespace Server.Engines.Quests.Haven
var canFire = CannonDirection switch
{
CannonDirection.North => (m.X >= X - 7 && m.X <= X + 7 && m.Y == Y - 7 && oldLocation.Y < Y - 7),
CannonDirection.East => (m.Y >= Y - 7 && m.Y <= Y + 7 && m.X == X + 7 && oldLocation.X > X + 7),
CannonDirection.South => (m.X >= X - 7 && m.X <= X + 7 && m.Y == Y + 7 && oldLocation.Y > Y + 7),
_ => (m.Y >= Y - 7 && m.Y <= Y + 7 && m.X == X - 7 && oldLocation.X < X - 7)
CannonDirection.North => m.X >= X - 7 && m.X <= X + 7 && m.Y == Y - 7 && oldLocation.Y < Y - 7,
CannonDirection.East => m.Y >= Y - 7 && m.Y <= Y + 7 && m.X == X + 7 && oldLocation.X > X + 7,
CannonDirection.South => m.X >= X - 7 && m.X <= X + 7 && m.Y == Y + 7 && oldLocation.Y > Y + 7,
_ => m.Y >= Y - 7 && m.Y <= Y + 7 && m.X == X - 7 && oldLocation.X < X - 7
};
if (canFire && Canoneer.WillFire(this, m))

View file

@ -144,9 +144,9 @@ namespace Server.Engines.Quests.Haven
public class SBDryad : SBInfo
{
public override IShopSellInfo SellInfo{ get; } = new InternalSellInfo();
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo{ get; } = new InternalBuyInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -13,7 +13,7 @@ namespace Server.Engines.Quests.Haven
}
[CommandProperty(AccessLevel.GameMaster)]
public bool Active{ get; set; }
public bool Active { get; set; }
public override void InitBody()
{

View file

@ -211,7 +211,7 @@ namespace Server.Engines.Quests.Haven
}
else
{
player.SendLocalizedMessage(1114333); //You must be young to have this item recharged.
player.SendLocalizedMessage(1114333); // You must be young to have this item recharged.
}
return false;

View file

@ -70,7 +70,7 @@ namespace Server.Engines.Quests.Haven
public KillHordeMinionsObjective(KillHordeMinionsStep step) => Step = step;
public KillHordeMinionsStep Step{ get; private set; }
public KillHordeMinionsStep Step { get; private set; }
public override object Message
{
@ -168,24 +168,24 @@ namespace Server.Engines.Quests.Haven
switch (Step)
{
case KillHordeMinionsStep.First:
{
QuestObjective obj = new KillHordeMinionsObjective(KillHordeMinionsStep.LearnKarma);
System.AddObjective(obj);
obj.CurProgress = CurProgress;
break;
}
{
QuestObjective obj = new KillHordeMinionsObjective(KillHordeMinionsStep.LearnKarma);
System.AddObjective(obj);
obj.CurProgress = CurProgress;
break;
}
case KillHordeMinionsStep.LearnKarma:
{
QuestObjective obj = new KillHordeMinionsObjective(KillHordeMinionsStep.Others);
System.AddObjective(obj);
obj.CurProgress = CurProgress;
break;
}
{
QuestObjective obj = new KillHordeMinionsObjective(KillHordeMinionsStep.Others);
System.AddObjective(obj);
obj.CurProgress = CurProgress;
break;
}
default:
{
System.AddObjective(new FindUzeraanAboutReportObjective());
break;
}
{
System.AddObjective(new FindUzeraanAboutReportObjective());
break;
}
}
else
System.AddObjective(new FindUzeraanAboutReportObjective());
@ -338,7 +338,7 @@ namespace Server.Engines.Quests.Haven
public class GetDaemonBoneObjective : QuestObjective
{
public Container CorpseWithBone{ get; set; }
public Container CorpseWithBone { get; set; }
public override object Message
{

View file

@ -5,7 +5,7 @@ namespace Server.Engines.Quests.Haven
{
public class UzeraanTurmoilQuest : QuestSystem
{
private static Type[] m_TypeReferenceTable =
private static readonly Type[] m_TypeReferenceTable =
{
typeof(AcceptConversation),
typeof(UzeraanTitheConversation),