fix: Cleans up some comments and spell code (#1120)

This commit is contained in:
Kamron Batman 2022-07-16 19:45:41 -07:00 • committed by GitHub
parent 56c97ca84a
commit fa3515f930
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
44 changed files with 338 additions and 469 deletions

View file

@ -134,16 +134,12 @@ namespace Server.Engines.ConPVP
return false;
}
string title = null;
if (move is NinjaMove)
string title = move switch
{
title = "Bushido";
}
else if (move is SamuraiMove)
{
title = "Ninjitsu";
}
NinjaMove => "Bushido",
SamuraiMove => "Ninjitsu",
_ => null
};
if (title == null || name == null || Ruleset.GetOption(title, name))
{

View file

@ -124,11 +124,8 @@ namespace Server.Factions
if (remaining.TotalDays >= 1)
{
from.SendLocalizedMessage(
1042743,
remaining.TotalDays
.ToString("N0")
); // Your term of service will come to an end in ~1_DAYS~ days.
// Your term of service will come to an end in ~1_DAYS~ days.
from.SendLocalizedMessage(1042743, remaining.TotalDays.ToString("N0"));
}
else if (remaining.TotalHours >= 1)
{

View file

@ -1708,7 +1708,7 @@ namespace Server.Engines.MLQuests.Definitions
"acid elementals",
new QuestArea(1074806, "The Palace of Paroxysmus")
)
); // The Palace of Paroxysmus
);
Rewards.Add(ItemReward.LargeBagOfTreasure);
}
@ -1734,7 +1734,7 @@ namespace Server.Engines.MLQuests.Definitions
"plague spawns",
new QuestArea(1074806, "The Palace of Paroxysmus")
)
); // The Palace of Paroxysmus
);
Objectives.Add(
new KillObjective(
3,
@ -1742,7 +1742,7 @@ namespace Server.Engines.MLQuests.Definitions
"plague beasts",
new QuestArea(1074806, "The Palace of Paroxysmus")
)
); // The Palace of Paroxysmus
);
Objectives.Add(
new KillObjective(
1,
@ -1750,7 +1750,7 @@ namespace Server.Engines.MLQuests.Definitions
"plague beast lord",
new QuestArea(1074806, "The Palace of Paroxysmus")
)
); // The Palace of Paroxysmus
);
Rewards.Add(ItemReward.LargeBagOfTreasure);
}
@ -3072,14 +3072,9 @@ namespace Server.Engines.MLQuests.Definitions
public override void Shout(PlayerMobile pm)
{
MLQuestSystem.Tell(
this,
pm,
Utility.RandomList(
1074209, // Hey, could you help me out with something?
1074184
)
); // Come here, I have work for you.
// Hey, could you help me out with something?
// Come here, I have work for you.
MLQuestSystem.Tell(this, pm, Utility.RandomBool() ? 1074209 : 1074184);
}
public override void Serialize(IGenericWriter writer)
@ -3332,14 +3327,9 @@ namespace Server.Engines.MLQuests.Definitions
public override void Shout(PlayerMobile pm)
{
MLQuestSystem.Tell(
this,
pm,
Utility.RandomList(
1074186, // Come here, I have a task.
1074209
)
); // Hey, could you help me out with something?
// Come here, I have a task.
// Hey, could you help me out with something?
MLQuestSystem.Tell(this, pm, Utility.RandomBool() ? 1074209 : 1074186);
}
public override void Serialize(IGenericWriter writer)
@ -3588,14 +3578,9 @@ namespace Server.Engines.MLQuests.Definitions
public override void Shout(PlayerMobile pm)
{
MLQuestSystem.Tell(
this,
pm,
Utility.RandomList(
1074187, // Want a job?
1074209
)
); // Hey, could you help me out with something?
// Hey, could you help me out with something?
// Want a job?
MLQuestSystem.Tell(this, pm, Utility.RandomBool() ? 1074209 : 1074187);
}
public override void Serialize(IGenericWriter writer)
@ -3653,14 +3638,9 @@ namespace Server.Engines.MLQuests.Definitions
public override void Shout(PlayerMobile pm)
{
MLQuestSystem.Tell(
this,
pm,
Utility.RandomList(
1074187, // Want a job?
1074185
)
); // Hey you! Want to help me out?
// Hey you! Want to help me out?
// Want a job?
MLQuestSystem.Tell(this, pm, Utility.RandomBool() ? 1074185 : 1074187);
}
public override void Serialize(IGenericWriter writer)

