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

@ -20,10 +20,12 @@ namespace Server.Items
public override int LabelNumber => 1094934; // Scroll of Transcendence
/* Using a Scroll of Transcendence for a given skill will permanently increase your current
* level in that skill by the amount of points displayed on the scroll.
* As you may not gain skills beyond your maximum skill cap, any excess points will be lost.
*/
public override int Message =>
1094933; /*Using a Scroll of Transcendence for a given skill will permanently increase your current
*level in that skill by the amount of points displayed on the scroll.
*As you may not gain skills beyond your maximum skill cap, any excess points will be lost.*/
1094933;
public override string DefaultTitle =>
$"<basefont color=#FFFFFF>Scroll of Transcendence ({Value} Skill):</basefont>";
@ -50,20 +52,17 @@ namespace Server.Items
if (!(base.CanUse(from) && from is PlayerMobile pm))
return false;
#region Mondain's Legacy
MLQuestContext context = MLQuestSystem.GetContext(pm);
if (context != null)
foreach (MLQuestInstance instance in context.QuestInstances)
foreach (BaseObjectiveInstance objective in instance.Objectives)
if (!objective.Expired && objective is GainSkillObjectiveInstance objectiveInstance &&
objectiveInstance.Handles(Skill))
{
from.SendMessage("You are already under the effect of an enhanced skillgain quest.");
return false;
}
#endregion
foreach (BaseObjectiveInstance objective in instance.Objectives)
if (!objective.Expired && objective is GainSkillObjectiveInstance objectiveInstance &&
objectiveInstance.Handles(Skill))
{
from.SendMessage("You are already under the effect of an enhanced skillgain quest.");
return false;
}
if (pm.AcceleratedStart > DateTime.UtcNow)
{
@ -111,9 +110,11 @@ namespace Server.Items
if (!canGain)
{
/* You cannot increase this skill at this time. The skill may be locked or set to lower in your skill menu.
* If you are at your total skill cap, you must use a Powerscroll to increase your current skill cap.
*/
from.SendLocalizedMessage(
1094935); /*You cannot increase this skill at this time. The skill may be locked or set to lower in your skill menu.
*If you are at your total skill cap, you must use a Powerscroll to increase your current skill cap.*/
1094935);
return;
}
@ -140,7 +141,7 @@ namespace Server.Items
{
base.Deserialize(reader);
int version = InheritsItem ? 0 : reader.ReadInt(); //Required for SpecialScroll insertion
int version = InheritsItem ? 0 : reader.ReadInt(); // Required for SpecialScroll insertion
LootType = LootType.Cursed;
Insured = false;