Cleans up comments for localization (#260)

This commit is contained in:
Kamron Batman 2020-09-20 12:48:10 -07:00 • committed by GitHub
parent fd9ec089f7
commit 13e2693b59
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
52 changed files with 751 additions and 798 deletions

View file

@ -792,30 +792,31 @@ namespace Server.Items
if (ParentsContain<BankBox>()) // Root Parent is the Mobile. Parent could be another containter. if (ParentsContain<BankBox>()) // Root Parent is the Mobile. Parent could be another containter.
{ {
list.Add( list.Add(
1073841, 1073841, // Contents: ~1_COUNT~/~2_MAXCOUNT~ items, ~3_WEIGHT~ stones
"{0}\t{1}\t{2}", "{0}\t{1}\t{2}",
TotalItems, TotalItems,
MaxItems, MaxItems,
TotalWeight TotalWeight
); // Contents: ~1_COUNT~/~2_MAXCOUNT~ items, ~3_WEIGHT~ stones );
} }
else else
{ {
list.Add( list.Add(
1072241, 1072241, // Contents: ~1_COUNT~/~2_MAXCOUNT~ items, ~3_WEIGHT~/~4_MAXWEIGHT~ stones
"{0}\t{1}\t{2}\t{3}", "{0}\t{1}\t{2}\t{3}",
TotalItems, TotalItems,
MaxItems, MaxItems,
TotalWeight, TotalWeight,
MaxWeight MaxWeight
); // Contents: ~1_COUNT~/~2_MAXCOUNT~ items, ~3_WEIGHT~/~4_MAXWEIGHT~ stones );
} }
// TODO: Where do the other clilocs come into play? 1073839 & 1073840? // TODO: Where do the other clilocs come into play? 1073839 & 1073840?
} }
else else
{ {
list.Add(1050044, "{0}\t{1}", TotalItems, TotalWeight); // ~1_COUNT~ items, ~2_WEIGHT~ stones // ~1_COUNT~ items, ~2_WEIGHT~ stones
list.Add(1050044, "{0}\t{1}", TotalItems, TotalWeight);
} }
} }
} }

View file

@ -3241,9 +3241,9 @@ namespace Server
// OSI sends 1074769, bug! // OSI sends 1074769, bug!
if (QuestItem) if (QuestItem)
{ {
from.SendLocalizedMessage( // You can only drop quest items into the top-most level of your backpack
1049343 // while you still need them for your quest.
); // You can only drop quest items into the top-most level of your backpack while you still need them for your quest. from.SendLocalizedMessage(1049343);
} }
} }

View file

@ -4297,7 +4297,7 @@ namespace Server
this, this,
criminal criminal
) )
); // new AggressorInfo( aggressor, this, criminal, true ) ); );
if (CanSee(aggressor)) if (CanSee(aggressor))
{ {
@ -4320,7 +4320,7 @@ namespace Server
this, this,
criminal criminal
) )
); // new AggressorInfo( aggressor, this, criminal, false ) ); );
if (CanSee(aggressor)) if (CanSee(aggressor))
{ {
@ -4794,7 +4794,7 @@ namespace Server
m_NetState.Sequence, m_NetState.Sequence,
this this
) )
); // new MovementAck( m_NetState.Sequence, this ) ); );
SetLocation(newLocation, false); SetLocation(newLocation, false);
SetDirection(d); SetDirection(d);
@ -8352,9 +8352,9 @@ namespace Server
if (item.QuestItem) if (item.QuestItem)
{ {
item.QuestItem = false; item.QuestItem = false;
SendLocalizedMessage(
1074769 // An item must be in your backpack (and not in a container within) to be toggled as a quest item.
); // An item must be in your backpack (and not in a container within) to be toggled as a quest item. SendLocalizedMessage(1074769);
} }
return true; return true;
@ -10494,10 +10494,7 @@ namespace Server
if (m_Mobile.InLOS(combatant)) if (m_Mobile.InLOS(combatant))
{ {
weapon.OnBeforeSwing( weapon.OnBeforeSwing(m_Mobile, combatant);
m_Mobile,
combatant
); // OnBeforeSwing for checking in regards to being hidden and whatnot
m_Mobile.RevealingAction(); m_Mobile.RevealingAction();
m_Mobile.NextCombatTime = m_Mobile.NextCombatTime =
Core.TickCount + (int)weapon.OnSwing(m_Mobile, combatant).TotalMilliseconds; Core.TickCount + (int)weapon.OnSwing(m_Mobile, combatant).TotalMilliseconds;

View file

@ -750,9 +750,9 @@ namespace Server.Accounting
m.SendLocalizedMessage(message); m.SendLocalizedMessage(message);
} }
m.SendLocalizedMessage( // You are no longer considered a young player of Ultima Online,
1019039 // and are no longer subject to the limitations and benefits of being in that caste.
); // You are no longer considered a young player of Ultima Online, and are no longer subject to the limitations and benefits of being in that caste. m.SendLocalizedMessage(1019039);
} }
} }
} }
@ -762,9 +762,8 @@ namespace Server.Accounting
{ {
if (TotalGameTime >= YoungDuration) if (TotalGameTime >= YoungDuration)
{ {
RemoveYoungStatus( // You are old enough to be considered an adult, and have outgrown your status as a young player!
1019038 RemoveYoungStatus(1019038);
); // You are old enough to be considered an adult, and have outgrown your status as a young player!
} }
} }

View file

@ -83,9 +83,9 @@ namespace Server.Gumps
250, 250,
170, 170,
20, 20,
1061027, 1061027, // Next page
(m_Page + 1) * 10 < searchResults.Length ? 0x7FFF : 0x5EF7 (m_Page + 1) * 10 < searchResults.Length ? 0x7FFF : 0x5EF7
); // Next page );
} }
public static void Initialize() public static void Initialize()

View file

@ -132,9 +132,8 @@ namespace Server.Engines.BulkOrders
{ {
if (Complete) if (Complete)
{ {
from.SendLocalizedMessage( // The maximum amount of requested items have already been combined to this deed.
1045166 from.SendLocalizedMessage(1045166);
); // The maximum amount of requested items have already been combined to this deed.
} }
else else
{ {

View file

@ -615,9 +615,10 @@ namespace Server.Engines.BulkOrders
var sizeOfDroppedBod = bobEntry is BOBLargeEntry entry ? entry.Entries.Length : 1; var sizeOfDroppedBod = bobEntry is BOBLargeEntry entry ? entry.Entries.Length : 1;
m_From.AddToBackpack(item); m_From.AddToBackpack(item);
m_From.SendLocalizedMessage(
1045152 // The bulk order deed has been placed in your backpack.
); // The bulk order deed has been placed in your backpack. m_From.SendLocalizedMessage(1045152);
m_Book.Entries.Remove(bobEntry); m_Book.Entries.Remove(bobEntry);
m_Book.InvalidateProperties(); m_Book.InvalidateProperties();

View file

@ -107,9 +107,9 @@ namespace Server.Engines.BulkOrders
m_Book.InvalidateProperties(); m_Book.InvalidateProperties();
pv.HoldGold += price; pv.HoldGold += price;
m_From.AddToBackpack(item); m_From.AddToBackpack(item);
m_From.SendLocalizedMessage(
1045152 // The bulk order deed has been placed in your backpack.
); // The bulk order deed has been placed in your backpack. m_From.SendLocalizedMessage(1045152);
if (m_Book.Entries.Count / 5 < m_Book.ItemCount) if (m_Book.Entries.Count / 5 < m_Book.ItemCount)
{ {

View file

@ -133,9 +133,8 @@ namespace Server.Engines.BulkOrders
} }
else if (AmountMax != small.AmountMax) else if (AmountMax != small.AmountMax)
{ {
from.SendLocalizedMessage( // The two orders have different requested amounts and cannot be combined.
1045163 from.SendLocalizedMessage(1045163);
); // The two orders have different requested amounts and cannot be combined.
} }
else if (small.AmountCur < small.AmountMax) else if (small.AmountCur < small.AmountMax)
{ {
@ -143,9 +142,8 @@ namespace Server.Engines.BulkOrders
} }
else if (entry.Amount >= AmountMax) else if (entry.Amount >= AmountMax)
{ {
from.SendLocalizedMessage( // The maximum amount of requested items have already been combined to this deed.
1045166 from.SendLocalizedMessage(1045166);
); // The maximum amount of requested items have already been combined to this deed.
} }
else else
{ {

View file

@ -64,20 +64,22 @@ namespace Server.Engines.BulkOrders
y, y,
350, 350,
20, 20,
GetMaterialNumberFor(deed.Material), GetMaterialNumberFor(deed.Material), // All items must be made with x material.
0x7FFF 0x7FFF
); // All items must be made with x material. );
y += 24;
} }
} }
AddHtmlLocalized(40, 192 + entries.Length * 24, 350, 20, 1045139, 0x7FFF); // Do you want to accept this order? // Do you want to accept this order?
AddHtmlLocalized(40, 192 + entries.Length * 24, 350, 20, 1045139, 0x7FFF);
// Ok
AddButton(100, 216 + entries.Length * 24, 4005, 4007, 1); AddButton(100, 216 + entries.Length * 24, 4005, 4007, 1);
AddHtmlLocalized(135, 216 + entries.Length * 24, 120, 20, 1006044, 0x7FFF); // Ok AddHtmlLocalized(135, 216 + entries.Length * 24, 120, 20, 1006044, 0x7FFF);
// CANCEL
AddButton(275, 216 + entries.Length * 24, 4005, 4007, 0); AddButton(275, 216 + entries.Length * 24, 4005, 4007, 0);
AddHtmlLocalized(310, 216 + entries.Length * 24, 120, 20, 1011012, 0x7FFF); // CANCEL AddHtmlLocalized(310, 216 + entries.Length * 24, 120, 20, 1011012, 0x7FFF);
} }
public override void OnResponse(NetState sender, RelayInfo info) public override void OnResponse(NetState sender, RelayInfo info)

View file

@ -70,20 +70,21 @@ namespace Server.Engines.BulkOrders
y, y,
300, 300,
20, 20,
GetMaterialNumberFor(deed.Material), GetMaterialNumberFor(deed.Material), // All items must be made with x material.
0x7FFF 0x7FFF
); // All items must be made with x material. );
} }
AddButton(125, 168 + entries.Length * 24, 4005, 4007, 2); AddButton(125, 168 + entries.Length * 24, 4005, 4007, 2);
AddHtmlLocalized( AddHtmlLocalized(
160, 160,
168 + entries.Length * 24, 168 + entries.Length * 24,
300, 300,
20, 20,
1045155, 1045155, // Combine this deed with another deed.
0x7FFF 0x7FFF
); // Combine this deed with another deed. );
AddButton(125, 192 + entries.Length * 24, 4005, 4007, 1); AddButton(125, 192 + entries.Length * 24, 4005, 4007, 1);
AddHtmlLocalized(160, 192 + entries.Length * 24, 120, 20, 1011441, 0x7FFF); // EXIT AddHtmlLocalized(160, 192 + entries.Length * 24, 120, 20, 1011441, 0x7FFF); // EXIT

View file

@ -77,7 +77,7 @@ namespace Server.Engines.BulkOrders
list.Add(SmallBODGump.GetMaterialNumberFor(Material)); // All items must be made with x material. list.Add(SmallBODGump.GetMaterialNumberFor(Material)); // All items must be made with x material.
} }
list.Add(1060656, AmountMax.ToString()); // amount to make: ~1_val~ list.Add(1060656, AmountMax.ToString()); // amount to make: ~1_val~
list.Add(1060658, "#{0}\t{1}", m_Number, m_AmountCur); // ~1_val~: ~2_val~ list.Add(1060658, "#{0}\t{1}", m_Number, m_AmountCur); // ~1_val~: ~2_val~
} }
@ -128,9 +128,8 @@ namespace Server.Engines.BulkOrders
if (m_AmountCur >= AmountMax) if (m_AmountCur >= AmountMax)
{ {
from.SendLocalizedMessage( // The maximum amount of requested items have already been combined to this deed.
1045166 from.SendLocalizedMessage(1045166);
); // The maximum amount of requested items have already been combined to this deed.
} }
else if (Type == null || objectType != Type && !objectType.IsSubclassOf(Type) || else if (Type == null || objectType != Type && !objectType.IsSubclassOf(Type) ||
!(item is BaseWeapon) && !(item is BaseArmor) && !(item is BaseClothing)) !(item is BaseWeapon) && !(item is BaseArmor) && !(item is BaseClothing))

View file

@ -54,9 +54,9 @@ namespace Server.Engines.BulkOrders
deed.RequireExceptional ? 192 : 168, deed.RequireExceptional ? 192 : 168,
350, 350,
20, 20,
GetMaterialNumberFor(deed.Material), GetMaterialNumberFor(deed.Material), // All items must be made with x material.
0x7FFF 0x7FFF
); // All items must be made with x material. );
} }
} }

View file

@ -57,9 +57,9 @@ namespace Server.Engines.BulkOrders
deed.RequireExceptional ? 168 : 144, deed.RequireExceptional ? 168 : 144,
300, 300,
20, 20,
GetMaterialNumberFor(deed.Material), GetMaterialNumberFor(deed.Material), // All items must be made with x material.
0x7FFF 0x7FFF
); // All items must be made with x material. );
} }
AddButton(125, 192, 4005, 4007, 2); AddButton(125, 192, 4005, 4007, 2);

View file