View file

@ -27,11 +27,9 @@ namespace Server.Engines.MLQuests.Definitions
public override void GetRewards(MLQuestInstance instance)
{
instance.Player.SendLocalizedMessage(
1074940,
"",
0x2A
); // You have gained the boon of Maul! Your understanding of the seasons grows. You are one step closer to claiming your elven heritage.
// You have gained the boon of Maul! Your understanding of the seasons grows.
// You are one step closer to claiming your elven heritage.
instance.Player.SendLocalizedMessage(1074940, "", 0x2A);
instance.ClaimRewards(); // skip gump
}
}
@ -58,11 +56,9 @@ namespace Server.Engines.MLQuests.Definitions
public override void GetRewards(MLQuestInstance instance)
{
instance.Player.SendLocalizedMessage(
1074941,
"",
0x2A
); // You have gained the boon of Strongroot! You have been approved by one whose roots touch the bones of Sosaria. You are one step closer to claiming your elven heritage.
// You have gained the boon of Strongroot! You have been approved by one whose roots touch the bones of Sosaria.
// You are one step closer to claiming your elven heritage.
instance.Player.SendLocalizedMessage(1074941, "", 0x2A);
instance.ClaimRewards(); // skip gump
}
}
@ -89,11 +85,9 @@ namespace Server.Engines.MLQuests.Definitions
public override void GetRewards(MLQuestInstance instance)
{
instance.Player.SendLocalizedMessage(
1074945,
"",
0x2A
); // You have gained the boon of Enigma! You are wise enough to know how little you know. You are one step closer to claiming your elven heritage.
// You have gained the boon of Enigma! You are wise enough to know how little you know.
// You are one step closer to claiming your elven heritage.
instance.Player.SendLocalizedMessage(1074945, "", 0x2A);
instance.ClaimRewards(); // skip gump
}
@ -125,7 +119,7 @@ namespace Server.Engines.MLQuests.Definitions
Objectives.Add(
new EscortObjective(new QuestArea(1074779, "Bravehorn's drinking pool"))
); // Bravehorn's drinking pool
);
Rewards.Add(new DummyReward(1072806)); // The boon of Bravehorn.
}
@ -134,11 +128,10 @@ namespace Server.Engines.MLQuests.Definitions
public override void GetRewards(MLQuestInstance instance)
{
instance.Player.SendLocalizedMessage(
1074942,
"",
0x2A
); // You have gained the boon of Bravehorn! You have glimpsed the nobility of those that sacrifice themselves for their people. You are one step closer to claiming your elven heritage.
// You have gained the boon of Bravehorn!
// You have glimpsed the nobility of those that sacrifice themselves for their people.
// You are one step closer to claiming your elven heritage.
instance.Player.SendLocalizedMessage(1074942, "", 0x2A);
instance.ClaimRewards(); // skip gump
}
}
@ -161,7 +154,7 @@ namespace Server.Engines.MLQuests.Definitions
"timber wolves",
new QuestArea(1074833, "Huntsman's Forest")
)
); // Huntsman's Forest
);
Rewards.Add(new DummyReward(1072807)); // The boon of the Huntsman.
}
@ -170,11 +163,10 @@ namespace Server.Engines.MLQuests.Definitions
public override void GetRewards(MLQuestInstance instance)
{
instance.Player.SendLocalizedMessage(
1074943,
"",
0x2A
); // You have gained the boon of the Huntsman! You have been given a taste of the bittersweet duty of those who guard the balance. You are one step closer to claiming your elven heritage.
// You have gained the boon of the Huntsman!
// You have been given a taste of the bittersweet duty of those who guard the balance.
// You are one step closer to claiming your elven heritage.
instance.Player.SendLocalizedMessage(1074943, "", 0x2A);
instance.ClaimRewards(); // skip gump
}
}
@ -200,11 +192,10 @@ namespace Server.Engines.MLQuests.Definitions
public override void GetRewards(MLQuestInstance instance)
{
instance.Player.SendLocalizedMessage(
1074944,
"",
0x2A
); // You have gained the boon of Arielle! You have been taught the importance of laughter and light spirits. You are one step closer to claiming your elven heritage.
// You have gained the boon of Arielle!
// You have been taught the importance of laughter and light spirits.
// You are one step closer to claiming your elven heritage.
instance.Player.SendLocalizedMessage(1074944, "", 0x2A);
instance.ClaimRewards(); // skip gump
}
}
@ -494,11 +485,10 @@ namespace Server.Engines.MLQuests.Definitions
public override void GetRewards(MLQuestInstance instance)
{
instance.Player.SendLocalizedMessage(
1074946,
"",
0x2A
); // You have demonstrated your ingenuity! Humans are jacks of all trades and know a little about a lot of things. You are one step closer to achieving humanity.
// You have demonstrated your ingenuity!
// Humans are jacks of all trades and know a little about a lot of things.
// You are one step closer to achieving humanity.
instance.Player.SendLocalizedMessage(1074946, "", 0x2A);
instance.ClaimRewards(); // skip gump
}
}
@ -534,11 +524,9 @@ namespace Server.Engines.MLQuests.Definitions
public override void GetRewards(MLQuestInstance instance)
{
instance.Player.SendLocalizedMessage(
1074948,
"",
0x2A
); // You have demonstrated your physical strength! Humans can carry vast loads without complaint. You are one step closer to achieving humanity.
// You have demonstrated your physical strength!
// Humans can carry vast loads without complaint. You are one step closer to achieving humanity.
instance.Player.SendLocalizedMessage(1074948, "", 0x2A);
instance.ClaimRewards(); // skip gump
}
}
@ -559,11 +547,8 @@ namespace Server.Engines.MLQuests.Definitions
public static void AwardTo(PlayerMobile pm)
{
MLQuestSystem.GetOrCreateContext(pm).SetDoneQuest(MLQuestSystem.FindQuest(typeof(HumanInNeed)));
pm.SendLocalizedMessage(
1074949,
"",
0x2A
); // You have demonstrated your compassion! Your kind actions have been noted.
// You have demonstrated your compassion! Your kind actions have been noted.
pm.SendLocalizedMessage(1074949, "", 0x2A);
}
}
@ -586,7 +571,7 @@ namespace Server.Engines.MLQuests.Definitions
"efreets",
new QuestArea(1074808, "Fire")
)
); // Fire
);
Objectives.Add(
new KillObjective(
5,
@ -594,7 +579,7 @@ namespace Server.Engines.MLQuests.Definitions
"ice fiends",
new QuestArea(1074809, "Ice")
)
); // Ice
);
Rewards.Add(new DummyReward(1074875)); // Another step closer to becoming human.
}
@ -603,11 +588,10 @@ namespace Server.Engines.MLQuests.Definitions
public override void GetRewards(MLQuestInstance instance)
{
instance.Player.SendLocalizedMessage(
1074947,
"",
0x2A
); // You have demonstrated your toughness! Humans are able to endure unimaginable hardships in pursuit of their goals. You are one step closer to achieving humanity.
// You have demonstrated your toughness!
// Humans are able to endure unimaginable hardships in pursuit of their goals.
// You are one step closer to achieving humanity.
instance.Player.SendLocalizedMessage(1074947, "", 0x2A);
instance.ClaimRewards(); // skip gump
}
}

View file

@ -25,7 +25,7 @@ namespace Server.Engines.MLQuests.Definitions
// OSI sends this instead, but it doesn't make sense for an escortable
// public override void OnComplete( MLQuestInstance instance )
// {
// instance.Player.SendLocalizedMessage( 1073775, "", 0x23 ); // Your quest is complete. Return for your reward.
// instance.Player.SendLocalizedMessage( 1073775, "", 0x23 ); // Your quest is complete. Return for your reward.
// }
}

View file

@ -988,11 +988,8 @@ namespace Server.Engines.MLQuests.Definitions
public override void Shout(PlayerMobile pm)
{
MLQuestSystem.Tell(
this,
pm,
1078187
); // The art of fencing requires a dexterous hand, a quick wit and fleet feet.
// The art of fencing requires a dexterous hand, a quick wit and fleet feet.
MLQuestSystem.Tell(this, pm, 1078187);
}
public override void Serialize(IGenericWriter writer)
@ -1053,11 +1050,8 @@ namespace Server.Engines.MLQuests.Definitions
public override void Shout(PlayerMobile pm)
{
MLQuestSystem.Tell(
this,
pm,
1078136
); // There is an art to slaying your enemies swiftly. It's called tactics, and I can teach it to you.
// There is an art to slaying your enemies swiftly. It's called tactics, and I can teach it to you.
MLQuestSystem.Tell(this, pm, 1078136);
}
public override void Serialize(IGenericWriter writer)