@ -883,14 +883,14 @@ namespace Server.Engines.CannedEvil
list.Add(1060742); // active list.Add(1060742); // active
list.Add(1060658, "Type\t{0}", m_Type); // ~1_val~: ~2_val~ list.Add(1060658, "Type\t{0}", m_Type); // ~1_val~: ~2_val~
list.Add(1060659, "Level\t{0}", Level); // ~1_val~: ~2_val~ list.Add(1060659, "Level\t{0}", Level); // ~1_val~: ~2_val~
list.Add( list.Add(
1060660, 1060660, // ~1_val~: ~2_val~
"Kills\t{0} of {1} ({2:F1}%)", "Kills\t{0} of {1} ({2:F1}%)",
m_Kills, m_Kills,
MaxKills, MaxKills,
100.0 * ((double)m_Kills / MaxKills) 100.0 * ((double)m_Kills / MaxKills)
); // ~1_val~: ~2_val~ );
// list.Add( 1060661, "Spawn Range\t{0}", m_SpawnRange ); // ~1_val~: ~2_val~
} }
else else
{ {
@ -1145,9 +1145,8 @@ namespace Server.Engines.CannedEvil
} }
else else
{ {
to.SendLocalizedMessage( // For your valor in combating the fallen beast, a special artifact has been bestowed on you.
1062317 to.SendLocalizedMessage(1062317);
); // For your valor in combating the fallen beast, a special artifact has been bestowed on you.
} }
} }
@ -1336,11 +1335,10 @@ namespace Server.Engines.CannedEvil
public override void AlterLightLevel(Mobile m, ref int global, ref int personal) public override void AlterLightLevel(Mobile m, ref int global, ref int personal)
{ {
base.AlterLightLevel(m, ref global, ref personal); base.AlterLightLevel(m, ref global, ref personal);
global = Math.Max(
global, // TODO: Verify & get exact values
1 + ChampionSpawn // OSI testing: at 2 red skulls, light = 0x3 ; 1 red = 0x3.; 3 = 8; 9 = 0xD 8 = 0xD 12 = 0x12 10 = 0xD
.Level global = Math.Max(global, 1 + ChampionSpawn.Level);
); // This is a guesstimate. TODO: Verify & get exact values // OSI testing: at 2 red skulls, light = 0x3 ; 1 red = 0x3.; 3 = 8; 9 = 0xD 8 = 0xD 12 = 0x12 10 = 0xD
} }
} }

View file

@ -51,13 +51,13 @@ namespace Server.Engines.Chat
if (value) if (value)
{ {
SendMessage( // From now on, only moderators will have speaking privileges in this conference by default.
56 SendMessage(56);
); // From now on, only moderators will have speaking privileges in this conference by default.
} }
else else
{ {
SendMessage(55); // From now on, everyone in the conference will have speaking privileges by default. // From now on, everyone in the conference will have speaking privileges by default.
SendMessage(55);
} }
} }
} }
@ -207,17 +207,13 @@ namespace Server.Engines.Chat
{ {
if (wasBanned) if (wasBanned)
{ {
user.SendMessage( // %1, a conference moderator, has banned you from the conference.
63, user.SendMessage(63, moderator.Username);
moderator.Username
); // %1, a conference moderator, has banned you from the conference.
} }
else else
{ {
user.SendMessage( // %1, a conference moderator, has kicked you out of the conference.
45, user.SendMessage(45, moderator.Username);
moderator.Username
); // %1, a conference moderator, has kicked you out of the conference.
} }
} }
@ -250,11 +246,8 @@ namespace Server.Engines.Chat
if (moderator != null) if (moderator != null)
{ {
user.SendMessage( // %1, a conference moderator, has granted you speaking privileges in this conference.
54, user.SendMessage(54, moderator.Username);
moderator
.Username
); // %1, a conference moderator, has granted you speaking privileges in this conference.
} }
SendMessage(52, user, user.Username); // %1 now has speaking privileges in this conference. SendMessage(52, user, user.Username); // %1 now has speaking privileges in this conference.
@ -275,11 +268,8 @@ namespace Server.Engines.Chat
if (moderator != null) if (moderator != null)
{ {
user.SendMessage( // %1, a conference moderator, has removed your speaking privileges for this conference.
53, user.SendMessage(53, moderator.Username);
moderator
.Username
); // %1, a conference moderator, has removed your speaking privileges for this conference.
} }
SendMessage(51, user, user.Username); // %1 no longer has speaking privileges in this conference. SendMessage(51, user, user.Username); // %1 no longer has speaking privileges in this conference.

View file

@ -98,10 +98,8 @@ namespace Server.Engines.Chat
if (target.IsIgnored(from)) if (target.IsIgnored(from))
{ {
from.SendMessage( // %1 has chosen to ignore you. None of your messages to them will get through.
35, from.SendMessage(35, target.Username);
target.Username
); // %1 has chosen to ignore you. None of your messages to them will get through.
} }
else if (target.IgnorePrivateMessage) else if (target.IgnorePrivateMessage)
{ {
@ -109,7 +107,8 @@ namespace Server.Engines.Chat
} }
else else
{ {
target.SendMessage(59, from.Mobile, from.GetColorCharacter() + from.Username, text); // [%1]: %2 // [%1]: %2
target.SendMessage(59, from.Mobile, $"{from.GetColorCharacter()}{from.Username}", text);
} }
} }
@ -148,17 +147,17 @@ namespace Server.Engines.Chat
public static void ShowCharacterName(ChatUser from, Channel channel, string param) public static void ShowCharacterName(ChatUser from, Channel channel, string param)
{ {
from.Anonymous = false; from.Anonymous = false;
from.SendMessage(
39 // You are now showing your character name to any players who inquire with the whois command.
); // You are now showing your character name to any players who inquire with the whois command. from.SendMessage(39);
} }
public static void HideCharacterName(ChatUser from, Channel channel, string param) public static void HideCharacterName(ChatUser from, Channel channel, string param)
{ {
from.Anonymous = true; from.Anonymous = true;
from.SendMessage(
40 // You are no longer showing your character name to any players who inquire with the whois command.
); // You are no longer showing your character name to any players who inquire with the whois command. from.SendMessage(40);
} }
public static void ToggleCharacterName(ChatUser from, Channel channel, string param) public static void ToggleCharacterName(ChatUser from, Channel channel, string param)

View file

@ -2069,27 +2069,15 @@ namespace Server.Engines.ConPVP
{ {
pack.DropItem(item); pack.DropItem(item);
if (item is BaseWeapon) // TODO: Use Layer instead of Type
int number = item switch
{ {
mob.SendLocalizedMessage( BaseWeapon _ => 1062001, // You can no longer wield your ~1_WEAPON~
1062001, BaseShield _ => 1062003, // You can no longer equip your ~1_SHIELD~
item.Name ?? $"#{item.LabelNumber}" _ when item is BaseArmor || item is BaseClothing => 1062002 // You can no longer wear your ~1_ARMOR~
); // You can no longer wield your ~1_WEAPON~ };
}
else if (item is BaseArmor && !(item is BaseShield)) mob.SendLocalizedMessage(number, item.Name ?? $"#{item.LabelNumber}");
{
mob.SendLocalizedMessage(
1062002,
item.Name ?? $"#{item.LabelNumber}"
); // You can no longer wear your ~1_ARMOR~
}
else
{
mob.SendLocalizedMessage(
1062003,
item.Name ?? $"#{item.LabelNumber}"
); // You can no longer equip your ~1_SHIELD~
}
} }
} }

View file

@ -76,9 +76,9 @@ namespace Server.Engines.Craft
365, 365,
150, 150,
18, 18,
1044017 + (context == null ? 0 : (int)context.MarkOption), 1044017 + (int)(context?.MarkOption ?? CraftMarkOption.MarkItem), // MARK ITEM
LabelColor LabelColor
); // MARK ITEM );
} }
// **************************************** // ****************************************
@ -640,10 +640,10 @@ namespace Server.Engines.Craft
m_From, m_From,
m_CraftSystem, m_CraftSystem,
m_Tool, m_Tool,
1044165, 1044165, // You haven't made anything yet.
m_Page m_Page
) )
); // You haven't made anything yet. );
} }
break; break;

View file

@ -100,20 +100,15 @@ namespace Server.Engines.Craft
302 + m_OtherCount++ * 20, 302 + m_OtherCount++ * 20,
310, 310,
18, 18,
1048176, 1048176, // Makes as many as possible at once
LabelColor LabelColor
); // Makes as many as possible at once );
} }
DrawItem(); DrawItem();
DrawSkill(); DrawSkill();
DrawResource(); DrawResource();
/*
if (craftItem.RequiresSE)
AddHtmlLocalized( 170, 302 + (m_OtherCount++ * 20), 310, 18, 1063363, LabelColor, false, false ); //* Requires the "Samurai Empire" expansion
* */
if (craftItem.RequiredExpansion != Expansion.None) if (craftItem.RequiredExpansion != Expansion.None)
{ {
var supportsEx = from.NetState?.SupportsExpansion(craftItem.RequiredExpansion) == true; var supportsEx = from.NetState?.SupportsExpansion(craftItem.RequiredExpansion) == true;
@ -138,9 +133,9 @@ namespace Server.Engines.Craft
302 + m_OtherCount++ * 20, 302 + m_OtherCount++ * 20,
310, 310,
18, 18,
1073620, 1073620, // You have not learned this recipe.
RedLabelColor RedLabelColor
); // You have not learned this recipe. );
} }
} }
@ -167,9 +162,9 @@ namespace Server.Engines.Craft
302 + m_OtherCount++ * 20, 302 + m_OtherCount++ * 20,
310, 310,
18, 18,
1044059, 1044059, // This item may hold its maker's mark
LabelColor LabelColor
); // This item may hold its maker's mark );
m_ShowExceptionalChance = true; m_ShowExceptionalChance = true;
} }
} }
@ -270,9 +265,9 @@ namespace Server.Engines.Craft
302 + m_OtherCount++ * 20, 302 + m_OtherCount++ * 20,
310, 310,
18, 18,
1044152, 1044152, // * The item retains the color of this material
LabelColor LabelColor
); // * The item retains the color of this material );
AddLabel(500, 219 + i * 20, LabelHue, "*"); AddLabel(500, 219 + i * 20, LabelHue, "*");
} }
@ -301,9 +296,9 @@ namespace Server.Engines.Craft
302 + m_OtherCount++ * 20, 302 + m_OtherCount++ * 20,
360, 360,
18, 18,
1044379, 1044379, // Inscribing scrolls also requires a blank scroll and mana.
LabelColor LabelColor
); // Inscribing scrolls also requires a blank scroll and mana. );
} }
} }

View file

@ -1015,9 +1015,9 @@ namespace Server.Engines.Craft
from, from,
craftSystem, craftSystem,
tool, tool,
1072847 1072847 // You must learn that recipe from a scroll.
) )
); // You must learn that recipe from a scroll. );
} }
} }
else else
@ -1028,9 +1028,9 @@ namespace Server.Engines.Craft
from, from,
craftSystem, craftSystem,
tool, tool,
1044153 1044153 // You don't have the required skills to attempt this item.
) )
); // You don't have the required skills to attempt this item. );
} }
} }
else else
@ -1041,9 +1041,9 @@ namespace Server.Engines.Craft
from, from,
craftSystem, craftSystem,
tool, tool,
RequiredExpansionMessage(RequiredExpansion) RequiredExpansionMessage(RequiredExpansion) // The {0} expansion is required to attempt this item.
) )
); // The {0} expansion is required to attempt this item. );
} }
} }
else else
@ -1052,8 +1052,7 @@ namespace Server.Engines.Craft
} }
} }
// Eventually convert to TextDefinition, but that requires that we convert all the gumps to ues it too. Not that it wouldn't be a bad idea. private TextDefinition RequiredExpansionMessage(Expansion expansion)
private object RequiredExpansionMessage(Expansion expansion)
{ {
return expansion switch return expansion switch
{ {

View file

@ -356,9 +356,8 @@ namespace Server.Engines.Craft
if (resource != CraftResource.None) if (resource != CraftResource.None)
{ {
from.Target = new InternalTarget(craftSystem, tool, res.ItemType, resource); from.Target = new InternalTarget(craftSystem, tool, res.ItemType, resource);
from.SendLocalizedMessage( // Target an item to enhance with the properties of your selected material.
1061004 from.SendLocalizedMessage(1061004);
); // Target an item to enhance with the properties of your selected material.
} }
else else
{ {
@ -367,9 +366,10 @@ namespace Server.Engines.Craft
from, from,
craftSystem, craftSystem,
tool, tool,
// You must select a special material in order to enhance an item with its properties.
1061010 1061010
) )
); // You must select a special material in order to enhance an item with its properties. );
} }
} }
} }
@ -380,9 +380,10 @@ namespace Server.Engines.Craft
from, from,
craftSystem, craftSystem,
tool, tool,
// You must select a special material in order to enhance an item with its properties.
1061010 1061010
) )
); // You must select a special material in order to enhance an item with its properties. );
} }
} }

View file

@ -239,8 +239,8 @@ namespace Server.Engines.Craft
typeof(IronIngot), typeof(IronIngot),
1044036, 1044036,
28, 28,
1044037 1044037 // Double check skill
); // Double check skill );
SetNeededExpansion(index, Expansion.SE); SetNeededExpansion(index, Expansion.SE);
index = AddCraft( index = AddCraft(

View file

@ -141,7 +141,7 @@ namespace Server.Engines.Craft
1044041, 1044041,
5, 5,
1044351 1044351
); // This is in the categor of Other during AoS );
AddSkill(index, SkillName.Tailoring, 40.0, 45.0); AddSkill(index, SkillName.Tailoring, 40.0, 45.0);
AddRes(index, typeof(Cloth), 1044286, 5, 1044287); AddRes(index, typeof(Cloth), 1044286, 5, 1044287);
} }
@ -483,7 +483,7 @@ namespace Server.Engines.Craft
1044041, 1044041,
5, 5,
1044351 1044351
); // This is in the categor of Other during AoS );
AddSkill(index, SkillName.Tailoring, 40.0, 45.0); AddSkill(index, SkillName.Tailoring, 40.0, 45.0);
AddRes(index, typeof(Cloth), 1044286, 5, 1044287); AddRes(index, typeof(Cloth), 1044286, 5, 1044287);
} }

View file