View file

@ -360,7 +360,7 @@ namespace Server.Engines.MLQuests.Definitions
"orcs",
new QuestArea(1074807, "Sanctuary")
)
); // Sanctuary
);
Objectives.Add(
new KillObjective(
5,
@ -368,7 +368,7 @@ namespace Server.Engines.MLQuests.Definitions
"orc bombers",
new QuestArea(1074807, "Sanctuary")
)
); // Sanctuary
);
Objectives.Add(
new KillObjective(
3,
@ -376,7 +376,7 @@ namespace Server.Engines.MLQuests.Definitions
"orc brutes",
new QuestArea(1074807, "Sanctuary")
)
); // Sanctuary
);
Rewards.Add(ItemReward.BagOfTreasure);
}
@ -437,7 +437,7 @@ namespace Server.Engines.MLQuests.Definitions
"Moug-Guur",
new QuestArea(1074807, "Sanctuary")
)
); // Sanctuary
);
Rewards.Add(ItemReward.BagOfTreasure);
}
@ -466,7 +466,7 @@ namespace Server.Engines.MLQuests.Definitions
"Chiikkaha",
new QuestArea(1074807, "Sanctuary")
)
); // Sanctuary
);
Rewards.Add(ItemReward.BagOfTreasure);
}
@ -496,7 +496,7 @@ namespace Server.Engines.MLQuests.Definitions
"Szavetra",
new QuestArea(1074807, "Sanctuary")
)
); // Sanctuary
);
Rewards.Add(ItemReward.Strongbox);
}
@ -603,7 +603,7 @@ namespace Server.Engines.MLQuests.Definitions
"ogres",
new QuestArea(1074807, "Sanctuary")
)
); // Sanctuary
);
Rewards.Add(ItemReward.BagOfTreasure);
}
@ -630,7 +630,7 @@ namespace Server.Engines.MLQuests.Definitions
"ogre lords",
new QuestArea(1074807, "Sanctuary")
)
); // Sanctuary
);
Rewards.Add(ItemReward.LargeBagOfTreasure);
}
@ -657,7 +657,7 @@ namespace Server.Engines.MLQuests.Definitions
"cyclops",
new QuestArea(1074807, "Sanctuary")
)
); // Sanctuary
);
Rewards.Add(ItemReward.LargeBagOfTreasure);
}
@ -686,7 +686,7 @@ namespace Server.Engines.MLQuests.Definitions
"titans",
new QuestArea(1074807, "Sanctuary")
)
); // Sanctuary
);
Rewards.Add(ItemReward.LargeBagOfTreasure);
}
@ -713,7 +713,7 @@ namespace Server.Engines.MLQuests.Definitions
"gargoyles",
new QuestArea(1074807, "Sanctuary")
)
); // Sanctuary
);
Rewards.Add(ItemReward.BagOfTrinkets);
}

View file