@ -192,12 +192,12 @@ namespace Server.Engines.Craft
1061677, 1061677,
1060509 + spell, 1060509 + spell,
minSkill, minSkill,
minSkill + 1.0, minSkill + 1.0, // Yes, on OSI it's only 1.0 skill diff'. Don't blame me, blame OSI.
regs[0], regs[0],
CraftItem.LabelNumber(regs[0]), CraftItem.LabelNumber(regs[0]),
1, 1,
501627 501627
); // Yes, on OSI it's only 1.0 skill diff'. Don't blame me, blame OSI. );
for (var i = 1; i < regs.Length; ++i) for (var i = 1; i < regs.Length; ++i)
{ {

View file

@ -182,9 +182,8 @@ namespace Server.Factions
{ {
if (Candidates.Count == 1) if (Candidates.Count == 1)
{ {
Faction.Broadcast( // There are no longer any valid candidates in the Faction Commander election.
1038031 Faction.Broadcast(1038031);
); // There are no longer any valid candidates in the Faction Commander election.
var winner = Candidates[0]; var winner = Candidates[0];
@ -206,9 +205,8 @@ namespace Server.Factions
} }
else if (Candidates.Count == 0) // well, I guess this'll never happen else if (Candidates.Count == 0) // well, I guess this'll never happen
{ {
Faction.Broadcast( // There are no longer any valid candidates in the Faction Commander election.
1038031 Faction.Broadcast(1038031);
); // There are no longer any valid candidates in the Faction Commander election.
Candidates.Clear(); Candidates.Clear();
State = ElectionState.Pending; State = ElectionState.Pending;

View file

@ -436,9 +436,9 @@ namespace Server.Factions
if (mob.Young) if (mob.Young)
{ {
guild.RemoveMember(mob); guild.RemoveMember(mob);
mob.SendLocalizedMessage( // You have been kicked out of your guild!
1042283 // Young players may not remain in a guild which is allied with a faction.
); // You have been kicked out of your guild! Young players may not remain in a guild which is allied with a faction. mob.SendLocalizedMessage(1042283);
} }
else if (AlreadyHasCharInFaction(mob)) else if (AlreadyHasCharInFaction(mob))
{ {
@ -453,7 +453,8 @@ namespace Server.Factions
else else
{ {
AddMember(mob); AddMember(mob);
mob.SendLocalizedMessage(1042756, true, $" {m_Definition.FriendlyName}"); // You are now joining a faction: // You are now joining a faction:
mob.SendLocalizedMessage(1042756, true, $" {m_Definition.FriendlyName}");
} }
} }
@ -506,15 +507,13 @@ namespace Server.Factions
} }
else if (pl?.IsLeaving == true) else if (pl?.IsLeaving == true)
{ {
pm.SendLocalizedMessage( // You cannot use the faction stone until you have finished quitting your current faction
1005051 pm.SendLocalizedMessage(1005051);
); // You cannot use the faction stone until you have finished quitting your current faction
} }
else if (AlreadyHasCharInFaction(pm)) else if (AlreadyHasCharInFaction(pm))
{ {
pm.SendLocalizedMessage( // You cannot join a faction because you already declared your allegiance with another character
1005059 pm.SendLocalizedMessage(1005059);
); // You cannot join a faction because you already declared your allegiance with another character
} }
else if (IsFactionBanned(mob)) else if (IsFactionBanned(mob))
{ {
@ -526,15 +525,13 @@ namespace Server.Factions
if (guild?.Leader != pm) if (guild?.Leader != pm)
{ {
pm.SendLocalizedMessage( // You cannot join a faction because you are in a guild and not the guildmaster
1005057 pm.SendLocalizedMessage(1005057);
); // You cannot join a faction because you are in a guild and not the guildmaster
} }
else if (guild.Type != GuildType.Regular) else if (guild.Type != GuildType.Regular)
{ {
pm.SendLocalizedMessage( // You cannot join a faction because your guild is an Order or Chaos type.
1042161 pm.SendLocalizedMessage(1042161);
); // You cannot join a faction because your guild is an Order or Chaos type.
} }
else if (!Guild.NewGuildSystem && guild.Enemies?.Count > 0) // CAN join w/wars in new system else if (!Guild.NewGuildSystem && guild.Enemies?.Count > 0) // CAN join w/wars in new system
{ {
@ -542,15 +539,13 @@ namespace Server.Factions
} }
else if (Guild.NewGuildSystem && guild.Alliance != null) else if (Guild.NewGuildSystem && guild.Alliance != null)
{ {
pm.SendLocalizedMessage( // Your guild cannot join a faction while in alliance with non-factioned guilds.
1080454 pm.SendLocalizedMessage(1080454);
); // Your guild cannot join a faction while in alliance with non-factioned guilds.
} }
else if (!CanHandleInflux(guild.Members.Count)) else if (!CanHandleInflux(guild.Members.Count))
{ {
pm.SendLocalizedMessage( // In the interest of faction stability, this faction declines to accept new members for now.
1018031 pm.SendLocalizedMessage(1018031);
); // In the interest of faction stability, this faction declines to accept new members for now.
} }
else else
{ {
@ -569,9 +564,8 @@ namespace Server.Factions
} }
else if (!CanHandleInflux(1)) else if (!CanHandleInflux(1))
{ {
pm.SendLocalizedMessage( // In the interest of faction stability, this faction declines to accept new members for now.
1018031 pm.SendLocalizedMessage(1018031);
); // In the interest of faction stability, this faction declines to accept new members for now.
} }
else else
{ {
@ -579,15 +573,7 @@ namespace Server.Factions
} }
} }
public bool IsCommander(Mobile mob) public bool IsCommander(Mobile mob) => mob != null && mob.AccessLevel >= AccessLevel.GameMaster || mob == Commander;
{
if (mob == null)
{
return false;
}
return mob.AccessLevel >= AccessLevel.GameMaster || mob == Commander;
}
public override string ToString() => m_Definition.FriendlyName; public override string ToString() => m_Definition.FriendlyName;
@ -1059,14 +1045,14 @@ namespace Server.Factions
else if (Sigil.ExistsOn(killer)) else if (Sigil.ExistsOn(killer))
{ {
sigil.ReturnHome(); sigil.ReturnHome();
killer?.SendLocalizedMessage( // The sigil has gone back to its home location because you already have a sigil.
1010258 killer?.SendLocalizedMessage(1010258);
); // The sigil has gone back to its home location because you already have a sigil.
} }
else if (!killerPack.TryDropItem(killer, sigil, false)) else if (!killerPack.TryDropItem(killer, sigil, false))
{ {
sigil.ReturnHome(); sigil.ReturnHome();
killer?.SendLocalizedMessage(1010259); // The sigil has gone home because your backpack is full. // The sigil has gone home because your backpack is full.
killer?.SendLocalizedMessage(1010259);
} }
} }
); );
@ -1086,10 +1072,8 @@ namespace Server.Factions
if (silver > 0) if (silver > 0)
{ {
killer?.SendLocalizedMessage( // Thou hast earned ~1_AMOUNT~ silver for vanquishing the vile creature.
1042748, killer?.SendLocalizedMessage(1042748, silver.ToString("N0"));
silver.ToString("N0")
); // Thou hast earned ~1_AMOUNT~ silver for vanquishing the vile creature.
} }
} }
@ -1179,10 +1163,8 @@ namespace Server.Factions
if (silver > 0) if (silver > 0)
{ {
killer?.SendLocalizedMessage( // You have earned ~1_SILVER_AMOUNT~ pieces for vanquishing ~2_PLAYER_NAME~!
1042736, killer?.SendLocalizedMessage(1042736, $"{silver:N0} silver\t{victim.Name}");
$"{silver:N0} silver\t{victim.Name}"
); // You have earned ~1_SILVER_AMOUNT~ pieces for vanquishing ~2_PLAYER_NAME~!
} }
} }
@ -1193,14 +1175,11 @@ namespace Server.Factions
var args = $"{award}\t{victim.Name}\t{killer?.Name}"; var args = $"{award}\t{victim.Name}\t{killer?.Name}";
killer?.SendLocalizedMessage( // Thou hast been honored with ~1_KILL_POINTS~ kill point(s) for vanquishing ~2_DEAD_PLAYER~!
1042737 + offset, killer?.SendLocalizedMessage(1042737 + offset, args);
args
); // Thou hast been honored with ~1_KILL_POINTS~ kill point(s) for vanquishing ~2_DEAD_PLAYER~! // Thou has lost ~1_KILL_POINTS~ kill point(s) to ~3_ATTACKER_NAME~ for being vanquished!
victim.SendLocalizedMessage( victim.SendLocalizedMessage(1042738 + offset, args);
1042738 + offset,
args
); // Thou has lost ~1_KILL_POINTS~ kill point(s) to ~3_ATTACKER_NAME~ for being vanquished!
var killerEPL = Player.Find(killer); var killerEPL = Player.Find(killer);
var victimEPL = Player.Find(victim); var victimEPL = Player.Find(victim);
@ -1227,9 +1206,8 @@ namespace Server.Factions
} }
else else
{ {
killer?.SendLocalizedMessage( // You have recently defeated this enemy and thus their death brings you no honor.
1042231 killer?.SendLocalizedMessage(1042231);
); // You have recently defeated this enemy and thus their death brings you no honor.
} }
} }
} }

View file