@ -230,7 +230,7 @@ namespace Server.Engines.MLQuests.Definitions
"rats",
new QuestArea(1074807, "Sanctuary")
)
); // Sanctuary
);
Rewards.Add(new DummyReward(1074872)); // The opportunity to learn the ways of the Arcanist.
}
@ -398,11 +398,8 @@ namespace Server.Engines.MLQuests.Definitions
public override void GetRewards(MLQuestInstance instance)
{
instance.PlayerContext.SummonFey = true;
instance.Player.SendLocalizedMessage(
1074320,
"",
0x2A
); // *giggle* Mean reapers got fixed! Pixie friend now! *giggle* When mean thingies bother you, a brave pixie will help.
// *giggle* Mean reapers got fixed! Pixie friend now! *giggle* When mean thingies bother you, a brave pixie will help.
instance.Player.SendLocalizedMessage(1074320, "", 0x2A);
base.GetRewards(instance);
}
@ -423,11 +420,9 @@ namespace Server.Engines.MLQuests.Definitions
Objectives.Add(new KillObjective(50, new[] { typeof(Imp) }, "imps"));
Rewards.Add(
new DummyReward(
1074873
)
); // The opportunity to prove yourself worthy of learning to Summon Fiends. (Sufficient spellweaving skill is required to cast the spell)
// The opportunity to prove yourself worthy of learning to Summon Fiends.
// (Sufficient spellweaving skill is required to cast the spell)
Rewards.Add(new DummyReward(107487));
}
public override Type NextQuest => typeof(CrackingTheWhipI);
@ -479,11 +474,9 @@ namespace Server.Engines.MLQuests.Definitions
public override void GetRewards(MLQuestInstance instance)
{
instance.PlayerContext.SummonFiend = true;
instance.Player.SendLocalizedMessage(
1074322,
"",
0x2A
); // You've demonstrated your strength, got a means of control, and taught the imps to fear you. You're ready now to summon them.
// You've demonstrated your strength, got a means of control, and taught the imps to fear you.
// You're ready now to summon them.
instance.Player.SendLocalizedMessage(1074322, "", 0x2A);
base.GetRewards(instance);
}

View file

@ -145,15 +145,17 @@ namespace Server.Engines.MLQuests.Gumps
140,
312,
16,
quest.IsChainTriggered || quest.NextQuest != null ? 1075024 : 1072202,
quest.IsChainTriggered || quest.NextQuest != null ? 1075024 : 1072202, // Description [(quest chain)]
0x2710
); // Description [(quest chain)]
);
TextDefinition.AddHtmlText(this, 98, 156, 312, 240, quest.Description, false, true, 0x15F90, 0xBDE784);
}
public void AddObjectives(MLQuest quest)
{
AddHtmlLocalized(98, 140, 312, 16, 1049073, 0x2710); // Objective:
// All of the following / Only one of the following
AddHtmlLocalized(
98,
156,
@ -161,7 +163,7 @@ namespace Server.Engines.MLQuests.Gumps
16,
quest.ObjectiveType == ObjectiveType.All ? 1072208 : 1072209,
0x2710
); // All of the following / Only one of the following
);
var y = 172;
@ -186,6 +188,7 @@ namespace Server.Engines.MLQuests.Gumps
var quest = instance.Quest;
AddHtmlLocalized(98, 140, 312, 16, 1049073, 0x2710); // Objective:
// All of the following / Only one of the following
AddHtmlLocalized(
98,
156,
@ -193,7 +196,7 @@ namespace Server.Engines.MLQuests.Gumps
16,
quest.ObjectiveType == ObjectiveType.All ? 1072208 : 1072209,
0x2710
); // All of the following / Only one of the following
);
var y = 172;

View file