@ -18,7 +18,7 @@ namespace Server.Factions
pl.Mobile.SpeechHue, pl.Mobile.SpeechHue,
true, true,
pl.KillPoints.ToString("N0") pl.KillPoints.ToString("N0")
); // NOTE: Added 'N0' );
} }
private static void EventSink_Speech(SpeechEventArgs e) private static void EventSink_Speech(SpeechEventArgs e)
@ -133,22 +133,19 @@ namespace Server.Factions
} }
else if (remaining.TotalHours >= 1) else if (remaining.TotalHours >= 1)
{ {
from.SendLocalizedMessage( // Your term of service will come to an end in ~1_HOURS~ hours.
1042741, from.SendLocalizedMessage(1042741, remaining.TotalHours.ToString("N0"));
remaining.TotalHours
.ToString("N0")
); // Your term of service will come to an end in ~1_HOURS~ hours.
} }
else else
{ {
from.SendLocalizedMessage( // Your term of service will come to an end in less than one hour.
1042742 from.SendLocalizedMessage(1042742);
); // Your term of service will come to an end in less than one hour.
} }
} }
else if (pl != null) else if (pl != null)
{ {
from.SendLocalizedMessage(1042233); // You are not in the process of quitting the faction. // You are not in the process of quitting the faction.
from.SendLocalizedMessage(1042233);
} }
break; break;
@ -164,9 +161,8 @@ namespace Server.Factions
if (from.AccessLevel == AccessLevel.Player && !faction.FactionMessageReady) if (from.AccessLevel == AccessLevel.Player && !faction.FactionMessageReady)
{ {
from.SendLocalizedMessage( // The required time has not yet passed since the last message was sent
1010264 from.SendLocalizedMessage(1010264);
); // The required time has not yet passed since the last message was sent
} }
else else
{ {

View file

@ -213,33 +213,28 @@ namespace Server.Factions
if (remaining.TotalMinutes < 4) if (remaining.TotalMinutes < 4)
{ {
m_From.SendLocalizedMessage( // You must wait a short while before changing prices again.
1042165 m_From.SendLocalizedMessage(1042165);
); // You must wait a short while before changing prices again.
} }
else if (remaining.TotalMinutes < 10) else if (remaining.TotalMinutes < 10)
{ {
m_From.SendLocalizedMessage( // You must wait several minutes before changing prices again.
1042166 m_From.SendLocalizedMessage(1042166);
); // You must wait several minutes before changing prices again.
} }
else if (remaining.TotalHours < 1) else if (remaining.TotalHours < 1)
{ {
m_From.SendLocalizedMessage( // You must wait up to an hour before changing prices again.
1042167 m_From.SendLocalizedMessage(1042167);
); // You must wait up to an hour before changing prices again.
} }
else if (remaining.TotalHours < 4) else if (remaining.TotalHours < 4)
{ {
m_From.SendLocalizedMessage( // You must wait a few hours before changing prices again.
1042168 m_From.SendLocalizedMessage(1042168);
); // You must wait a few hours before changing prices again.
} }
else else
{ {
m_From.SendLocalizedMessage( // You must wait several hours before changing prices again.
1042169 m_From.SendLocalizedMessage(1042169);
); // You must wait several hours before changing prices again.
} }
} }
else else
@ -268,13 +263,13 @@ namespace Server.Factions
if (Town.FromRegion(m_From.Region) != m_Town) if (Town.FromRegion(m_From.Region) != m_Town)
{ {
m_From.SendLocalizedMessage(1010305); // You must be in your controlled city to buy Items // You must be in your controlled city to buy Items
m_From.SendLocalizedMessage(1010305);
} }
else if (vendorList.Vendors.Count >= vendorList.Definition.Maximum) else if (vendorList.Vendors.Count >= vendorList.Definition.Maximum)
{ {
m_From.SendLocalizedMessage( // You currently have too many of this enhancement type to place another
1010306 m_From.SendLocalizedMessage(1010306);
); // You currently have too many of this enhancement type to place another
} }
else if (BaseBoat.FindBoatAt(m_From.Location, m_From.Map) != null) else if (BaseBoat.FindBoatAt(m_From.Location, m_From.Map) != null)
{ {

View file

@ -26,14 +26,15 @@ namespace Server.Factions
15, 15,
230, 230,
60, 60,
1018057, 1018057, // Are you sure you want your entire guild to leave this faction?
true, true,
true true
); // Are you sure you want your entire guild to leave this faction? );
} }
else else
{ {
AddHtmlLocalized(20, 15, 230, 60, 1018063, true, true); // Are you sure you want to leave this faction? // Are you sure you want to leave this faction?s
AddHtmlLocalized(20, 15, 230, 60, 1018063, true, true);
} }
AddHtmlLocalized(55, 80, 75, 20, 1011011); // CONTINUE AddHtmlLocalized(55, 80, 75, 20, 1011011); // CONTINUE
@ -72,9 +73,8 @@ namespace Server.Factions
} }
else if (guild.Leader != m_From) else if (guild.Leader != m_From)
{ {
m_From.SendLocalizedMessage( // You cannot quit the faction because you are not the guild master
1005061 m_From.SendLocalizedMessage(1005061);
); // You cannot quit the faction because you are not the guild master
} }
else else
{ {
@ -91,7 +91,8 @@ namespace Server.Factions
if (TimeSpan.FromDays(3.0) == Faction.LeavePeriod) if (TimeSpan.FromDays(3.0) == Faction.LeavePeriod)
{ {
mob.SendLocalizedMessage(1005060); // Your guild will quit the faction in 3 days // Your guild will quit the faction in 3 days
mob.SendLocalizedMessage(1005060);
} }
else else
{ {

View file

@ -142,9 +142,8 @@ namespace Server.Factions
} }
else if (guardList.Guards.Count >= guardList.Definition.Maximum) else if (guardList.Guards.Count >= guardList.Definition.Maximum)
{ {
m_From.SendLocalizedMessage( // You currently have too many of this enhancement type to place another
1010306 m_From.SendLocalizedMessage(1010306);
); // You currently have too many of this enhancement type to place another
} }
else if (BaseBoat.FindBoatAt(m_From.Location, m_From.Map) != null) else if (BaseBoat.FindBoatAt(m_From.Location, m_From.Map) != null)
{ {

View file

@ -54,9 +54,8 @@ namespace Server.Factions
{ {
if (m_Town.Sheriff != null) if (m_Town.Sheriff != null)
{ {
m_From.SendLocalizedMessage( // You must fire your Sheriff before you can elect a new one
1010342 m_From.SendLocalizedMessage(1010342);
); // You must fire your Sheriff before you can elect a new one
} }
else else
{ {
@ -70,9 +69,8 @@ namespace Server.Factions
{ {
if (m_Town.Finance != null) if (m_Town.Finance != null)
{ {
m_From.SendLocalizedMessage( // You must fire your finance minister before you can elect a new one
1010345 m_From.SendLocalizedMessage(1010345);
); // You must fire your finance minister before you can elect a new one
} }
else else
{ {
@ -86,7 +84,8 @@ namespace Server.Factions
{ {
if (m_Town.Sheriff == null) if (m_Town.Sheriff == null)
{ {
m_From.SendLocalizedMessage(1010350); // You need to elect a sheriff before you can fire one // You need to elect a sheriff before you can fire one
m_From.SendLocalizedMessage(1010350);
} }
else else
{ {
@ -101,9 +100,8 @@ namespace Server.Factions
{ {
if (m_Town.Finance == null) if (m_Town.Finance == null)
{ {
m_From.SendLocalizedMessage( // You need to elect a financial minister before you can fire one
1010352 m_From.SendLocalizedMessage(1010352);
); // You need to elect a financial minister before you can fire one
} }
else else
{ {
@ -147,7 +145,8 @@ namespace Server.Factions
} }
else if (pl.Sheriff != null || pl.Finance != null) else if (pl.Sheriff != null || pl.Finance != null)
{ {
from.SendLocalizedMessage(1005245); // You must pick someone who does not already hold a city post // You must pick someone who does not already hold a city post
from.SendLocalizedMessage(1005245);
} }
else else
{ {
@ -190,7 +189,8 @@ namespace Server.Factions
} }
else if (pl.Sheriff != null || pl.Finance != null) else if (pl.Sheriff != null || pl.Finance != null)
{ {
from.SendLocalizedMessage(1005245); // You must pick someone who does not already hold a city post // You must pick someone who does not already hold a city post
from.SendLocalizedMessage(1005245);
} }
else else
{ {

View file

@ -57,9 +57,8 @@ namespace Server.Factions
if (pl?.IsLeaving == true) if (pl?.IsLeaving == true)
{ {
mobile.SendLocalizedMessage( // You cannot use the faction stone until you have finished quitting your current faction
1005051 mobile.SendLocalizedMessage(1005051);
); // You cannot use the faction stone until you have finished quitting your current faction
} }
else else
{ {

View file

@ -37,9 +37,8 @@ namespace Server
return true; return true;
} }
from.SendLocalizedMessage( // You have eaten one of these recently and eating another would provide no benefit.
1062927 from.SendLocalizedMessage(1062927);
); // You have eaten one of these recently and eating another would provide no benefit.
return false; return false;
} }

View file

@ -373,9 +373,8 @@ namespace Server.Factions
} }
else if (m_Corrupted == null || m_Corrupted != Faction.Find(from)) else if (m_Corrupted == null || m_Corrupted != Faction.Find(from))
{ {
from.SendLocalizedMessage( // Your faction did not corrupt this sigil. Take it to your stronghold.
1042244 from.SendLocalizedMessage(1042244);
); // Your faction did not corrupt this sigil. Take it to your stronghold.
} }
else else
{ {

View file

@ -101,10 +101,8 @@ namespace Server.Factions
} }
else else
{ {
Placer.SendLocalizedMessage( // You have earned ~1_SILVER_AMOUNT~ pieces for vanquishing ~2_PLAYER_NAME~!
1042736, Placer.SendLocalizedMessage(1042736, $"{silverGiven} silver\t{from.Name}");
$"{silverGiven} silver\t{from.Name}"
); // You have earned ~1_SILVER_AMOUNT~ pieces for vanquishing ~2_PLAYER_NAME~!
} }
} }

View file

@ -79,9 +79,8 @@ namespace Server.Factions
} }
else if (pl.Rank.Rank < 2) else if (pl.Rank.Rank < 2)
{ {
from.SendLocalizedMessage( // You must achieve a faction rank of at least two before riding a war horse!
1010368 from.SendLocalizedMessage(1010368);
); // You must achieve a faction rank of at least two before riding a war horse!
} }
else else
{ {

View file

@ -40,9 +40,9 @@ namespace Server.Factions
PrivateOverheadMessage( PrivateOverheadMessage(
MessageType.Regular, MessageType.Regular,
0x3B2, 0x3B2,
1042201, 1042201, // You are not in my faction, I cannot sell you a horse!
from.NetState from.NetState
); // You are not in my faction, I cannot sell you a horse! );
} }
else if (FactionGump.Exists(from)) else if (FactionGump.Exists(from))
{ {

View file

@ -40,9 +40,8 @@ namespace Server.Engines.Harvest
if (obj?.Completed == false && obj.Ingredient == Ingredient.Bones) if (obj?.Completed == false && obj.Ingredient == Ingredient.Bones)
{ {
player.SendLocalizedMessage( // You finish your grim work, finding some of the specific bones listed in the Hag's recipe.
1055037 player.SendLocalizedMessage(1055037);
); // You finish your grim work, finding some of the specific bones listed in the Hag's recipe.
obj.Complete(); obj.Complete();
return; return;

View file

@ -117,21 +117,14 @@ namespace Server.Engines.Harvest
{ {
if (Utility.RandomDouble() < 0.5) if (Utility.RandomDouble() < 0.5)
{ {
player.SendLocalizedMessage( // You pull a shellfish out of the water, and find a rainbow pearl inside of it.
1055086, player.SendLocalizedMessage(1055086, "", 0x59);
"",
0x59
); // You pull a shellfish out of the water, and find a rainbow pearl inside of it.
obj.CurProgress++; obj.CurProgress++;
} }
else else
{ {
player.SendLocalizedMessage( // You pull a shellfish out of the water, but it doesn't have a rainbow pearl.
1055087, player.SendLocalizedMessage(1055087, "", 0x2C);
"",
0x2C
); // You pull a shellfish out of the water, but it doesn't have a rainbow pearl.
} }
return true; return true;

View file

@ -161,9 +161,9 @@ namespace Server.Engines.Harvest
mobile.PrivateOverheadMessage( mobile.PrivateOverheadMessage(
MessageType.Regular, MessageType.Regular,
0x3B2, 0x3B2,
500450, 500450, // You can only skin dead creatures.
from.NetState from.NetState
); // You can only skin dead creatures. );
} }
else if (toHarvest is Item item) else if (toHarvest is Item item)
{ {

View file

@ -419,11 +419,8 @@ namespace Server.Engines.Help
{ {
if (from.Region.IsPartOf<JailRegion>()) if (from.Region.IsPartOf<JailRegion>())
{ {
from.SendLocalizedMessage( // You'll need a better jailbreak plan than that!
1114345, from.SendLocalizedMessage(1114345, "", 0x35);
"",
0x35
); // You'll need a better jailbreak plan than that!
} }
else if (from.Region.IsPartOf("Haven Island")) else if (from.Region.IsPartOf("Haven Island"))
{ {

View file

@ -20,13 +20,8 @@ namespace Server.Engines.Help
AddPage(0); AddPage(0);
AddHtmlLocalized(264, 80, 200, 24, 1062524); // Enter Description AddHtmlLocalized(264, 80, 200, 24, 1062524); // Enter Description
AddHtmlLocalized( // Please enter a brief description (up to 200 characters) of your problem:
120, AddHtmlLocalized(120, 108, 420, 48, 1062638);
108,
420,
48,
1062638
); // Please enter a brief description (up to 200 characters) of your problem:
AddBackground(100, 148, 440, 200, 3500); AddBackground(100, 148, 440, 200, 3500);
AddTextEntry(120, 168, 400, 200, 1153, 0, ""); AddTextEntry(120, 168, 400, 200, 1153, 0, "");

View file

@ -93,15 +93,10 @@ namespace Server.Engines.Help
if (m_Entry.Sender.NetState != null && index != -1) if (m_Entry.Sender.NetState != null && index != -1)
{ {
m_Entry.Sender.SendLocalizedMessage( // Thank you for paging. Queue status :
1008077, m_Entry.Sender.SendLocalizedMessage(1008077, true, (index + 1).ToString());
true, // You can reference our website at www.uo.com or contact us at support@uo.com. To cancel your page, please select the help button again and select cancel.
(index + 1).ToString() m_Entry.Sender.SendLocalizedMessage(1008084);
); // Thank you for paging. Queue status :
m_Entry.Sender
.SendLocalizedMessage(
1008084
); // You can reference our website at www.uo.com or contact us at support@uo.com. To cancel your page, please select the help button again and select cancel.
if (m_Entry.Handler != null && m_Entry.Handler.NetState == null) if (m_Entry.Handler != null && m_Entry.Handler.NetState == null)
{ {
@ -111,8 +106,6 @@ namespace Server.Engines.Help
else else
{ {
if (index != -1) if (index != -1)
// m_Entry.AddResponse(m_Entry.Sender, "[Logout]");
{ {
PageQueue.Remove(m_Entry); PageQueue.Remove(m_Entry);
} }
@ -142,9 +135,8 @@ namespace Server.Engines.Help
if (pm.DesignContext != null) if (pm.DesignContext != null)
{ {
from.SendLocalizedMessage( // You cannot request help while customizing a house or transferring a character.
500182 from.SendLocalizedMessage(500182);
); // You cannot request help while customizing a house or transferring a character.
return false; return false;
} }
@ -159,17 +151,12 @@ namespace Server.Engines.Help
public static string GetPageTypeName(PageType type) public static string GetPageTypeName(PageType type)
{ {
if (type == PageType.VerbalHarassment) return type switch
{ {
return "Verbal Harassment"; PageType.VerbalHarassment => "Verbal Harassment",
} PageType.PhysicalHarassment => "Physical Harassment",
_ => type.ToString()
if (type == PageType.PhysicalHarassment) };
{
return "Physical Harassment";
}
return type.ToString();
} }
public static void OnHandlerChanged(Mobile old, Mobile value, PageEntry entry) public static void OnHandlerChanged(Mobile old, Mobile value, PageEntry entry)

View file

@ -19,17 +19,13 @@ namespace Server.Engines.Help
AddPage(0); AddPage(0);
AddHtmlLocalized(150, 40, 360, 40, 1062610); // <CENTER><U>Ultima Online Help Response</U></CENTER> // <CENTER><U>Ultima Online Help Response</U></CENTER>
AddHtmlLocalized(150, 40, 360, 40, 1062610);
AddHtml(80, 90, 480, 290, $"{name} tells {from.Name}: {text}", true, true); AddHtml(80, 90, 480, 290, $"{name} tells {from.Name}: {text}", true, true);
AddHtmlLocalized( // Clicking the OKAY button will remove the reponse you have received.
80, AddHtmlLocalized(80, 390, 480, 40, 1062611);
390,
480,
40,
1062611
); // Clicking the OKAY button will remove the reponse you have received.
AddButton(400, 417, 2074, 2075, 1); // OKAY AddButton(400, 417, 2074, 2075, 1); // OKAY
AddButton(475, 417, 2073, 2072, 0); // CANCEL AddButton(475, 417, 2073, 2072, 0); // CANCEL

View file

@ -351,11 +351,8 @@ namespace Server.Items
case 2: case 2:
{ {
to.PlaySound(0x223); to.PlaySound(0x223);
to.LocalOverheadMessage( // Pain lances through thee from a sharp metal blade.
MessageType.Regular, to.LocalOverheadMessage(MessageType.Regular, 0x62, 1010525);
0x62,
1010525
); // Pain lances through thee from a sharp metal blade.
AOS.Damage(to, to, Utility.RandomMinMax(10, 40), 100, 0, 0, 0, 0); AOS.Damage(to, to, Utility.RandomMinMax(10, 40), 100, 0, 0, 0, 0);
@ -364,7 +361,8 @@ namespace Server.Items
default: default:
{ {
to.BoltEffect(0); to.BoltEffect(0);
to.LocalOverheadMessage(MessageType.Regular, 0xDA, 1010526); // Lightning arcs through thy body. // Lightning arcs through thy body.
to.LocalOverheadMessage(MessageType.Regular, 0xDA, 1010526);
AOS.Damage(to, to, Utility.RandomMinMax(10, 40), 0, 0, 0, 0, 100); AOS.Damage(to, to, Utility.RandomMinMax(10, 40), 0, 0, 0, 0, 100);

View file

@ -13,22 +13,24 @@ namespace Server.Engines.MLQuests.Definitions
{ {
Activated = true; Activated = true;
Title = 1075287; // A Ghost of Covetous Title = 1075287; // A Ghost of Covetous
Description = // What? Oh, you startled me! Sorry, I'm a little jumpy.
1075286; // What? Oh, you startled me! Sorry, I'm a little jumpy. My master Griswolt learned that a ghost has recently taken up residence in the Covetous dungeon. He sent me to capture it, but I . . . well, it terrified me, to be perfectly honest. If you think yourself courageous enough, I'll give you my Spirit Bottle, and you can try to capture it yourself. I'm certain my master would reward you richly for such service. // My master Griswolt learned that a ghost has recently taken up residence in the Covetous dungeon.
RefusalMessage = // He sent me to capture it, but I . . . well, it terrified me, to be perfectly honest.
1075288; // That's okay, I'm sure someone with more courage than either of us will come along eventually. // If you think yourself courageous enough, I'll give you my Spirit Bottle, and you can try to capture it yourself.
// I'm certain my master would reward you richly for such service.
Description = 1075286;
// That's okay, I'm sure someone with more courage than either of us will come along eventually.
RefusalMessage = 1075288;
InProgressMessage = 1075290; // You'll find that ghost in the mountain pass above the Covetous dungeon. InProgressMessage = 1075290; // You'll find that ghost in the mountain pass above the Covetous dungeon.
CompletionMessage = // (As you try to use the Spirit Bottle, the ghost snatches it out of your hand and smashes it on the rocks)
1075291; // (As you try to use the Spirit Bottle, the ghost snatches it out of your hand and smashes it on the rocks) Please, don't be frightened. I need your help! // Please, don't be frightened. I need your help!
CompletionMessage = 1075291;
CompletionNotice = CompletionNoticeShort; CompletionNotice = CompletionNoticeShort;
Objectives.Add(new DeliverObjective(typeof(SpiritBottle), 1, "Spirit Bottle", typeof(Frederic))); Objectives.Add(new DeliverObjective(typeof(SpiritBottle), 1, "Spirit Bottle", typeof(Frederic)));
Rewards.Add( // Return the filled Spirit Bottle to Griswolt the Master Necromancer to receive a reward.
new DummyReward( Rewards.Add(new DummyReward(1075284));
1075284
)
); // Return the filled Spirit Bottle to Griswolt the Master Necromancer to receive a reward.
} }
public override Type NextQuest => typeof(SaveHisDad); public override Type NextQuest => typeof(SaveHisDad);
@ -67,11 +69,8 @@ namespace Server.Engines.MLQuests.Definitions
) )
); );
Rewards.Add( // Hurry! You must get the silk to Leon the Alchemist quickly, or it will crumble and become useless!
new DummyReward( Rewards.Add(new DummyReward(1075339));
1075339
)
); // Hurry! You must get the silk to Leon the Alchemist quickly, or it will crumble and become useless!
} }
public override Type NextQuest => typeof(AFathersGratitude); public override Type NextQuest => typeof(AFathersGratitude);

View file

@ -149,9 +149,8 @@ namespace Server.Engines.MLQuests.Definitions
if (pm.Skills.Blacksmith.Base < 45.0) // TODO: Verify threshold if (pm.Skills.Blacksmith.Base < 45.0) // TODO: Verify threshold
{ {
pm.SendLocalizedMessage( // You observe carefully but you can't grasp the complexities of smithing a bone handled machete.
1075005 pm.SendLocalizedMessage(1075005);
); // You observe carefully but you can't grasp the complexities of smithing a bone handled machete.
} }
else else
{ {
@ -177,13 +176,8 @@ namespace Server.Engines.MLQuests.Definitions
CompletionMessage = CompletionMessage =
1074996; // I hear sloshing ... that must mean you've got my water samples. Whew, I'm so glad you braved the dangers in there ... I mean, I would have but I'm so busy out here. Here's your reward! 1074996; // I hear sloshing ... that must mean you've got my water samples. Whew, I'm so glad you braved the dangers in there ... I mean, I would have but I'm so busy out here. Here's your reward!
Objectives.Add( // On OSI the label is "#1074999"
new CollectObjective( Objectives.Add(new CollectObjective(3, typeof(SamplesOfCorruptedWater), "samples of corrupted water"));
3,
typeof(SamplesOfCorruptedWater),
"samples of corrupted water"
)
); // On OSI the label is "#1074999"
// TODO: "Return to" should say "Jamal (near Blighted Grove)" // TODO: "Return to" should say "Jamal (near Blighted Grove)"
// Maybe every quest NPC has directions as a property? // Maybe every quest NPC has directions as a property?
@ -272,9 +266,9 @@ namespace Server.Engines.MLQuests.Definitions
pm, pm,
Utility.RandomList( Utility.RandomList(
1074209, // Hey, could you help me out with something? 1074209, // Hey, could you help me out with something?
1074215 1074215 // Don’t test my patience you sniveling worm!
) )
); // Don’t test my patience you sniveling worm! );
} }
public override void Serialize(IGenericWriter writer) public override void Serialize(IGenericWriter writer)

View file

@ -12,8 +12,9 @@ namespace Server.Engines.MLQuests.Definitions
{ {
Activated = true; Activated = true;
Title = 1072244; // They're Breeding Like Rabbits Title = 1072244; // They're Breeding Like Rabbits
Description = // Aaaahhhh! They're everywhere! Aaaaahhh! Ahem. Actually, friend, how do you feel about rabbits?
1072259; // Aaaahhhh! They're everywhere! Aaaaahhh! Ahem. Actually, friend, how do you feel about rabbits? Well, we're being overrun by them. We're finding fuzzy bunnies everywhere. Aaaaahhh! // Well, we're being overrun by them. We're finding fuzzy bunnies everywhere. Aaaaahhh!
Description = 1072259;
RefusalMessage = 1072270; // Well, okay. But if you decide you are up for it after all, c'mon back and see me. RefusalMessage = 1072270; // Well, okay. But if you decide you are up for it after all, c'mon back and see me.
InProgressMessage = 1072271; // You're not quite done yet. Get back to work! InProgressMessage = 1072271; // You're not quite done yet. Get back to work!
@ -131,8 +132,11 @@ namespace Server.Engines.MLQuests.Definitions
{ {
Activated = true; Activated = true;
Title = 1072248; // They'll Eat Anything Title = 1072248; // They'll Eat Anything
Description = // Pork is the fruit of the land! You can barbeque it, boil it, bake it, sautee it.
1072262; // Pork is the fruit of the land! You can barbeque it, boil it, bake it, sautee it. There's pork kebabs, pork creole, pork gumbo, pan fried, deep fried, stir fried. There's apple pork, peppered pork, pork soup, pork salad, pork and potatoes, pork burger, pork sandwich, pork stew, pork chops, pork loins, shredded pork. So, lets get some piggies butchered! // There's pork kebabs, pork creole, pork gumbo, pan fried, deep fried, stir fried.
// There's apple pork, peppered pork, pork soup, pork salad, pork and potatoes, pork burger, pork sandwich,
// pork stew, pork chops, pork loins, shredded pork. So, lets get some piggies butchered!
Description = 1072262;
RefusalMessage = 1072270; // Well, okay. But if you decide you are up for it after all, c'mon back and see me. RefusalMessage = 1072270; // Well, okay. But if you decide you are up for it after all, c'mon back and see me.
InProgressMessage = 1072271; // You're not quite done yet. Get back to work! InProgressMessage = 1072271; // You're not quite done yet. Get back to work!
@ -148,8 +152,10 @@ namespace Server.Engines.MLQuests.Definitions
{ {
Activated = true; Activated = true;
Title = 1072251; // No Good, Fish Stealing ... Title = 1072251; // No Good, Fish Stealing ...
Description = // Mighty creatures they are, aye.
1072265; // Mighty creatures they are, aye. Fierce and strong, can't blame 'em for wanting to feed themselves an' all. Blame or no, they're eating all the fish up, so they got to go. Lend a hand? // Fierce and strong, can't blame 'em for wanting to feed themselves an' all.
// Blame or no, they're eating all the fish up, so they got to go. Lend a hand?
Description = 1072265;
RefusalMessage = 1072270; // Well, okay. But if you decide you are up for it after all, c'mon back and see me. RefusalMessage = 1072270; // Well, okay. But if you decide you are up for it after all, c'mon back and see me.
InProgressMessage = 1072271; // You're not quite done yet. Get back to work! InProgressMessage = 1072271; // You're not quite done yet. Get back to work!
@ -165,8 +171,10 @@ namespace Server.Engines.MLQuests.Definitions
{ {
Activated = true; Activated = true;
Title = 1072246; // A Hero in the Making Title = 1072246; // A Hero in the Making
Description = // Are you new around here? Well, nevermind that.
1072257; // Are you new around here? Well, nevermind that. You look ready for adventure, I can see the gleam of glory in your eyes! Nothing is more valiant, more noble, more praiseworthy than mongbat slaying. // You look ready for adventure, I can see the gleam of glory in your eyes!
// Nothing is more valiant, more noble, more praiseworthy than mongbat slaying.
Description = 1072257;
RefusalMessage = 1072270; // Well, okay. But if you decide you are up for it after all, c'mon back and see me. RefusalMessage = 1072270; // Well, okay. But if you decide you are up for it after all, c'mon back and see me.
InProgressMessage = 1072271; // You're not quite done yet. Get back to work! InProgressMessage = 1072271; // You're not quite done yet. Get back to work!
@ -182,8 +190,11 @@ namespace Server.Engines.MLQuests.Definitions
{ {
Activated = true; Activated = true;
Title = 1072247; // Bullfighting ... Sort Of Title = 1072247; // Bullfighting ... Sort Of
Description = // You there! Yes, you. Listen, I've got a little problem on my hands, but a brave,
1072254; // You there! Yes, you. Listen, I've got a little problem on my hands, but a brave, bold hero like yourself should find it a snap to solve. Bottom line -- we need some of the bulls in the area culled. You're welcome to any meat or hides, and of course, I'll give you a nice reward. // bold hero like yourself should find it a snap to solve.
// Bottom line -- we need some of the bulls in the area culled.
// You're welcome to any meat or hides, and of course, I'll give you a nice reward.
Description = 1072254;
RefusalMessage = 1072270; // Well, okay. But if you decide you are up for it after all, c'mon back and see me. RefusalMessage = 1072270; // Well, okay. But if you decide you are up for it after all, c'mon back and see me.
InProgressMessage = 1072271; // You're not quite done yet. Get back to work! InProgressMessage = 1072271; // You're not quite done yet. Get back to work!
@ -199,8 +210,10 @@ namespace Server.Engines.MLQuests.Definitions
{ {
Activated = true; Activated = true;
Title = 1072243; // A Fine Feast. Title = 1072243; // A Fine Feast.
Description = // Mmm, I do love mutton! It's slaughtering time again and my usual hirelings haven't turned up.
1072261; // Mmm, I do love mutton! It's slaughtering time again and my usual hirelings haven't turned up. I've arranged for a butcher to come by and cut everything up but the basic sheep killing part I haven't gotten worked out yet. Are you up for the task? // I've arranged for a butcher to come by and cut everything up but the basic sheep killing part
// I haven't gotten worked out yet. Are you up for the task?
Description = 1072261;
RefusalMessage = 1072270; // Well, okay. But if you decide you are up for it after all, c'mon back and see me. RefusalMessage = 1072270; // Well, okay. But if you decide you are up for it after all, c'mon back and see me.
InProgressMessage = 1072271; // You're not quite done yet. Get back to work! InProgressMessage = 1072271; // You're not quite done yet. Get back to work!
@ -216,8 +229,10 @@ namespace Server.Engines.MLQuests.Definitions
{ {
Activated = true; Activated = true;
Title = 1072250; // Forced Migration Title = 1072250; // Forced Migration
Description = // Chirp chirp ... tweet chirp. Tra la la. Bloody birds and their blasted noise.
1072264; // Chirp chirp ... tweet chirp. Tra la la. Bloody birds and their blasted noise. I've tried everything but they just won't stop that infernal clamor. Return me to blessed silence and I'll make it worth your while. // I've tried everything but they just won't stop that infernal clamor.
// Return me to blessed silence and I'll make it worth your while.
Description = 1072264;
RefusalMessage = 1072270; // Well, okay. But if you decide you are up for it after all, c'mon back and see me. RefusalMessage = 1072270; // Well, okay. But if you decide you are up for it after all, c'mon back and see me.
InProgressMessage = 1072271; // You're not quite done yet. Get back to work! InProgressMessage = 1072271; // You're not quite done yet. Get back to work!
@ -233,8 +248,10 @@ namespace Server.Engines.MLQuests.Definitions
{ {
Activated = true; Activated = true;
Title = 1072242; // Filthy Pests! Title = 1072242; // Filthy Pests!
Description = // They're everywhere I tell you! They crawl in the walls, they scurry in the bushes.
1072253; // They're everywhere I tell you! They crawl in the walls, they scurry in the bushes. Disgusting critters. Say ... I don't suppose you're up for some sewer rat killing? Sewer rats now, not any other kind of squeaker will do. // Disgusting critters. Say ... I don't suppose you're up for some sewer rat killing?
// Sewer rats now, not any other kind of squeaker will do.
Description = 1072253;
RefusalMessage = 1072270; // Well, okay. But if you decide you are up for it after all, c'mon back and see me. RefusalMessage = 1072270; // Well, okay. But if you decide you are up for it after all, c'mon back and see me.
InProgressMessage = 1072271; // You're not quite done yet. Get back to work! InProgressMessage = 1072271; // You're not quite done yet. Get back to work!
@ -250,8 +267,10 @@ namespace Server.Engines.MLQuests.Definitions
{ {
Activated = true; Activated = true;
Title = 1072983; // Dead Man Walking Title = 1072983; // Dead Man Walking
Description = // Why? I ask you why? They walk around after they're put in the ground.
1073009; // Why? I ask you why? They walk around after they're put in the ground. It's just wrong in so many ways. Put them to proper rest, I beg you. I'll find some way to pay you for the kindness. Just kill five zombies and five skeletons. // It's just wrong in so many ways. Put them to proper rest, I beg you.
// I'll find some way to pay you for the kindness. Just kill five zombies and five skeletons.
Description = 1073009;
RefusalMessage = 1072270; // Well, okay. But if you decide you are up for it after all, c'mon back and see me. RefusalMessage = 1072270; // Well, okay. But if you decide you are up for it after all, c'mon back and see me.
InProgressMessage = 1072271; // You're not quite done yet. Get back to work! InProgressMessage = 1072271; // You're not quite done yet. Get back to work!
@ -268,8 +287,10 @@ namespace Server.Engines.MLQuests.Definitions
{ {
Activated = true; Activated = true;
Title = 1072996; // King of Bears Title = 1072996; // King of Bears
Description = // A pity really. With the balance of nature awry, we have no choice but to accept the responsibility
1073030; // A pity really. With the balance of nature awry, we have no choice but to accept the responsibility of making it all right. It's all a part of the circle of life, after all. So, yes, the grizzly bears are running rampant. There are far too many in the region. Will you shoulder your obligations as a higher life form? // of making it all right. It's all a part of the circle of life, after all. So, yes, the grizzly bears are
// running rampant. There are far too many in the region. Will you shoulder your obligations as a higher life form?
Description = 1073030;
RefusalMessage = 1072270; // Well, okay. But if you decide you are up for it after all, c'mon back and see me. RefusalMessage = 1072270; // Well, okay. But if you decide you are up for it after all, c'mon back and see me.
InProgressMessage = 1072271; // You're not quite done yet. Get back to work! InProgressMessage = 1072271; // You're not quite done yet. Get back to work!
@ -285,8 +306,11 @@ namespace Server.Engines.MLQuests.Definitions
{ {
Activated = true; Activated = true;
Title = 1072999; // Specimens Title = 1072999; // Specimens
Description = // I admire them, you know. The solen have their place -- regimented, organized.
1073032; // I admire them, you know. The solen have their place -- regimented, organized. They're fascinating to watch with their constant strife between red and black. I can't help but want to stir things up from time to time. And that's where you come in. Kill either twelve red or twelve black solen workers and let's see what happens next! // They're fascinating to watch with their constant strife between red and black.
// I can't help but want to stir things up from time to time. And that's where you come in.
// Kill either twelve red or twelve black solen workers and let's see what happens next!
Description = 1073032;
RefusalMessage = 1072270; // Well, okay. But if you decide you are up for it after all, c'mon back and see me. RefusalMessage = 1072270; // Well, okay. But if you decide you are up for it after all, c'mon back and see me.
InProgressMessage = 1072271; // You're not quite done yet. Get back to work! InProgressMessage = 1072271; // You're not quite done yet. Get back to work!
@ -305,9 +329,11 @@ namespace Server.Engines.MLQuests.Definitions
{ {
Activated = true; Activated = true;
Title = 1073076; // Spirits Title = 1073076; // Spirits
Description = // It is a piteous thing when the dead continue to walk the earth.
1073566; // It is a piteous thing when the dead continue to walk the earth. Restless spirits are known to inhabit these parts, taking the lives of unwary travelers. It is about time a hero put the dead back in their graves. I'm sure such a hero would be justly rewarded. // Restless spirits are known to inhabit these parts, taking the lives of unwary travelers.
RefusalMessage = 1073580; // I hope you'll reconsider. Until then, farwell. // It is about time a hero put the dead back in their graves. I'm sure such a hero would be justly rewarded.
Description = 1073566;
RefusalMessage = 1073580; // I hope you'll reconsider. Until then, farewell.
InProgressMessage = 1073586; // The restless spirts still walk -- you must kill 15 of them. InProgressMessage = 1073586; // The restless spirts still walk -- you must kill 15 of them.
Objectives.Add( Objectives.Add(
@ -328,8 +354,10 @@ namespace Server.Engines.MLQuests.Definitions
{ {
Activated = true; Activated = true;
Title = 1073002; // Roll the Bones Title = 1073002; // Roll the Bones
Description = // Why? I ask you why? They walk around after they're put in the ground.
1073011; // Why? I ask you why? They walk around after they're put in the ground. It's just wrong in so many ways. Put them to proper rest, I beg you. I'll find some way to pay you for the kindness. Just kill eight patchwork skeletons. // It's just wrong in so many ways. Put them to proper rest, I beg you.
// I'll find some way to pay you for the kindness. Just kill eight patchwork skeletons.
Description = 1073011;
RefusalMessage = 1072270; // Well, okay. But if you decide you are up for it after all, c'mon back and see me. RefusalMessage = 1072270; // Well, okay. But if you decide you are up for it after all, c'mon back and see me.
InProgressMessage = 1072271; // You're not quite done yet. Get back to work! InProgressMessage = 1072271; // You're not quite done yet. Get back to work!
@ -345,8 +373,10 @@ namespace Server.Engines.MLQuests.Definitions
{ {
Activated = true; Activated = true;
Title = 1073008; // It's a Ghastly Job Title = 1073008; // It's a Ghastly Job
Description = // Why? I ask you why? They walk around after they're put in the ground.
1073012; // Why? I ask you why? They walk around after they're put in the ground. It's just wrong in so many ways. Put them to proper rest, I beg you. I'll find some way to pay you for the kindness. Just kill twelve ghouls. // It's just wrong in so many ways. Put them to proper rest, I beg you.
// I'll find some way to pay you for the kindness. Just kill twelve ghouls.
Description = 1073012;
RefusalMessage = 1072270; // Well, okay. But if you decide you are up for it after all, c'mon back and see me. RefusalMessage = 1072270; // Well, okay. But if you decide you are up for it after all, c'mon back and see me.
InProgressMessage = 1072271; // You're not quite done yet. Get back to work! InProgressMessage = 1072271; // You're not quite done yet. Get back to work!
@ -362,8 +392,10 @@ namespace Server.Engines.MLQuests.Definitions
{ {
Activated = true; Activated = true;
Title = 1074688; // Troglodytes! Title = 1074688; // Troglodytes!
Description = // Oh nevermind, you don't look capable of my task afterall.
1074689; // Oh nevermind, you don't look capable of my task afterall. Haha! What was I thinking - you could never handle killing troglodytes. It'd be suicide. What? I don't know, I don't want to be responsible ... well okay if you're really sure? // Haha! What was I thinking - you could never handle killing troglodytes.
// It'd be suicide. What? I don't know, I don't want to be responsible ... well okay if you're really sure?
Description = 1074689;
RefusalMessage = 1074690; // Probably the wiser course of action. RefusalMessage = 1074690; // Probably the wiser course of action.
InProgressMessage = 1074691; // You still need to kill those troglodytes, remember? InProgressMessage = 1074691; // You still need to kill those troglodytes, remember?
@ -379,9 +411,12 @@ namespace Server.Engines.MLQuests.Definitions
{ {
Activated = true; Activated = true;
Title = 1073075; // Unholy Knights Title = 1073075; // Unholy Knights
Description = // Please, hear me kind traveler. You know when a knight falls, sometimes they are cursed to roam the earth as
1073565; // Please, hear me kind traveler. You know when a knight falls, sometimes they are cursed to roam the earth as undead mockeries of their former glory? That is too grim a fate for even any knight to suffer! Please, put them out of their misery. I will offer you what payment I can if you will end the torment of these undead wretches. // undead mockeries of their former glory? That is too grim a fate for even any knight to suffer!
RefusalMessage = 1073580; // I hope you'll reconsider. Until then, farwell. // Please, put them out of their misery.
// I will offer you what payment I can if you will end the torment of these undead wretches.
Description = 1073565;
RefusalMessage = 1073580; // I hope you'll reconsider. Until then, farewell.
InProgressMessage = 1073585; // Your task is not done. Continue putting the Skeleton and Bone Knights to rest. InProgressMessage = 1073585; // Your task is not done. Continue putting the Skeleton and Bone Knights to rest.
Objectives.Add( Objectives.Add(
@ -402,11 +437,17 @@ namespace Server.Engines.MLQuests.Definitions
{ {
Activated = true; Activated = true;
Title = 1074738; // A Feather in Yer Cap Title = 1074738; // A Feather in Yer Cap
Description = // I've seen how you strut about, as if you were something special.
1074737; // I've seen how you strut about, as if you were something special. I have some news for you, you don't impress me at all. It's not enough to have a fancy hat you know. That may impress people in the big city, but not here. If you want a reputation you have to climb a mountain, slay some great beast, and then write about it. Trust me, it's a long process. The first step is doing a great feat. If I were you, I'd go pluck a feather from the harpy Saliva, that would give you a good start. // I have some news for you, you don't impress me at all. It's not enough to have a fancy hat you know.
// That may impress people in the big city, but not here. If you want a reputation you have to climb a mountain,
// slay some great beast, and then write about it. Trust me, it's a long process.
// The first step is doing a great feat. If I were you, I'd go pluck a feather from the harpy Saliva,
// that would give you a good start.
Description = 1074737;
RefusalMessage = 1074736; // The path to greatness isn't for everyone obviously. RefusalMessage = 1074736; // The path to greatness isn't for everyone obviously.
InProgressMessage = // If you're going to get anywhere in the adventuring game, you have to take some risks.
1074735; // If you're going to get anywhere in the adventuring game, you have to take some risks. A harpy, well, it's bad, but it's not a dragon. // A harpy, well, it's bad, but it's not a dragon.
InProgressMessage = 1074735;
CompletionMessage = 1074734; // The hero returns from the glorious battle and - oh, such a small feather? CompletionMessage = 1074734; // The hero returns from the glorious battle and - oh, such a small feather?
Objectives.Add(new CollectObjective(1, typeof(SalivasFeather), "Saliva's Feather")); Objectives.Add(new CollectObjective(1, typeof(SalivasFeather), "Saliva's Feather"));
@ -421,13 +462,17 @@ namespace Server.Engines.MLQuests.Definitions
{ {
Activated = true; Activated = true;
Title = 1074726; // A Tale of Tail Title = 1074726; // A Tale of Tail
Description = // I've heard of you, adventurer. Your reputation is impressive, and now I'll put it to the test.
1074727; // I've heard of you, adventurer. Your reputation is impressive, and now I'll put it to the test. This is not something I ask lightly, for this task is fraught with danger, but it is vital. Seek out the vile hydra Abscess, slay it, and return to me with it's tail. // This is not something I ask lightly, for this task is fraught with danger, but it is vital.
// Seek out the vile hydra Abscess, slay it, and return to me with it's tail.
Description = 1074727;
RefusalMessage = 1074728; // Well, the beast will still be there when you are ready I suppose. RefusalMessage = 1074728; // Well, the beast will still be there when you are ready I suppose.
InProgressMessage = // Em, I thought I had explained already. Abscess, the hydra, you know? Lots of heads but just the one tail.
1074729; // Em, I thought I had explained already. Abscess, the hydra, you know? Lots of heads but just the one tail. I need the tail. I have my reasons. Go go go. // I need the tail. I have my reasons. Go go go.
CompletionMessage = InProgressMessage = 1074729;
1074730; // Ah, the tail. You did it! You know the rumours about dried ground hydra tail powder are all true? Thank you so much! // Ah, the tail. You did it! You know the rumours about dried ground hydra tail powder are all true?\
// Thank you so much!
CompletionMessage = 1074730;
Objectives.Add(new CollectObjective(1, typeof(AbscessTail), "Abscess' Tail")); Objectives.Add(new CollectObjective(1, typeof(AbscessTail), "Abscess' Tail"));
@ -441,11 +486,13 @@ namespace Server.Engines.MLQuests.Definitions
{ {
Activated = true; Activated = true;
Title = 1074681; // A Trog and His Dog Title = 1074681; // A Trog and His Dog
Description = // I don't know if you can handle it, but I'll give you a go at it.
1074680; // I don't know if you can handle it, but I'll give you a go at it. Troglodyte chief - name of Lurg and his mangy wolf pet need killing. Do the deed and I'll reward you. // Troglodyte chief - name of Lurg and his mangy wolf pet need killing. Do the deed and I'll reward you.
Description = 1074680;
RefusalMessage = 1074655; // Perhaps I thought too highly of you. RefusalMessage = 1074655; // Perhaps I thought too highly of you.
InProgressMessage = // The trog chief and his mutt should be easy enough to find. Just kill them and report back.
1074682; // The trog chief and his mutt should be easy enough to find. Just kill them and report back. Easy enough. // Easy enough.
InProgressMessage = 1074682;
CompletionMessage = 1074683; // Not half bad. Here's your prize. CompletionMessage = 1074683; // Not half bad. Here's your prize.
Objectives.Add(new KillObjective(1, new[] { typeof(Lurg) }, "Lurg")); Objectives.Add(new KillObjective(1, new[] { typeof(Lurg) }, "Lurg"));
@ -461,8 +508,10 @@ namespace Server.Engines.MLQuests.Definitions
{ {
Activated = true; Activated = true;
Title = 1072252; // Overpopulation Title = 1072252; // Overpopulation
Description = // I just can't bear it any longer. Sure, it's my job to thin the deer out so they don't overeat the area and
1072267; // I just can't bear it any longer. Sure, it's my job to thin the deer out so they don't overeat the area and starve themselves come winter time. Sure, I know we killed off the predators that would do this naturally so now we have to make up for it. But they're so graceful and innocent. I just can't do it. Will you? // starve themselves come winter time. Sure, I know we killed off the predators that would do this naturally
// so now we have to make up for it. But they're so graceful and innocent. I just can't do it. Will you?
Description = 1072267;
RefusalMessage = 1072270; // Well, okay. But if you decide you are up for it after all, c'mon back and see me. RefusalMessage = 1072270; // Well, okay. But if you decide you are up for it after all, c'mon back and see me.
InProgressMessage = 1072271; // You're not quite done yet. Get back to work! InProgressMessage = 1072271; // You're not quite done yet. Get back to work!
@ -478,8 +527,10 @@ namespace Server.Engines.MLQuests.Definitions
{ {
Activated = true; Activated = true;
Title = 1072245; // Wild Boar Cull Title = 1072245; // Wild Boar Cull
Description = // A pity really. With the balance of nature awry, we have no choice but to accept the responsibility of
1072260; // A pity really. With the balance of nature awry, we have no choice but to accept the responsibility of making it all right. It's all a part of the circle of life, after all. So, yes, the boars are running rampant. There are far too many in the region. Will you shoulder your obligations as a higher life form? // making it all right. It's all a part of the circle of life, after all. So, yes, the boars are running rampant.
// There are far too many in the region. Will you shoulder your obligations as a higher life form?
Description = 1072260;
RefusalMessage = 1072270; // Well, okay. But if you decide you are up for it after all, c'mon back and see me. RefusalMessage = 1072270; // Well, okay. But if you decide you are up for it after all, c'mon back and see me.
InProgressMessage = 1072271; // You're not quite done yet. Get back to work! InProgressMessage = 1072271; // You're not quite done yet. Get back to work!
@ -495,8 +546,10 @@ namespace Server.Engines.MLQuests.Definitions
{ {
Activated = true; Activated = true;
Title = 1073089; // It's Elemental Title = 1073089; // It's Elemental
Description = // The universe is all about balance my friend. Tip one end, you must balance the other.
1073579; // The universe is all about balance my friend. Tip one end, you must balance the other. That's why I must ask you to kill not just one kind of elemental, but three kinds. Snuff out some Fire, douse a few Water, and crush some Earth elementals and I'll pay you for your trouble. // That's why I must ask you to kill not just one kind of elemental, but three kinds. Snuff out some Fire, douse
// a few Water, and crush some Earth elementals and I'll pay you for your trouble.
Description = 1073579;
RefusalMessage = 1073580; // I hope you'll reconsider. Until then, farwell. RefusalMessage = 1073580; // I hope you'll reconsider. Until then, farwell.
InProgressMessage = 1073599; // Four of each, that's all I ask. Water, earth and fire. InProgressMessage = 1073599; // Four of each, that's all I ask. Water, earth and fire.
@ -514,8 +567,10 @@ namespace Server.Engines.MLQuests.Definitions
{ {
Activated = true; Activated = true;
Title = 1073656; // Circle of Life Title = 1073656; // Circle of Life
Description = // There's been a bumper crop of evil with the Bog Things in these parts, my friend.
1073695; // There's been a bumper crop of evil with the Bog Things in these parts, my friend. Though they are foul creatures, they are also most fecund. Slay one and you make the land more fertile. Even better, slay several and I will give you whatever coin I can spare. // Though they are foul creatures, they are also most fecund. Slay one and you make the land more fertile.
// Even better, slay several and I will give you whatever coin I can spare.
Description = 1073695;
RefusalMessage = 1073733; // Perhaps you'll change your mind and return at some point. RefusalMessage = 1073733; // Perhaps you'll change your mind and return at some point.
InProgressMessage = 1073736; // Continue to seek and kill the Bog Things. InProgressMessage = 1073736; // Continue to seek and kill the Bog Things.
@ -1634,8 +1689,9 @@ namespace Server.Engines.MLQuests.Definitions
{ {
Activated = true; Activated = true;
Title = 1073067; // Paroxysmus' Succubi Title = 1073067; // Paroxysmus' Succubi
Description = // The succubi that have congregated within the sinkhole to worship Paroxysmus pose a tremendous danger.
1074696; // The succubi that have congregated within the sinkhole to worship Paroxysmus pose a tremendous danger. Will you enter the lair and see to their destruction? // Will you enter the lair and see to their destruction?
Description = 1074696;
RefusalMessage = 1072270; // Well, okay. But if you decide you are up for it after all, c'mon back and see me. RefusalMessage = 1072270; // Well, okay. But if you decide you are up for it after all, c'mon back and see me.
InProgressMessage = 1072271; // You're not quite done yet. Get back to work! InProgressMessage = 1072271; // You're not quite done yet. Get back to work!
@ -1644,9 +1700,12 @@ namespace Server.Engines.MLQuests.Definitions
3, 3,
new[] { typeof(Succubus) }, new[] { typeof(Succubus) },
"succubi", "succubi",
new QuestArea(1074806, "The Palace of Paroxysmus") new QuestArea(
1074806, // The Palace of Paroxysmus
"The Palace of Paroxysmus"
)
) )
); // The Palace of Paroxysmus );
Rewards.Add(ItemReward.LargeBagOfTreasure); Rewards.Add(ItemReward.LargeBagOfTreasure);
} }
@ -1658,8 +1717,9 @@ namespace Server.Engines.MLQuests.Definitions
{ {
Activated = true; Activated = true;
Title = 1073068; // Paroxysmus' Moloch Title = 1073068; // Paroxysmus' Moloch
Description = // The moloch daemons that have congregated to worship Paroxysmus pose a tremendous danger.
1074695; // The moloch daemons that have congregated to worship Paroxysmus pose a tremendous danger. Will you enter the lair and see to their destruction? // Will you enter the lair and see to their destruction?
Description = 1074695;
RefusalMessage = 1072270; // Well, okay. But if you decide you are up for it after all, c'mon back and see me. RefusalMessage = 1072270; // Well, okay. But if you decide you are up for it after all, c'mon back and see me.
InProgressMessage = 1072271; // You're not quite done yet. Get back to work! InProgressMessage = 1072271; // You're not quite done yet. Get back to work!
@ -1682,8 +1742,9 @@ namespace Server.Engines.MLQuests.Definitions
{ {
Activated = true; Activated = true;
Title = 1073069; // Paroxysmus' Daemons Title = 1073069; // Paroxysmus' Daemons
Description = // The daemons that have congregated to worship Paroxysmus pose a tremendous danger.
1074694; // The daemons that have congregated to worship Paroxysmus pose a tremendous danger. Will you enter the lair and see to their destruction? // Will you enter the lair and see to their destruction?
Description = 1074694;
RefusalMessage = 1072270; // Well, okay. But if you decide you are up for it after all, c'mon back and see me. RefusalMessage = 1072270; // Well, okay. But if you decide you are up for it after all, c'mon back and see me.
InProgressMessage = 1072271; // You're not quite done yet. Get back to work! InProgressMessage = 1072271; // You're not quite done yet. Get back to work!
@ -1706,8 +1767,9 @@ namespace Server.Engines.MLQuests.Definitions
{ {
Activated = true; Activated = true;
Title = 1073070; // Paroxysmus' Arcane Daemons Title = 1073070; // Paroxysmus' Arcane Daemons
Description = // The arcane daemons that worship Paroxysmus pose a tremendous danger.
1074697; // The arcane daemons that worship Paroxysmus pose a tremendous danger. Will you enter the lair and see to their destruction? // Will you enter the lair and see to their destruction?
Description = 1074697;
RefusalMessage = 1072270; // Well, okay. But if you decide you are up for it after all, c'mon back and see me. RefusalMessage = 1072270; // Well, okay. But if you decide you are up for it after all, c'mon back and see me.
InProgressMessage = 1072271; // You're not quite done yet. Get back to work! InProgressMessage = 1072271; // You're not quite done yet. Get back to work!
@ -1730,8 +1792,10 @@ namespace Server.Engines.MLQuests.Definitions
{ {
Activated = true; Activated = true;
Title = 1073062; // Caustic Combo Title = 1073062; // Caustic Combo
Description = // Vile creatures have exited the sinkhole and begun terrorizing the surrounding area.
1074693; // Vile creatures have exited the sinkhole and begun terrorizing the surrounding area. The demons are bad enough, but the elementals are an abomination, their poisons seeping into the fertile ground here. Will you enter the sinkhole and put a stop to their depredations? // The demons are bad enough, but the elementals are an abomination, their poisons seeping into the fertile ground here.
// Will you enter the sinkhole and put a stop to their depredations?
Description = 1074693;
RefusalMessage = 1072270; // Well, okay. But if you decide you are up for it after all, c'mon back and see me. RefusalMessage = 1072270; // Well, okay. But if you decide you are up for it after all, c'mon back and see me.
InProgressMessage = 1072271; // You're not quite done yet. Get back to work! InProgressMessage = 1072271; // You're not quite done yet. Get back to work!
@ -1762,8 +1826,10 @@ namespace Server.Engines.MLQuests.Definitions
{ {
Activated = true; Activated = true;
Title = 1073061; // Plague Lord Title = 1073061; // Plague Lord
Description = // Some of the most horrific creatures have slithered out of the sinkhole there and begun terrorizing
1074692; // Some of the most horrific creatures have slithered out of the sinkhole there and begun terrorizing the surrounding area. The plague creatures are one of the most destruction of the minions of Paroxysmus. Are you willing to do something about them? // the surrounding area. The plague creatures are one of the most destruction of the minions of Paroxysmus.
// Are you willing to do something about them?
Description = 1074692;
RefusalMessage = 1072270; // Well, okay. But if you decide you are up for it after all, c'mon back and see me. RefusalMessage = 1072270; // Well, okay. But if you decide you are up for it after all, c'mon back and see me.
InProgressMessage = 1072271; // You're not quite done yet. Get back to work! InProgressMessage = 1072271; // You're not quite done yet. Get back to work!
@ -1802,8 +1868,11 @@ namespace Server.Engines.MLQuests.Definitions
{ {
Activated = true; Activated = true;
Title = 1073055; // Glassy Foe Title = 1073055; // Glassy Foe
Description = // Good, you're here. The presence of a twisted creature deep under the earth near Nu'Jelm has corrupted the
1074669; // Good, you're here. The presence of a twisted creature deep under the earth near Nu'Jelm has corrupted the natural growth of crystals in that region. They've become infused with the twisting energy - they've come to a sort of life. This is an abomination that festers within Sosaria. You must eradicate the crystal lattice seekers. // natural growth of crystals in that region. They've become infused with the twisting energy -
// they've come to a sort of life. This is an abomination that festers within Sosaria.
// You must eradicate the crystal lattice seekers.
Description = 1074669;
RefusalMessage = 1074671; // These abominations must not be permitted to fester! RefusalMessage = 1074671; // These abominations must not be permitted to fester!
InProgressMessage = 1074672; // You must not waste time. Do not suffer these crystalline abominations to live. InProgressMessage = 1074672; // You must not waste time. Do not suffer these crystalline abominations to live.
CompletionMessage = 1074673; // You have done well. Enjoy this reward. CompletionMessage = 1074673; // You have done well. Enjoy this reward.
@ -1827,8 +1896,11 @@ namespace Server.Engines.MLQuests.Definitions
{ {
Activated = true; Activated = true;
Title = 1073053; // Daemonic Prism Title = 1073053; // Daemonic Prism
Description = // Good, you're here.
1074668; // Good, you're here. The presence of a twisted creature deep under the earth near Nu'Jelm has corrupted the natural growth of crystals in that region. They've become infused with the twisting energy - they've come to a sort of life. This is an abomination that festers within Sosaria. You must eradicate the crystal daemons. // The presence of a twisted creature deep under the earth near Nu'Jelm has corrupted the natural growth of
// crystals in that region. They've become infused with the twisting energy - they've come to a sort of life.
// This is an abomination that festers within Sosaria. You must eradicate the crystal daemons.
Description = 1074668;
RefusalMessage = 1074671; // These abominations must not be permitted to fester! RefusalMessage = 1074671; // These abominations must not be permitted to fester!
InProgressMessage = 1074672; // You must not waste time. Do not suffer these crystalline abominations to live. InProgressMessage = 1074672; // You must not waste time. Do not suffer these crystalline abominations to live.
CompletionMessage = 1074673; // You have done well. Enjoy this reward. CompletionMessage = 1074673; // You have done well. Enjoy this reward.
@ -1852,8 +1924,11 @@ namespace Server.Engines.MLQuests.Definitions
{ {
Activated = true; Activated = true;
Title = 1073057; // Hailstorm Title = 1073057; // Hailstorm
Description = // Good, you're here.
1074670; // Good, you're here. The presence of a twisted creature deep under the earth near Nu'Jelm has corrupted the natural growth of crystals in that region. They've become infused with the twisting energy - they've come to a sort of life. This is an abomination that festers within Sosaria. You must eradicate the crystal vortices. // The presence of a twisted creature deep under the earth near Nu'Jelm has corrupted the natural growth of
// crystals in that region. They've become infused with the twisting energy - they've come to a sort of life.
// This is an abomination that festers within Sosaria. You must eradicate the crystal vortices.
Description = 1074670;
RefusalMessage = 1074671; // These abominations must not be permitted to fester! RefusalMessage = 1074671; // These abominations must not be permitted to fester!
InProgressMessage = 1074672; // You must not waste time. Do not suffer these crystalline abominations to live. InProgressMessage = 1074672; // You must not waste time. Do not suffer these crystalline abominations to live.
CompletionMessage = 1074673; // You have done well. Enjoy this reward. CompletionMessage = 1074673; // You have done well. Enjoy this reward.

View file

@ -0,0 +1,285 @@
using System;
using System.Linq;
using Server.Engines.CannedEvil;
namespace Server.Mobiles
{
[PropertyObject]
public class ChampionTitleInfo
{
public const int LossAmount = 90;
public static TimeSpan LossDelay = TimeSpan.FromDays(1.0);
private TitleInfo[] m_Values;
public ChampionTitleInfo()
{
}
public ChampionTitleInfo(IGenericReader reader)
{
var version = reader.ReadEncodedInt();
switch (version)
{
case 0:
{
Harrower = reader.ReadEncodedInt();
var length = reader.ReadEncodedInt();
m_Values = new TitleInfo[length];
for (var i = 0; i < length; i++)
{
m_Values[i] = new TitleInfo(reader);
}
if (m_Values.Length != ChampionSpawnInfo.Table.Length)
{
var oldValues = m_Values;
m_Values = new TitleInfo[ChampionSpawnInfo.Table.Length];
for (var i = 0; i < m_Values.Length && i < oldValues.Length; i++)
{
m_Values[i] = oldValues[i];
}
}
break;
}
}
}
[CommandProperty(AccessLevel.GameMaster)]
public int Pestilence
{
get => GetValue(ChampionSpawnType.Pestilence);
set => SetValue(ChampionSpawnType.Pestilence, value);
}
[CommandProperty(AccessLevel.GameMaster)]
public int Abyss
{
get => GetValue(ChampionSpawnType.Abyss);
set => SetValue(ChampionSpawnType.Abyss, value);
}
[CommandProperty(AccessLevel.GameMaster)]
public int Arachnid
{
get => GetValue(ChampionSpawnType.Arachnid);
set => SetValue(ChampionSpawnType.Arachnid, value);
}
[CommandProperty(AccessLevel.GameMaster)]
public int ColdBlood
{
get => GetValue(ChampionSpawnType.ColdBlood);
set => SetValue(ChampionSpawnType.ColdBlood, value);
}
[CommandProperty(AccessLevel.GameMaster)]
public int ForestLord
{
get => GetValue(ChampionSpawnType.ForestLord);
set => SetValue(ChampionSpawnType.ForestLord, value);
}
[CommandProperty(AccessLevel.GameMaster)]
public int SleepingDragon
{
get => GetValue(ChampionSpawnType.SleepingDragon);
set => SetValue(ChampionSpawnType.SleepingDragon, value);
}
[CommandProperty(AccessLevel.GameMaster)]
public int UnholyTerror
{
get => GetValue(ChampionSpawnType.UnholyTerror);
set => SetValue(ChampionSpawnType.UnholyTerror, value);
}
[CommandProperty(AccessLevel.GameMaster)]
public int VerminHorde
{
get => GetValue(ChampionSpawnType.VerminHorde);
set => SetValue(ChampionSpawnType.VerminHorde, value);
}
[CommandProperty(AccessLevel.GameMaster)]
public int Harrower { get; set; }
public int GetValue(ChampionSpawnType type) => GetValue((int)type);
public void SetValue(ChampionSpawnType type, int value)
{
SetValue((int)type, value);
}
public void Award(ChampionSpawnType type, int value)
{
Award((int)type, value);
}
public int GetValue(int index)
{
if (m_Values == null || index < 0 || index >= m_Values.Length)
{
return 0;
}
m_Values[index] ??= new TitleInfo();
return m_Values[index].Value;
}
public DateTime GetLastDecay(int index)
{
if (m_Values == null || index < 0 || index >= m_Values.Length)
{
return DateTime.MinValue;
}
m_Values[index] ??= new TitleInfo();
return m_Values[index].LastDecay;
}
public void SetValue(int index, int value)
{
m_Values ??= new TitleInfo[ChampionSpawnInfo.Table.Length];
if (index < 0 || index >= m_Values.Length)
{
return;
}
m_Values[index] ??= new TitleInfo();
m_Values[index].Value = Math.Max(value, 0);
}
public void Award(int index, int value)
{
m_Values ??= new TitleInfo[ChampionSpawnInfo.Table.Length];
if (index < 0 || index >= m_Values.Length || value <= 0)
{
return;
}
m_Values[index] ??= new TitleInfo();
m_Values[index].Value += value;
}
public void Atrophy(int index, int value)
{
m_Values ??= new TitleInfo[ChampionSpawnInfo.Table.Length];
if (index < 0 || index >= m_Values.Length || value <= 0)
{
return;
}
m_Values[index] ??= new TitleInfo();
var before = m_Values[index].Value;
m_Values[index].Value -= Math.Min(value, m_Values[index].Value);
if (before != m_Values[index].Value)
{
m_Values[index].LastDecay = DateTime.UtcNow;
}
}
public override string ToString() => "...";
public static void Serialize(IGenericWriter writer, ChampionTitleInfo titles)
{
writer.WriteEncodedInt(0); // version
writer.WriteEncodedInt(titles.Harrower);
var length = titles.m_Values.Length;
writer.WriteEncodedInt(length);
for (var i = 0; i < length; i++)
{
titles.m_Values[i] ??= new TitleInfo();
TitleInfo.Serialize(writer, titles.m_Values[i]);
}
}
public static void CheckAtrophy(PlayerMobile pm)
{
var t = pm.ChampionTitles;
if (t == null)
{
return;
}
t.m_Values ??= new TitleInfo[ChampionSpawnInfo.Table.Length];
for (var i = 0; i < t.m_Values.Length; i++)
{
if (t.GetLastDecay(i) + LossDelay < DateTime.UtcNow)
{
t.Atrophy(i, LossAmount);
}
}
}
public static void
AwardHarrowerTitle(PlayerMobile pm) // Called when killing a harrower. Will give a minimum of 1 point.
{
var t = pm.ChampionTitles;
if (t == null)
{
return;
}
t.m_Values ??= new TitleInfo[ChampionSpawnInfo.Table.Length];
var count = 1 + t.m_Values.Count(t1 => t1.Value > 900);
t.Harrower = Math.Max(count, t.Harrower); // Harrower titles never decay.
}
private class TitleInfo
{
public TitleInfo()
{
}
public TitleInfo(IGenericReader reader)
{
var version = reader.ReadEncodedInt();
switch (version)
{
case 0:
{
Value = reader.ReadEncodedInt();
LastDecay = reader.ReadDateTime();
break;
}
}
}
public int Value { get; set; }
public DateTime LastDecay { get; set; }
public static void Serialize(IGenericWriter writer, TitleInfo info)
{
writer.WriteEncodedInt(0); // version
writer.WriteEncodedInt(info.Value);
writer.Write(info.LastDecay);
}
}
}
}

View file

@ -1420,10 +1420,8 @@ namespace Server.Mobiles
if (drop) if (drop)
{ {
from.SendLocalizedMessage( // You can no longer wield your ~1_WEAPON~
1062001, from.SendLocalizedMessage(1062001, weapon.Name ?? $"#{weapon.LabelNumber}");
weapon.Name ?? $"#{weapon.LabelNumber}"
); // You can no longer wield your ~1_WEAPON~
from.AddToBackpack(weapon); from.AddToBackpack(weapon);
moved = true; moved = true;
} }
@ -1510,10 +1508,8 @@ namespace Server.Mobiles
if (drop) if (drop)
{ {
from.SendLocalizedMessage( // You can no longer wear your ~1_ARMOR~
1062002, from.SendLocalizedMessage(1062002, clothing.Name ?? $"#{clothing.LabelNumber}");
clothing.Name ?? $"#{clothing.LabelNumber}"
); // You can no longer wear your ~1_ARMOR~
from.AddToBackpack(clothing); from.AddToBackpack(clothing);
moved = true; moved = true;
@ -3638,15 +3634,8 @@ namespace Server.Mobiles
{ {
ascii = true; ascii = true;
if (pl.MerchantTitle != MerchantTitle.None) var title = MerchantTitles.GetInfo(pl.MerchantTitle)?.Title?.String ?? pl.Rank.Title.String;
{ text = $"({title}, {faction.Definition.FriendlyName})";
text =
$"({MerchantTitles.GetInfo(pl.MerchantTitle).Title.String}, {faction.Definition.FriendlyName})";
}
else
{
text = $"({pl.Rank.Title.String}, {faction.Definition.FriendlyName})";
}
} }
var hue = Faction.Find(from) == faction ? 98 : 38; var hue = Faction.Find(from) == faction ? 98 : 38;
@ -4116,9 +4105,8 @@ namespace Server.Mobiles
if (from.Backpack == null || item.Parent != from.Backpack) if (from.Backpack == null || item.Parent != from.Backpack)
{ {
SendLocalizedMessage( // An item must be in your backpack (and not in a container within) to be toggled as a quest item.
1074769 SendLocalizedMessage(1074769);
); // An item must be in your backpack (and not in a container within) to be toggled as a quest item.
} }
else if (item.QuestItem) else if (item.QuestItem)
{ {
@ -4131,7 +4119,8 @@ namespace Server.Mobiles
} }
else else
{ {
SendLocalizedMessage(1072355, "", 0x23); // That item does not match any of your quest criteria // That item does not match any of your quest criteria
SendLocalizedMessage(1072355, "", 0x23);
} }
ToggleQuestItemTarget(); ToggleQuestItemTarget();
@ -4201,9 +4190,9 @@ namespace Server.Mobiles
{ {
if (Young && (DuelContext?.Started != true || DuelContext.Finished)) if (Young && (DuelContext?.Started != true || DuelContext.Finished))
{ {
SendLocalizedMessage( // You would have been poisoned, were you not new to the land of Britannia.
502808 // Be careful in the future.
); // You would have been poisoned, were you not new to the land of Britannia. Be careful in the future. SendLocalizedMessage(502808);
} }
else else
{ {
@ -4243,10 +4232,8 @@ namespace Server.Mobiles
{ {
if (Young && SkillsTotal >= 4500) if (Young && SkillsTotal >= 4500)
{ {
((Account)Account) // You have successfully obtained a respectable skill level, and have outgrown your status as a young player!
?.RemoveYoungStatus( ((Account)Account)?.RemoveYoungStatus(1019036);
1019036
); // You have successfully obtained a respectable skill level, and have outgrown your status as a young player!
} }
if (MLQuestSystem.Enabled) if (MLQuestSystem.Enabled)
@ -4488,9 +4475,9 @@ namespace Server.Mobiles
if (DateTime.UtcNow - m_LastYoungMessage > TimeSpan.FromMinutes(1.0)) if (DateTime.UtcNow - m_LastYoungMessage > TimeSpan.FromMinutes(1.0))
{ {
m_LastYoungMessage = DateTime.UtcNow; m_LastYoungMessage = DateTime.UtcNow;
SendLocalizedMessage( // A monster looks at you menacingly but does not attack.
1019067 // You would be under attack now if not for your status as a new citizen of Britannia.
); // A monster looks at you menacingly but does not attack. You would be under attack now if not for your status as a new citizen of Britannia. SendLocalizedMessage(1019067);
} }
return true; return true;
@ -4604,11 +4591,13 @@ namespace Server.Mobiles
if (DisplayChampionTitle) if (DisplayChampionTitle)
{ {
SendLocalizedMessage(1062419, "", 0x23); // You have chosen to hide your monster kill title. // You have chosen to hide your monster kill title.
SendLocalizedMessage(1062419, "", 0x23);
} }
else else
{ {
SendLocalizedMessage(1062418, "", 0x23); // You have chosen to display your monster kill title. // You have chosen to display your monster kill title.
SendLocalizedMessage(1062418, "", 0x23);
} }
DisplayChampionTitle = !DisplayChampionTitle; DisplayChampionTitle = !DisplayChampionTitle;
@ -4801,11 +4790,8 @@ namespace Server.Mobiles
if (info.ButtonID == 1) if (info.ButtonID == 1)
{ {
m_Player.SendLocalizedMessage( // You have cancelled automatically reinsuring all insured items upon death
1061075, m_Player.SendLocalizedMessage(1061075, "", 0x23);
"",
0x23
); // You have cancelled automatically reinsuring all insured items upon death
m_Player.AutoRenewInsurance = false; m_Player.AutoRenewInsurance = false;
} }
else else
@ -5068,284 +5054,5 @@ namespace Server.Mobiles
} }
} }
} }
[PropertyObject]
public class ChampionTitleInfo
{
public const int LossAmount = 90;
public static TimeSpan LossDelay = TimeSpan.FromDays(1.0);
private TitleInfo[] m_Values;
public ChampionTitleInfo()
{
}
public ChampionTitleInfo(IGenericReader reader)
{
var version = reader.ReadEncodedInt();
switch (version)
{
case 0:
{
Harrower = reader.ReadEncodedInt();
var length = reader.ReadEncodedInt();
m_Values = new TitleInfo[length];
for (var i = 0; i < length; i++)
{
m_Values[i] = new TitleInfo(reader);
}
if (m_Values.Length != ChampionSpawnInfo.Table.Length)
{
var oldValues = m_Values;
m_Values = new TitleInfo[ChampionSpawnInfo.Table.Length];
for (var i = 0; i < m_Values.Length && i < oldValues.Length; i++)
{
m_Values[i] = oldValues[i];
}
}
break;
}
}
}
[CommandProperty(AccessLevel.GameMaster)]
public int Pestilence
{
get => GetValue(ChampionSpawnType.Pestilence);
set => SetValue(ChampionSpawnType.Pestilence, value);
}
[CommandProperty(AccessLevel.GameMaster)]
public int Abyss
{
get => GetValue(ChampionSpawnType.Abyss);
set => SetValue(ChampionSpawnType.Abyss, value);
}
[CommandProperty(AccessLevel.GameMaster)]
public int Arachnid
{
get => GetValue(ChampionSpawnType.Arachnid);
set => SetValue(ChampionSpawnType.Arachnid, value);
}
[CommandProperty(AccessLevel.GameMaster)]
public int ColdBlood
{
get => GetValue(ChampionSpawnType.ColdBlood);
set => SetValue(ChampionSpawnType.ColdBlood, value);
}
[CommandProperty(AccessLevel.GameMaster)]
public int ForestLord
{
get => GetValue(ChampionSpawnType.ForestLord);
set => SetValue(ChampionSpawnType.ForestLord, value);
}
[CommandProperty(AccessLevel.GameMaster)]
public int SleepingDragon
{
get => GetValue(ChampionSpawnType.SleepingDragon);
set => SetValue(ChampionSpawnType.SleepingDragon, value);
}
[CommandProperty(AccessLevel.GameMaster)]
public int UnholyTerror
{
get => GetValue(ChampionSpawnType.UnholyTerror);
set => SetValue(ChampionSpawnType.UnholyTerror, value);
}
[CommandProperty(AccessLevel.GameMaster)]
public int VerminHorde
{
get => GetValue(ChampionSpawnType.VerminHorde);
set => SetValue(ChampionSpawnType.VerminHorde, value);
}
[CommandProperty(AccessLevel.GameMaster)]
public int Harrower { get; set; }
public int GetValue(ChampionSpawnType type) => GetValue((int)type);
public void SetValue(ChampionSpawnType type, int value)
{
SetValue((int)type, value);
}
public void Award(ChampionSpawnType type, int value)
{
Award((int)type, value);
}
public int GetValue(int index)
{
if (m_Values == null || index < 0 || index >= m_Values.Length)
{
return 0;
}
m_Values[index] ??= new TitleInfo();
return m_Values[index].Value;
}
public DateTime GetLastDecay(int index)
{
if (m_Values == null || index < 0 || index >= m_Values.Length)
{
return DateTime.MinValue;
}
m_Values[index] ??= new TitleInfo();
return m_Values[index].LastDecay;
}
public void SetValue(int index, int value)
{
m_Values ??= new TitleInfo[ChampionSpawnInfo.Table.Length];
if (index < 0 || index >= m_Values.Length)
{
return;
}
m_Values[index] ??= new TitleInfo();
m_Values[index].Value = Math.Max(value, 0);
}
public void Award(int index, int value)
{
m_Values ??= new TitleInfo[ChampionSpawnInfo.Table.Length];
if (index < 0 || index >= m_Values.Length || value <= 0)
{
return;
}
m_Values[index] ??= new TitleInfo();
m_Values[index].Value += value;
}
public void Atrophy(int index, int value)
{
m_Values ??= new TitleInfo[ChampionSpawnInfo.Table.Length];
if (index < 0 || index >= m_Values.Length || value <= 0)
{
return;
}
m_Values[index] ??= new TitleInfo();
var before = m_Values[index].Value;
m_Values[index].Value -= Math.Min(value, m_Values[index].Value);
if (before != m_Values[index].Value)
{
m_Values[index].LastDecay = DateTime.UtcNow;
}
}
public override string ToString() => "...";
public static void Serialize(IGenericWriter writer, ChampionTitleInfo titles)
{
writer.WriteEncodedInt(0); // version
writer.WriteEncodedInt(titles.Harrower);
var length = titles.m_Values.Length;
writer.WriteEncodedInt(length);
for (var i = 0; i < length; i++)
{
titles.m_Values[i] ??= new TitleInfo();
TitleInfo.Serialize(writer, titles.m_Values[i]);
}
}
public static void CheckAtrophy(PlayerMobile pm)
{
var t = pm.ChampionTitles;
if (t == null)
{
return;
}
t.m_Values ??= new TitleInfo[ChampionSpawnInfo.Table.Length];
for (var i = 0; i < t.m_Values.Length; i++)
{
if (t.GetLastDecay(i) + LossDelay < DateTime.UtcNow)
{
t.Atrophy(i, LossAmount);
}
}
}
public static void
AwardHarrowerTitle(PlayerMobile pm) // Called when killing a harrower. Will give a minimum of 1 point.
{
var t = pm.ChampionTitles;
if (t == null)
{
return;
}
t.m_Values ??= new TitleInfo[ChampionSpawnInfo.Table.Length];
var count = 1 + t.m_Values.Count(t1 => t1.Value > 900);
t.Harrower = Math.Max(count, t.Harrower); // Harrower titles never decay.
}
private class TitleInfo
{
public TitleInfo()
{
}
public TitleInfo(IGenericReader reader)
{
var version = reader.ReadEncodedInt();
switch (version)
{
case 0:
{
Value = reader.ReadEncodedInt();
LastDecay = reader.ReadDateTime();
break;
}
}
}
public int Value { get; set; }
public DateTime LastDecay { get; set; }
public static void Serialize(IGenericWriter writer, TitleInfo info)
{
writer.WriteEncodedInt(0); // version
writer.WriteEncodedInt(info.Value);
writer.Write(info.LastDecay);
}
}
}
} }
} }

View file

@ -341,7 +341,7 @@ namespace Server.Mobiles
if (ds.m_HasRight && ds.m_Mobile is PlayerMobile mobile) if (ds.m_HasRight && ds.m_Mobile is PlayerMobile mobile)
{ {
PlayerMobile.ChampionTitleInfo.AwardHarrowerTitle(mobile); ChampionTitleInfo.AwardHarrowerTitle(mobile);
} }
} }