@ -153,11 +153,9 @@ namespace Server.Engines.MLQuests
{
if (message)
{
MLQuestSystem.Tell(
quester,
pm,
1075575
); // I'm sorry, but I don't have anything else for you right now. Could you check back with me in a few minutes?
// I'm sorry, but I don't have anything else for you right now.
// Could you check back with me in a few minutes?
MLQuestSystem.Tell(quester, pm, 1075575);
}
return false;

View file

@ -386,9 +386,8 @@ namespace Server.Engines.MLQuests
rewardItem.Delete();
}
Player.SendLocalizedMessage(
1078524
); // Your backpack is full. You cannot complete the quest and receive your reward.
// Your backpack is full. You cannot complete the quest and receive your reward.
Player.SendLocalizedMessage(1078524);
return;
}
@ -398,10 +397,8 @@ namespace Server.Engines.MLQuests
if (rewardItem.Stackable)
{
Player.SendLocalizedMessage(
1115917,
$"{rewardItem.Amount}\t{rewardName}"
); // You receive a reward: ~1_QUANTITY~ ~2_ITEM~
// You receive a reward: ~1_QUANTITY~ ~2_ITEM~
Player.SendLocalizedMessage(1115917, $"{rewardItem.Amount}\t{rewardName}");
}
else
{

View file

@ -47,16 +47,12 @@ namespace Server.Engines.MLQuests.Objectives
if (minutes == 1)
{
MLQuestSystem.Tell(quester, pm, "You must rest 1 minute before we set out on this journey.");
MLQuestSystem.Tell(quester, pm, 1042722);
}
else
{
MLQuestSystem.Tell(
quester,
pm,
1071195,
minutes.ToString()
); // You must rest ~1_minsleft~ minutes before we set out on this journey.
// You must rest ~1_minsleft~ minutes before we set out on this journey.
MLQuestSystem.Tell(quester, pm, 1071195, minutes.ToString());
}
}
@ -141,10 +137,8 @@ namespace Server.Engines.MLQuests.Objectives
}
else if (m_Objective.Destination.Contains(m_Escort))
{
m_Escort.Say(
1042809,
pm.Name
); // We have arrived! I thank thee, ~1_PLAYER_NAME~! I have no further need of thy services. Here is thy pay.
// We have arrived! I thank thee, ~1_PLAYER_NAME~! I have no further need of thy services. Here is thy pay.
m_Escort.Say(1042809, pm.Name);
if (pm.Young || m_Escort.Region.IsPartOf("Haven Island"))
{
@ -251,7 +245,7 @@ namespace Server.Engines.MLQuests.Objectives
}
// Note: this sound is sent twice on OSI (once here and once in Cancel())
// m_Player.SendSound( 0x5B3 ); // private sound
// m_Player.SendSound(0x5B3); // private sound
pm.SendLocalizedMessage(1071194); // You have failed your escort quest...
if (!instance.Removed)

View file

@ -108,10 +108,8 @@ namespace Server.Engines.MLQuests.Objectives
}
else
{
pm.SendLocalizedMessage(
1075051,
(desired - Slain).ToString()
); // You have killed a quest creature. ~1_val~ more left.
// You have killed a quest creature. ~1_val~ more left.
pm.SendLocalizedMessage(1075051, (desired - Slain).ToString());
}
return true;

View file

@ -106,9 +106,8 @@ namespace Server.Engines.PartySystem
}
else
{
from.SendLocalizedMessage(
1005448
); // You have chosen to prevent your party from looting your corpse.
// You have chosen to prevent your party from looting your corpse.
from.SendLocalizedMessage(1005448);
}
}
}

View file

@ -21,9 +21,8 @@ namespace Server.Engines.PartySystem
if (from == m)
{
from.SendLocalizedMessage(
1005446
); // You may only remove yourself from a party if you are not the leader.
// You may only remove yourself from a party if you are not the leader.
from.SendLocalizedMessage(1005446);
}
else
{

View file

@ -336,10 +336,9 @@ namespace Server.Engines.Plants
if (bev == null)
{
from.Target = new PlantPourTarget(m_Plant);
from.SendLocalizedMessage(
1060808,
$"#{m_Plant.GetLocalizedPlantStatus()}"
); // Target the container you wish to use to water the ~1_val~.
// Target the container you wish to use to water the ~1_val~.
from.SendLocalizedMessage(1060808, $"#{m_Plant.GetLocalizedPlantStatus()}");
}
else
{
@ -406,10 +405,9 @@ namespace Server.Engines.Plants
from.SendLocalizedMessage(1061884); // You don't have any strong potions of that type in your pack.
from.Target = new PlantPourTarget(m_Plant);
from.SendLocalizedMessage(
1060808,
$"#{m_Plant.GetLocalizedPlantStatus()}"
); // Target the container you wish to use to water the ~1_val~.
// Target the container you wish to use to water the ~1_val~.
from.SendLocalizedMessage(1060808, $"#{m_Plant.GetLocalizedPlantStatus()}");
return;
}

View file

@ -33,11 +33,8 @@ namespace Server.Items
if (!from.CanBeginAction<GreenThorns>())
{
from.LocalOverheadMessage(
MessageType.Regular,
0x3B2,
1061908
); // * You must wait a while before planting another thorn. *
// * You must wait a while before planting another thorn. *
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1061908);
return;
}
@ -80,11 +77,8 @@ namespace Server.Items
if (!from.CanBeginAction<GreenThorns>())
{
from.LocalOverheadMessage(
MessageType.Regular,
0x3B2,
1061908
); // * You must wait a while before planting another thorn. *
// * You must wait a while before planting another thorn. *
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1061908);
return;
}
@ -101,11 +95,8 @@ namespace Server.Items
if (targeted is not LandTarget land)
{
from.LocalOverheadMessage(
MessageType.Regular,
0x3B2,
1061912
); // * You cannot plant a green thorn there! *
// * You cannot plant a green thorn there! *
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1061912);
}
else
{
@ -113,27 +104,18 @@ namespace Server.Items
if (effect == null)
{
from.LocalOverheadMessage(
MessageType.Regular,
0x3B2,
1061913
); // * You sense it would be useless to plant a green thorn there. *
// * You sense it would be useless to plant a green thorn there. *
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1061913);
}
else
{
m_Thorn.Consume();
from.LocalOverheadMessage(
MessageType.Emote,
0x961,
1061914
); // * You push the strange green thorn into the ground *
from.NonlocalOverheadMessage(
MessageType.Emote,
0x961,
1061915,
from.Name
); // * ~1_PLAYER_NAME~ pushes a strange green thorn into the ground. *
// * You push the strange green thorn into the ground *
from.LocalOverheadMessage(MessageType.Emote, 0x961, 1061914);
// * ~1_PLAYER_NAME~ pushes a strange green thorn into the ground. *
from.NonlocalOverheadMessage(MessageType.Emote, 0x961, 1061915, from.Name);
from.BeginAction<GreenThorns>();
new EndActionTimer(from).Start();

View file

@ -142,11 +142,8 @@ namespace Server.Engines.Plants
}
else if (dirt.Amount < _dirtNeeded)
{
from.LocalOverheadMessage(
MessageType.Regular,
0x3B2,
1061896
); // You need more dirt to fill a plant bowl!
// You need more dirt to fill a plant bowl!
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1061896);
}
else
{
@ -157,21 +154,15 @@ namespace Server.Engines.Plants
dirt.Consume(_dirtNeeded);
m_PlantBowl.Delete();
from.LocalOverheadMessage(
MessageType.Regular,
0x3B2,
1061895
); // You fill the bowl with fresh dirt.
// You fill the bowl with fresh dirt.
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1061895);
}
else
{
fullBowl.Delete();
from.LocalOverheadMessage(
MessageType.Regular,
0x3B2,
1061894
); // There is no room in your backpack for a bowl full of dirt!
// There is no room in your backpack for a bowl full of dirt!
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1061894);
}
}
}
@ -189,20 +180,14 @@ namespace Server.Engines.Plants
{
fullBowl.Delete();
from.LocalOverheadMessage(
MessageType.Regular,
0x3B2,
1061894
); // There is no room in your backpack for a bowl full of dirt!
// There is no room in your backpack for a bowl full of dirt!
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1061894);
}
}
else
{
from.LocalOverheadMessage(
MessageType.Regular,
0x3B2,
1061893
); // You'll want to gather fresh dirt in order to raise a healthy plant!
// You'll want to gather fresh dirt in order to raise a healthy plant!
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1061893);
}
}

View file

@ -475,10 +475,8 @@ namespace Server.Engines.Plants
}
else if (m_PlantStatus != PlantStatus.BowlOfDirt)
{
from.SendLocalizedMessage(
1080389,
$"#{GetLocalizedPlantStatus()}"
); // This bowl of dirt already has a ~1_val~ in it!
// This bowl of dirt already has a ~1_val~ in it!
from.SendLocalizedMessage(1080389, $"#{GetLocalizedPlantStatus()}");
}
else if (PlantSystem.Water < 2)
{

View file

@ -15,10 +15,8 @@ namespace Server.Engines.Plants
{
if (!m_Plant.IsUsableBy(from))
{
m_Plant.LabelTo(
from,
1061856
); // You must have the item in your backpack or locked down in order to use it.
// You must have the item in your backpack or locked down in order to use it.
m_Plant.LabelTo(from, 1061856);
}
else if (!m_Plant.IsCrossable)
{
@ -40,10 +38,8 @@ namespace Server.Engines.Plants
}
else if (!targ.IsUsableBy(from))
{
targ.LabelTo(
from,
1061856
); // You must have the item in your backpack or locked down in order to use it.
// You must have the item in your backpack or locked down in order to use it.
targ.LabelTo(from, 1061856);
}
else if (!targ.IsCrossable)
{

View file

@ -195,10 +195,8 @@ namespace Server.Engines.Plants
}
else if (!m_Plant.PlantSystem.PollenProducing)
{
m_Plant.LabelTo(
from,
1053051
); // You cannot gather pollen from a plant in this stage of development!
// You cannot gather pollen from a plant in this stage of development!
m_Plant.LabelTo(from, 1053051);
}
else if (m_Plant.PlantSystem.Health < PlantHealth.Healthy)
{
@ -248,10 +246,8 @@ namespace Server.Engines.Plants
else
{
resource.Delete();
m_Plant.LabelTo(
from,
1053058
); // You attempt to gather as many resources as you can hold, but your backpack is full.
// You attempt to gather as many resources as you can hold, but your backpack is full.
m_Plant.LabelTo(from, 1053058);
}
}
@ -283,10 +279,8 @@ namespace Server.Engines.Plants
else
{
seed.Delete();
m_Plant.LabelTo(
from,
1053062
); // You attempt to gather as many seeds as you can hold, but your backpack is full.
// You attempt to gather as many seeds as you can hold, but your backpack is full.
m_Plant.LabelTo(from, 1053062);
}
}

View file

@ -76,10 +76,9 @@ namespace Server.Engines.Plants
case 3: // Ok
{
m_Plant.PlantStatus = PlantStatus.DecorativePlant;
m_Plant.LabelTo(
from,
1053077
); // You prune the plant. This plant will no longer produce resources or seeds, but will require no upkeep.
// You prune the plant.
// This plant will no longer produce resources or seeds, but will require no upkeep.
m_Plant.LabelTo(from, 1053077);
break;
}

View file

@ -151,7 +151,7 @@ namespace Server.Misc
pm.ToTTotalMonsterFame += (int)(bc.Fame * (1 + Math.Sqrt(pm.Luck) / 100));
// This is the Exponential regression with only 2 data points.
// This is the Exponential regression with only 2 datapoints.
// A log. func would also work, but it didn't make as much sense.
// This function isn't OSI exact being that I don't know OSI's func they used ;p
var x = pm.ToTTotalMonsterFame;
@ -263,9 +263,7 @@ namespace Server.Mobiles
{
if (m.Alive && m is PlayerMobile pm)
{
var range = 3;
if (pm.Alive && (Z - pm.Z).Abs() < 16 && InRange(m, range) && !InRange(oldLocation, range))
if (pm.Alive && (Z - pm.Z).Abs() < 16 && InRange(m, 3) && !InRange(oldLocation, 3))
{
if (pm.ToTItemsTurnedIn >= TreasuresOfTokuno.ItemsPerReward)
{
@ -327,9 +325,8 @@ namespace Server.Gumps
public ItemTileButtonInfo(Item i) : base(
i.ItemID,
i.Hue,
i.Name == null || i.Name.Length <= 0 ? i.LabelNumber : i.Name
) =>
Item = i;
i.Name is not { Length: > 0 } ? i.LabelNumber : i.Name
) => Item = i;
public Item Item { get; set; }
}
@ -619,7 +616,7 @@ namespace Server.Gumps
// Bring me 10 of the lost treasures of Tokuno and I will reward you with a valuable item.
m_Collector.SayTo(pm, 1071013);
}
// This and above case should ALWAYS be FALSE with this gump, jsut a sanity check
// This and above case should ALWAYS be FALSE with this gump, just a sanity check
else if (pm.ToTItemsTurnedIn < TreasuresOfTokuno.ItemsPerReward)
{
m_Collector.SayTo(