Removes literal variables (#257)

This commit is contained in:
Kamron Batman 2020-09-18 18:41:26 -07:00 committed by GitHub
parent 580da8a0cc
commit 4d6e584b6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
359 changed files with 1306 additions and 1306 deletions

View file

@ -138,16 +138,16 @@ namespace Server.Commands
}
else
{
newItem.MoveToWorld(@from.Location, @from.Map);
newItem.MoveToWorld(from.Location, from.Map);
}
newItem.InvalidateProperties();
CommandLogging.WriteLine(
@from,
from,
"{0} {1} duped {2} creating {3}",
@from.AccessLevel,
CommandLogging.Format(@from),
from.AccessLevel,
CommandLogging.Format(from),
CommandLogging.Format(targ),
CommandLogging.Format(newItem)
);
@ -166,7 +166,7 @@ namespace Server.Commands
if (!done)
{
@from.SendMessage("Unable to dupe. Item must have a 0 parameter constructor.");
from.SendMessage("Unable to dupe. Item must have a 0 parameter constructor.");
}
}
}

View file

@ -114,11 +114,11 @@ namespace Server.Commands.Generic
{
var entry = m_Responses[i];
@from.SendMessage(entry.ToString());
from.SendMessage(entry.ToString());
if (flushToLog)
{
CommandLogging.WriteLine(@from, entry.ToString());
CommandLogging.WriteLine(from, entry.ToString());
}
}
}
@ -126,7 +126,7 @@ namespace Server.Commands.Generic
{
for (var i = 0; i < m_Failures.Count; ++i)
{
@from.SendMessage(m_Failures[i].ToString());
from.SendMessage(m_Failures[i].ToString());
}
}

View file

@ -234,7 +234,7 @@ namespace Server.Commands.Generic
{
if (echo)
{
gm.SendMessage("{0} : has opened their web browser to : {1}", @from.Name, url);
gm.SendMessage("{0} : has opened their web browser to : {1}", from.Name, url);
}
from.LaunchBrowser(url);
@ -243,7 +243,7 @@ namespace Server.Commands.Generic
{
if (echo)
{
gm.SendMessage("{0} : has chosen not to open their web browser to : {1}", @from.Name, url);
gm.SendMessage("{0} : has chosen not to open their web browser to : {1}", from.Name, url);
}
from.SendMessage("You have chosen not to open your web browser.");
@ -446,7 +446,7 @@ namespace Server.Commands.Generic
if (m_InGump)
{
mob.SendGump(new MessageSentGump(mob, @from.Name, e.ArgString));
mob.SendGump(new MessageSentGump(mob, from.Name, e.ArgString));
}
else
{

View file

@ -188,13 +188,13 @@ namespace Server.Commands.Generic
{
if (m_Foundations.Count == 0)
{
@from.SendMessage(
from.SendMessage(
"The item has been inserted into the house design. Press ESC when you are finished."
);
}
else
{
@from.SendMessage("The item has been inserted into the house design.");
from.SendMessage("The item has been inserted into the house design.");
}
if (!m_Foundations.Contains(house))

View file

@ -99,7 +99,7 @@ namespace Server.Commands.Generic
foreach (var update in parsed)
{
update.Optimize(@from, baseType, ref emitter);
update.Optimize(from, baseType, ref emitter);
}
if (size != args.Length)

View file

@ -49,7 +49,7 @@ namespace Server.Commands.Generic
foreach (var obj in eable)
{
if ((!mobiles || obj is Mobile) && BaseCommand.IsAccessible(@from, obj) && ext.IsValid(obj))
if ((!mobiles || obj is Mobile) && BaseCommand.IsAccessible(from, obj) && ext.IsValid(obj))
{
objs.Add(obj);
}

View file

@ -21,7 +21,7 @@ namespace Server.Commands.Generic
{
if (command.ValidateArgs(this, new CommandEventArgs(from, command.Commands[0], GenerateArgString(args), args)))
{
@from.BeginTarget(
from.BeginTarget(
-1,
command.ObjectTypes == ObjectTypes.All,
TargetFlags.None,

View file

@ -17,7 +17,7 @@ namespace Server.Commands.Generic
{
if (command.ValidateArgs(this, new CommandEventArgs(from, command.Commands[0], GenerateArgString(args), args)))
{
@from.BeginTarget(
from.BeginTarget(
-1,
command.ObjectTypes == ObjectTypes.All,
TargetFlags.None,

View file

@ -46,7 +46,7 @@ namespace Server.Commands.Generic
{
if (command.ValidateArgs(this, new CommandEventArgs(from, command.Commands[0], GenerateArgString(args), args)))
{
@from.BeginTarget(
from.BeginTarget(
-1,
command.ObjectTypes == ObjectTypes.All,
TargetFlags.None,

View file

@ -162,11 +162,11 @@ namespace Server.Commands
if (pe?.Handler == from)
{
@from.SendMessage("You may only use this command if you are handling their help page.");
from.SendMessage("You may only use this command if you are handling their help page.");
}
else
{
@from.SendMessage("You may only use this command on someone who has paged you.");
from.SendMessage("You may only use this command on someone who has paged you.");
}
return;
@ -174,11 +174,11 @@ namespace Server.Commands
if (targ.AddToBackpack(held))
{
@from.SendMessage("The item they were holding has been placed into their backpack.");
from.SendMessage("The item they were holding has been placed into their backpack.");
}
else
{
@from.SendMessage("The item they were holding has been placed at their feet.");
from.SendMessage("The item they were holding has been placed at their feet.");
}
held.ClearBounce();
@ -642,7 +642,7 @@ namespace Server.Commands
{
if (Insensitive.Equals(r.Name, name))
{
@from.MoveToWorld(r.GoLocation, map);
from.MoveToWorld(r.GoLocation, map);
return;
}
}
@ -650,11 +650,11 @@ namespace Server.Commands
if (ser != 0)
{
@from.SendMessage("No object with that serial was found.");
from.SendMessage("No object with that serial was found.");
}
else
{
@from.SendMessage("No region with that name was found.");
from.SendMessage("No region with that name was found.");
}
return;
@ -683,11 +683,11 @@ namespace Server.Commands
var y = int.Parse(e.GetString(1));
var z = e.Length == 3 ? int.Parse(e.GetString(2)) : map.GetAverageZ(x, y);
@from.Location = new Point3D(x, y, z);
from.Location = new Point3D(x, y, z);
}
catch
{
@from.SendMessage("Region name not found.");
from.SendMessage("Region name not found.");
}
}
}
@ -709,11 +709,11 @@ namespace Server.Commands
if (p != Point3D.Zero)
{
@from.Location = p;
from.Location = p;
}
else
{
@from.SendMessage("Sextant reverse lookup failed.");
from.SendMessage("Sextant reverse lookup failed.");
}
}
}
@ -901,7 +901,7 @@ namespace Server.Commands
if (targeted is Mobile mobile)
{
@from.SendMenu(new EquipMenu(@from, mobile, GetEquip(mobile)));
from.SendMenu(new EquipMenu(from, mobile, GetEquip(mobile)));
}
}
@ -1036,7 +1036,7 @@ namespace Server.Commands
}
else
{
box.DisplayTo(@from);
box.DisplayTo(from);
}
}
else
@ -1133,11 +1133,11 @@ namespace Server.Commands
{
if (mobile.AccessLevel >= from.AccessLevel && mobile != from)
{
@from.SendMessage("You can't do that to someone with higher Accesslevel than you!");
from.SendMessage("You can't do that to someone with higher Accesslevel than you!");
}
else
{
@from.SendGump(new StuckMenu(@from, mobile, false));
from.SendGump(new StuckMenu(from, mobile, false));
}
}
}

View file

@ -65,11 +65,11 @@ namespace Server.Commands
if (start == end)
{
sb.AppendFormat("at {0} in {1}", start, @from.Map);
sb.AppendFormat("at {0} in {1}", start, from.Map);
}
else
{
sb.AppendFormat("from {0} to {1} in {2}", start, end, @from.Map);
sb.AppendFormat("from {0} to {1} in {2}", start, end, from.Map);
}
sb.Append(":");
@ -126,7 +126,7 @@ namespace Server.Commands
if (built > 0)
{
@from.SendMessage(
from.SendMessage(
"{0} object{1} generated in {2:F1} seconds.",
built,
built != 1 ? "s" : "",
@ -135,7 +135,7 @@ namespace Server.Commands
}
else
{
SendUsage(type, @from);
SendUsage(type, from);
}
}
@ -195,11 +195,11 @@ namespace Server.Commands
if (attr == null)
{
@from.SendMessage("Property ({0}) not found.", propName);
from.SendMessage("Property ({0}) not found.", propName);
}
else if (from.AccessLevel < attr.WriteLevel)
{
@from.SendMessage(
from.SendMessage(
"Setting this property ({0}) requires at least {1} access level.",
propName,
Mobile.GetAccessLevelName(attr.WriteLevel)
@ -207,7 +207,7 @@ namespace Server.Commands
}
else if (!thisProp.CanWrite || attr.ReadOnly)
{
@from.SendMessage("Property ({0}) is read only.", propName);
from.SendMessage("Property ({0}) is read only.", propName);
}
else
{
@ -354,7 +354,7 @@ namespace Server.Commands
{
if (sendError)
{
@from.SendMessage(result);
from.SendMessage(result);
}
hadError = true;
@ -404,7 +404,7 @@ namespace Server.Commands
if (objectCount >= 20)
{
@from.SendMessage("Constructing {0} objects, please wait.", objectCount);
from.SendMessage("Constructing {0} objects, please wait.", objectCount);
}
var sendError = true;
@ -448,7 +448,7 @@ namespace Server.Commands
z = map.GetAverageZ(x, y);
}
var built = Build(@from, ctor, values, props, realProps, ref sendError);
var built = Build(from, ctor, values, props, realProps, ref sendError);
sb.AppendFormat("0x{0:X}; ", built.Serial.Value);
@ -500,7 +500,7 @@ namespace Server.Commands
if (!foundCtor)
{
@from.SendMessage("That type is not marked constructible.");
from.SendMessage("That type is not marked constructible.");
}
}
@ -557,14 +557,14 @@ namespace Server.Commands
if (e.Length >= 1)
{
BoundingBoxPicker.Begin(
@from,
from,
(map, start, end) =>
TileBox_Callback(@from, start, end, new TileState(TileZType.Start, 0, e.Arguments, outline))
TileBox_Callback(from, start, end, new TileState(TileZType.Start, 0, e.Arguments, outline))
);
}
else
{
@from.SendMessage(
from.SendMessage(
"Format: {0} <type> [params] [set {{<propertyName> <value> ...}}]",
outline ? "Outline" : "Tile"
);
@ -656,14 +656,14 @@ namespace Server.Commands
if (e.Length >= 1)
{
BoundingBoxPicker.Begin(
@from,
from,
(map, start, end) =>
TileBox_Callback(@from, start, end, new TileState(TileZType.MapAverage, 0, e.Arguments, outline))
TileBox_Callback(from, start, end, new TileState(TileZType.MapAverage, 0, e.Arguments, outline))
);
}
else
{
@from.SendMessage(
from.SendMessage(
"Format: {0}Avg <type> [params] [set {{<propertyName> <value> ...}}]",
outline ? "Outline" : "Tile"
);

View file

@ -200,7 +200,7 @@ namespace Server.Gumps
{
if (m_Page > 0)
{
@from.SendGump(new AddGump(@from, m_SearchString, m_Page - 1, m_SearchResults, true));
from.SendGump(new AddGump(from, m_SearchString, m_Page - 1, m_SearchResults, true));
}
break;
@ -209,7 +209,7 @@ namespace Server.Gumps
{
if ((m_Page + 1) * 10 < m_SearchResults.Length)
{
@from.SendGump(new AddGump(@from, m_SearchString, m_Page + 1, m_SearchResults, true));
from.SendGump(new AddGump(from, m_SearchString, m_Page + 1, m_SearchResults, true));
}
break;
@ -279,7 +279,7 @@ namespace Server.Gumps
{
if (cancelType == TargetCancelType.Canceled)
{
@from.SendGump(new AddGump(@from, m_SearchString, m_Page, m_SearchResults, true));
from.SendGump(new AddGump(from, m_SearchString, m_Page, m_SearchResults, true));
}
}
}

View file

@ -275,7 +275,7 @@ namespace Server.Gumps
{
if (m_Page > 0)
{
@from.SendGump(new CategorizedAddGump(@from, m_Category, m_Page - 1));
from.SendGump(new CategorizedAddGump(from, m_Category, m_Page - 1));
}
break;
@ -284,7 +284,7 @@ namespace Server.Gumps
{
if ((m_Page + 1) * EntryCount < m_Category.Nodes.Length)
{
@from.SendGump(new CategorizedAddGump(@from, m_Category, m_Page + 1));
from.SendGump(new CategorizedAddGump(from, m_Category, m_Page + 1));
}
break;
@ -295,7 +295,7 @@ namespace Server.Gumps
if (index >= 0 && index < m_Category.Nodes.Length)
{
m_Category.Nodes[index].OnClick(@from, m_Page);
m_Category.Nodes[index].OnClick(from, m_Page);
}
break;

View file

@ -66,7 +66,7 @@ namespace Server.Commands
{
if (count > 0)
{
@from.SendMessage(WarningHue, $"Partial Completion, {count} Teleporters Removed.");
from.SendMessage(WarningHue, $"Partial Completion, {count} Teleporters Removed.");
}
return;
@ -88,12 +88,12 @@ namespace Server.Commands
{
if (c.DelCount > 0)
{
@from.SendMessage(WarningHue, $"Partial Completion: {c.DelCount} Teleporters Removed.");
from.SendMessage(WarningHue, $"Partial Completion: {c.DelCount} Teleporters Removed.");
}
if (c.Count > 0)
{
@from.SendMessage(WarningHue, $"Partial Completion: {c.Count} Teleporters Added.");
from.SendMessage(WarningHue, $"Partial Completion: {c.Count} Teleporters Added.");
}
return;

View file

@ -544,7 +544,7 @@ namespace Server.Commands
if (shouldLog)
{
CommandLogging.LogChangeProperty(
@from,
from,
logObject,
givenName,
toSet?.ToString() ?? "(-null-)"
@ -607,11 +607,11 @@ namespace Server.Commands
{
if (!BaseCommand.IsAccessible(from, o))
{
@from.SendLocalizedMessage(500447); // That is not accessible.
from.SendLocalizedMessage(500447); // That is not accessible.
}
else
{
@from.SendGump(new PropertiesGump(@from, o));
from.SendGump(new PropertiesGump(from, o));
}
}
}
@ -794,12 +794,12 @@ namespace Server
if ((access & PropertyAccess.Read) != 0 && from.AccessLevel < security.ReadLevel)
{
throw new ReadAccessException(this, @from.AccessLevel, security.ReadLevel);
throw new ReadAccessException(this, from.AccessLevel, security.ReadLevel);
}
if ((access & PropertyAccess.Write) != 0 && (from.AccessLevel < security.WriteLevel || security.ReadOnly))
{
throw new WriteAccessException(this, @from.AccessLevel, security.ReadLevel);
throw new WriteAccessException(this, from.AccessLevel, security.ReadLevel);
}
}

View file

@ -32,7 +32,7 @@ namespace Server.Commands
{
if (o is Mobile mobile)
{
@from.SendGump(new SkillsGump(@from, mobile));
from.SendGump(new SkillsGump(from, mobile));
}
}
}

View file

@ -65,7 +65,7 @@ namespace Server
if (map != null && map != Map.Internal)
{
SendWarning(
@from,
from,
"You are about to freeze <u>all items in {0}</u>.",
BaseFreezeWarning,
map,
@ -141,19 +141,19 @@ namespace Server
if (targetMap == null)
{
CommandLogging.WriteLine(
@from,
from,
"{0} {1} invoking freeze for every item in every map",
@from.AccessLevel,
CommandLogging.Format(@from)
from.AccessLevel,
CommandLogging.Format(from)
);
}
else
{
CommandLogging.WriteLine(
@from,
from,
"{0} {1} invoking freeze for every item in {0}",
@from.AccessLevel,
CommandLogging.Format(@from),
from.AccessLevel,
CommandLogging.Format(from),
targetMap
);
}
@ -380,7 +380,7 @@ namespace Server
if (totalFrozen == 0 && badDataFile)
{
@from.SendGump(
from.SendGump(
new NoticeGump(
1060637,
30720,
@ -393,7 +393,7 @@ namespace Server
}
else
{
@from.SendGump(
from.SendGump(
new NoticeGump(
1060637,
30720,
@ -641,7 +641,7 @@ namespace Server
if (totalUnfrozen == 0 && badDataFile)
{
@from.SendGump(
from.SendGump(
new NoticeGump(
1060637,
30720,
@ -654,7 +654,7 @@ namespace Server
}
else
{
@from.SendGump(
from.SendGump(
new NoticeGump(
1060637,
30720,

View file

@ -28,8 +28,8 @@ namespace Server.ContextMenus
{
if (targeted is Spellbook book)
{
if (@from.CheckAlive() && !m_Scroll.Deleted && m_Scroll.Movable && m_Scroll.Amount >= 1 &&
m_Scroll.CheckItemUse(@from))
if (from.CheckAlive() && !m_Scroll.Deleted && m_Scroll.Movable && m_Scroll.Amount >= 1 &&
m_Scroll.CheckItemUse(from))
{
var type = Spellbook.GetTypeForSpell(m_Scroll.SpellID);
@ -38,7 +38,7 @@ namespace Server.ContextMenus
}
else if (book.HasSpell(m_Scroll.SpellID))
{
@from.SendLocalizedMessage(500179); // That spell is already present in that spellbook.
from.SendLocalizedMessage(500179); // That spell is already present in that spellbook.
}
else
{
@ -50,7 +50,7 @@ namespace Server.ContextMenus
m_Scroll.Consume();
@from.Send(new PlaySound(0x249, book.GetWorldLocation()));
from.Send(new PlaySound(0x249, book.GetWorldLocation()));
}
}
}

View file

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

View file

@ -53,11 +53,11 @@ namespace Server.Engines.BulkOrders
{
if (!from.InRange(GetWorldLocation(), 2))
{
@from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
}
else if (Entries.Count == 0)
{
@from.SendLocalizedMessage(1062381); // The book is empty.
from.SendLocalizedMessage(1062381); // The book is empty.
}
else if (from is PlayerMobile mobile)
{
@ -278,7 +278,7 @@ namespace Server.Engines.BulkOrders
if (!string.IsNullOrEmpty(m_BookName))
{
LabelTo(@from, 1062481, m_BookName);
LabelTo(from, 1062481, m_BookName);
}
}
@ -288,7 +288,7 @@ namespace Server.Engines.BulkOrders
if (from.CheckAlive() && IsChildOf(from.Backpack))
{
list.Add(new NameBookEntry(@from, this));
list.Add(new NameBookEntry(from, this));
}
SetSecureLevelEntry.AddTo(from, this, list);

View file

@ -86,11 +86,11 @@ namespace Server.Engines.BulkOrders
{
if (IsChildOf(from.Backpack) || InSecureTrade || RootParent is PlayerVendor)
{
@from.SendGump(new LargeBODGump(@from, this));
from.SendGump(new LargeBODGump(from, this));
}
else
{
@from.SendLocalizedMessage(1045156); // You must have the deed in your backpack to use it.
from.SendLocalizedMessage(1045156); // You must have the deed in your backpack to use it.
}
}
@ -157,7 +157,7 @@ namespace Server.Engines.BulkOrders
if (!Complete)
{
BeginCombine(@from);
BeginCombine(from);
}
}
}

View file

@ -85,11 +85,11 @@ namespace Server.Engines.BulkOrders
{
if (IsChildOf(from.Backpack) || InSecureTrade || RootParent is PlayerVendor)
{
@from.SendGump(new SmallBODGump(@from, this));
from.SendGump(new SmallBODGump(from, this));
}
else
{
@from.SendLocalizedMessage(1045156); // You must have the deed in your backpack to use it.
from.SendLocalizedMessage(1045156); // You must have the deed in your backpack to use it.
}
}
@ -185,7 +185,7 @@ namespace Server.Engines.BulkOrders
if (m_AmountCur < AmountMax)
{
BeginCombine(@from);
BeginCombine(from);
}
}
}

View file

@ -901,11 +901,11 @@ namespace Server.Engines.CannedEvil
{
if (m_Active)
{
LabelTo(@from, "{0} (Active; Level: {1}; Kills: {2}/{3})", m_Type, Level, m_Kills, MaxKills);
LabelTo(from, "{0} (Active; Level: {1}; Kills: {2}/{3})", m_Type, Level, m_Kills, MaxKills);
}
else
{
LabelTo(@from, "{0} (Inactive)", m_Type);
LabelTo(from, "{0} (Inactive)", m_Type);
}
}

View file

@ -376,7 +376,7 @@ namespace Server.Engines.Chat
if (user.CheckOnline())
{
user.SendMessage(number, @from.Mobile, param1, param2);
user.SendMessage(number, from.Mobile, param1, param2);
}
else if (!Contains(user))
{

View file

@ -49,7 +49,7 @@ namespace Server.Engines.Chat
{
if (chatName.Length > 0 && chatName != accountChatName)
{
@from.SendMessage("You cannot change chat nickname once it has been set.");
from.SendMessage("You cannot change chat nickname once it has been set.");
}
}
else
@ -104,7 +104,7 @@ namespace Server.Engines.Chat
if (user == null)
{
@from.SendMessage(32, name); // There is no player named '%1'.
from.SendMessage(32, name); // There is no player named '%1'.
}
return user;

View file

@ -62,11 +62,11 @@ namespace Server.Engines.Chat
{
if (channel.CanTalk(from))
{
channel.SendIgnorableMessage(57, @from, @from.GetColorCharacter() + @from.Username, param); // %1: %2
channel.SendIgnorableMessage(57, from, from.GetColorCharacter() + from.Username, param); // %1: %2
}
else
{
@from.SendMessage(36); // The moderator of this conference has not given you speaking privileges.
from.SendMessage(36); // The moderator of this conference has not given you speaking privileges.
}
}
@ -74,11 +74,11 @@ namespace Server.Engines.Chat
{
if (channel.CanTalk(from))
{
channel.SendIgnorableMessage(58, @from, @from.GetColorCharacter() + @from.Username, param); // %1 %2
channel.SendIgnorableMessage(58, from, from.GetColorCharacter() + from.Username, param); // %1 %2
}
else
{
@from.SendMessage(36); // The moderator of this conference has not given you speaking privileges.
from.SendMessage(36); // The moderator of this conference has not given you speaking privileges.
}
}
@ -98,18 +98,18 @@ namespace Server.Engines.Chat
if (target.IsIgnored(from))
{
@from.SendMessage(
from.SendMessage(
35,
target.Username
); // %1 has chosen to ignore you. None of your messages to them will get through.
}
else if (target.IgnorePrivateMessage)
{
@from.SendMessage(42, target.Username); // %1 has chosen to not receive private messages at the moment.
from.SendMessage(42, target.Username); // %1 has chosen to not receive private messages at the moment.
}
else
{
target.SendMessage(59, @from.Mobile, @from.GetColorCharacter() + @from.Username, text); // [%1]: %2
target.SendMessage(59, from.Mobile, from.GetColorCharacter() + from.Username, text); // [%1]: %2
}
}
@ -209,11 +209,11 @@ namespace Server.Engines.Chat
if (joined == null)
{
@from.SendMessage(33, name); // There is no conference named '%1'.
from.SendMessage(33, name); // There is no conference named '%1'.
}
else
{
joined.AddUser(@from, password);
joined.AddUser(from, password);
}
}
@ -285,11 +285,11 @@ namespace Server.Engines.Chat
if (from.IsIgnored(target))
{
@from.RemoveIgnored(target);
from.RemoveIgnored(target);
}
else
{
@from.AddIgnored(target);
from.AddIgnored(target);
}
}
@ -299,7 +299,7 @@ namespace Server.Engines.Chat
if (target != null)
{
channel.AddVoiced(target, @from);
channel.AddVoiced(target, from);
}
}
@ -309,7 +309,7 @@ namespace Server.Engines.Chat
if (target != null)
{
channel.RemoveVoiced(target, @from);
channel.RemoveVoiced(target, from);
}
}
@ -324,11 +324,11 @@ namespace Server.Engines.Chat
if (channel.IsVoiced(target))
{
channel.RemoveVoiced(target, @from);
channel.RemoveVoiced(target, from);
}
else
{
channel.AddVoiced(target, @from);
channel.AddVoiced(target, from);
}
}
@ -338,7 +338,7 @@ namespace Server.Engines.Chat
if (target != null)
{
channel.AddModerator(target, @from);
channel.AddModerator(target, from);
}
}
@ -348,7 +348,7 @@ namespace Server.Engines.Chat
if (target != null)
{
channel.RemoveModerator(target, @from);
channel.RemoveModerator(target, from);
}
}
@ -363,11 +363,11 @@ namespace Server.Engines.Chat
if (channel.IsModerator(target))
{
channel.RemoveModerator(target, @from);
channel.RemoveModerator(target, from);
}
else
{
channel.AddModerator(target, @from);
channel.AddModerator(target, from);
}
}
@ -387,11 +387,11 @@ namespace Server.Engines.Chat
if (target.Anonymous)
{
@from.SendMessage(41, target.Username); // %1 is remaining anonymous.
from.SendMessage(41, target.Username); // %1 is remaining anonymous.
}
else
{
@from.SendMessage(43, target.Username, target.Mobile.Name); // %2 is known in the lands of Britannia as %2.
from.SendMessage(43, target.Username, target.Mobile.Name); // %2 is known in the lands of Britannia as %2.
}
}
@ -401,7 +401,7 @@ namespace Server.Engines.Chat
if (target != null)
{
channel.Kick(target, @from);
channel.Kick(target, from);
}
}

View file

@ -82,7 +82,7 @@ namespace Server.Engines.Chat
{
if (Mobile.NetState != null)
{
Mobile.Send(new ChatMessagePacket(@from, number, param1, param2));
Mobile.Send(new ChatMessagePacket(from, number, param1, param2));
}
}

View file

@ -45,7 +45,7 @@ namespace Server.Engines.ConPVP
{
if (from.AccessLevel >= AccessLevel.GameMaster)
{
@from.SendGump(new PropertiesGump(@from, Arena));
from.SendGump(new PropertiesGump(from, Arena));
}
}

View file

@ -174,7 +174,7 @@ namespace Server.Engines.ConPVP
if (spell is RecallSpell)
{
@from.SendMessage("You may not cast this spell.");
from.SendMessage("You may not cast this spell.");
}
string title;
@ -295,7 +295,7 @@ namespace Server.Engines.ConPVP
if (message)
{
@from.SendMessage("The dueling ruleset prevents you from using this combat ability.");
from.SendMessage("The dueling ruleset prevents you from using this combat ability.");
}
return false;
@ -414,7 +414,7 @@ namespace Server.Engines.ConPVP
if (!(item is BaseRefreshPotion))
{
if (CantDoAnything(@from))
if (CantDoAnything(from))
{
return false;
}
@ -700,7 +700,7 @@ namespace Server.Engines.ConPVP
if (killer?.Player == true)
{
killer.AddToBackpack(new Head(m_Tournament == null ? HeadType.Duel : HeadType.Tournament, @from.Name));
killer.AddToBackpack(new Head(m_Tournament == null ? HeadType.Duel : HeadType.Tournament, from.Name));
}
}
@ -708,11 +708,11 @@ namespace Server.Engines.ConPVP
if (didntFit)
{
@from.SendLocalizedMessage(1062472); // You gather some of your belongings. The rest remain on the corpse.
from.SendLocalizedMessage(1062472); // You gather some of your belongings. The rest remain on the corpse.
}
else
{
@from.SendLocalizedMessage(1062471); // You quickly gather all of your belongings.
from.SendLocalizedMessage(1062471); // You quickly gather all of your belongings.
}
}
@ -1290,7 +1290,7 @@ namespace Server.Engines.ConPVP
if (entry != null)
{
@from.SendGump(new PropertiesGump(@from, entry));
from.SendGump(new PropertiesGump(from, entry));
}
}
}
@ -1364,7 +1364,7 @@ namespace Server.Engines.ConPVP
mob.SpeechHue,
false,
"I'm not a duelist, and quite frankly, I resent the implication.",
@from.NetState
from.NetState
);
}
else
@ -1374,7 +1374,7 @@ namespace Server.Engines.ConPVP
0x3B2,
true,
"It's probably better than you.",
@from.NetState
from.NetState
);
}
}

View file

@ -499,7 +499,7 @@ namespace Server.Engines.ConPVP
if (passTo == from)
{
@from.LocalOverheadMessage(MessageType.Regular, 0x26, false, "I can't pass to them.");
from.LocalOverheadMessage(MessageType.Regular, 0x26, false, "I can't pass to them.");
}
else if (passTeam == useTeam && passTo.PlaceInBackpack(this))
{
@ -507,12 +507,12 @@ namespace Server.Engines.ConPVP
MessageType.Regular,
0x59,
false,
$"{@from.Name} has passed you the cookies!"
$"{from.Name} has passed you the cookies!"
);
}
else
{
@from.LocalOverheadMessage(MessageType.Regular, 0x26, false, "I can't pass to them.");
from.LocalOverheadMessage(MessageType.Regular, 0x26, false, "I can't pass to them.");
}
}
}

View file

@ -1198,7 +1198,7 @@ namespace Server.Engines.ConPVP
if (team != null && team != TeamOwner)
{
m_Game.Dominate(this, @from, team);
m_Game.Dominate(this, from, team);
}
}

View file

@ -40,7 +40,7 @@ namespace Server.Engines.ConPVP
{
if (from.AccessLevel >= AccessLevel.GameMaster)
{
@from.SendGump(new PropertiesGump(@from, this));
from.SendGump(new PropertiesGump(from, this));
}
}
}

View file

@ -55,7 +55,7 @@ namespace Server.Engines.ConPVP
if (!from.Hidden || from.AccessLevel == AccessLevel.Player)
{
Effects.PlaySound(@from.Location, @from.Map, 0x20E);
Effects.PlaySound(from.Location, from.Map, 0x20E);
}
return true;
@ -65,11 +65,11 @@ namespace Server.Engines.ConPVP
{
if (from.InRange(GetWorldLocation(), 1))
{
UseGate(@from);
UseGate(from);
}
else
{
@from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that
}
}

View file

@ -337,7 +337,7 @@ namespace Server.Engines.ConPVP
0x35,
false,
"Excuse me? You are already signed up.",
@from.NetState
from.NetState
);
}
else
@ -347,7 +347,7 @@ namespace Server.Engines.ConPVP
0x22,
false,
"The tournament has already begun. You are too late to signup now.",
@from.NetState
from.NetState
);
}
}
@ -401,7 +401,7 @@ namespace Server.Engines.ConPVP
0x35,
false,
"You have not yet proven yourself a worthy dueler.",
@from.NetState
from.NetState
);
}
else
@ -411,7 +411,7 @@ namespace Server.Engines.ConPVP
0x35,
false,
$"{mob.Name} has not yet proven themselves a worthy dueler.",
@from.NetState
from.NetState
);
}
}
@ -445,7 +445,7 @@ namespace Server.Engines.ConPVP
0x35,
false,
"You have already entered this tournament.",
@from.NetState
from.NetState
);
}
else
@ -455,7 +455,7 @@ namespace Server.Engines.ConPVP
0x35,
false,
$"{mob.Name} has already entered this tournament.",
@from.NetState
from.NetState
);
}
}
@ -473,7 +473,7 @@ namespace Server.Engines.ConPVP
0x35,
false,
"You are already assigned to a duel. You must yield it before joining this tournament.",
@from.NetState
from.NetState
);
}
else
@ -483,7 +483,7 @@ namespace Server.Engines.ConPVP
0x35,
false,
$"{mobile.Name} is already assigned to a duel. They must yield it before joining this tournament.",
@from.NetState
from.NetState
);
}
@ -583,11 +583,11 @@ namespace Server.Engines.ConPVP
if (mob.Body.IsHuman)
{
mob.SayTo(@from, 1005443); // Nay, I would rather stay here and watch a nail rust.
mob.SayTo(from, 1005443); // Nay, I would rather stay here and watch a nail rust.
}
else
{
mob.SayTo(@from, 1005444); // The creature ignores your offer.
mob.SayTo(from, 1005444); // The creature ignores your offer.
}
}
else if (AcceptDuelGump.IsIgnored(mob, from) || mob.Blessed)

View file

@ -153,7 +153,7 @@ namespace Server.Engines.ConPVP
AddImage( 22, y + 5, 0x2616, 0x96C );
AddImage( 20, y + 7, 0x2616, 0x96C );
AddImage( 22, y + 7, 0x2616, 0x96C );
AddImage( 21, y + 6, 0x2616, 0x454 );*/
AddImage(x + 3, y + 4, 0x805);
@ -227,11 +227,11 @@ namespace Server.Engines.ConPVP
if (info.ButtonID == 1 && m_Page > 0)
{
@from.SendGump(new LadderGump(m_Ladder, m_Page - 1));
from.SendGump(new LadderGump(m_Ladder, m_Page - 1));
}
else if (info.ButtonID == 2 && (m_Page + 1) * 15 < Math.Min(m_List.Count, 150))
{
@from.SendGump(new LadderGump(m_Ladder, m_Page + 1));
from.SendGump(new LadderGump(m_Ladder, m_Page + 1));
}
}

View file

@ -129,7 +129,7 @@ namespace Server.Engines.ConPVP
else if (Context.Participants.Count > 2)
{
/*Container cont = m_Participant.Stakes;
if (cont != null)
cont.Delete();*/
@ -145,20 +145,20 @@ namespace Server.Engines.ConPVP
/*else if (bid == 4)
{
m_From.SendGump( new ParticipantGump( m_From, m_Context, m_Participant ) );
Container cont = m_Participant.Stakes;
if (cont != null && !cont.Deleted)
{
cont.DisplayTo( m_From );
Item[] checks = cont.FindItemsByType( typeof( BankCheck ) );
int gold = cont.TotalGold;
for ( int i = 0; i < checks.Length; ++i )
gold += ((BankCheck)checks[i]).Worth;
m_From.SendMessage( "This container has {0} item{1} and {2} stone{3}. In gold or check form there is a total of {4:D}gp.", cont.TotalItems, cont.TotalItems==1?"":"s", cont.TotalWeight, cont.TotalWeight==1?"":"s", gold );
}
}*/
@ -225,11 +225,11 @@ namespace Server.Engines.ConPVP
{
if (mob.Body.IsHuman)
{
mob.SayTo(@from, 1005443); // Nay, I would rather stay here and watch a nail rust.
mob.SayTo(from, 1005443); // Nay, I would rather stay here and watch a nail rust.
}
else
{
mob.SayTo(@from, 1005444); // The creature ignores your offer.
mob.SayTo(from, 1005444); // The creature ignores your offer.
}
}
else if (AcceptDuelGump.IsIgnored(mob, from) || mob.Blessed)

View file

@ -55,7 +55,7 @@ namespace Server.Engines.ConPVP
0x35,
false,
"Excuse me? You are already signed up.",
@from.NetState
from.NetState
);
}
else
@ -65,7 +65,7 @@ namespace Server.Engines.ConPVP
0x22,
false,
"The tournament has already begun. You are too late to signup now.",
@from.NetState
from.NetState
);
}
}

View file

@ -92,16 +92,16 @@ namespace Server.Items
if (Owner != null)
{
LabelTo(@from, "{0} -- {1}", Title, Owner.RawName);
LabelTo(from, "{0} -- {1}", Title, Owner.RawName);
}
else if (Title != null)
{
LabelTo(@from, Title);
LabelTo(from, Title);
}
if (Date != DateTime.MinValue)
{
LabelTo(@from, Date.ToString("d"));
LabelTo(from, Date.ToString("d"));
}
}

View file

@ -207,11 +207,11 @@ namespace Server.Engines.Craft
if (page == CraftPage.PickResource)
{
CreateResList(false, @from);
CreateResList(false, from);
}
else if (page == CraftPage.PickResource2)
{
CreateResList(true, @from);
CreateResList(true, from);
}
else if (context?.LastGroupIndex > -1)
{

View file

@ -312,17 +312,17 @@ namespace Server.Engines.Craft
if (consumMana)
{
@from.Mana -= Mana;
from.Mana -= Mana;
}
if (consumHits)
{
@from.Hits -= Hits;
from.Hits -= Hits;
}
if (consumStam)
{
@from.Stam -= Stam;
from.Stam -= Stam;
}
return true;
@ -416,8 +416,8 @@ namespace Server.Engines.Craft
{
for (var y = -2; y <= 2; ++y)
{
var vx = @from.X + x;
var vy = @from.Y + y;
var vx = from.X + x;
var vy = from.Y + y;
var tiles = map.Tiles.GetStaticTiles(vx, vy, true);
@ -426,7 +426,7 @@ namespace Server.Engines.Craft
var z = tiles[i].Z;
var id = tiles[i].ID;
if (z + 16 > @from.Z && @from.Z + 16 > z && Find(id, itemIDs))
if (z + 16 > from.Z && from.Z + 16 > z && Find(id, itemIDs))
{
return true;
}
@ -914,7 +914,7 @@ namespace Server.Engines.Craft
if (gainSkills) // This is a passive check. Success chance is entirely dependant on the main skill
{
@from.CheckSkill(craftSkill.SkillToMake, minSkill, maxSkill);
from.CheckSkill(craftSkill.SkillToMake, minSkill, maxSkill);
}
}
@ -1074,11 +1074,11 @@ namespace Server.Engines.Craft
{
if (tool?.Deleted == false && tool.UsesRemaining > 0)
{
@from.SendGump(new CraftGump(@from, craftSystem, tool, badCraft));
from.SendGump(new CraftGump(from, craftSystem, tool, badCraft));
}
else
{
@from.SendLocalizedMessage(badCraft);
from.SendLocalizedMessage(badCraft);
}
return;
@ -1101,15 +1101,15 @@ namespace Server.Engines.Craft
{
if (tool?.Deleted == false && tool.UsesRemaining > 0)
{
@from.SendGump(new CraftGump(@from, craftSystem, tool, checkMessage));
from.SendGump(new CraftGump(from, craftSystem, tool, checkMessage));
}
else if (checkMessage is int messageInt && messageInt > 0)
{
@from.SendLocalizedMessage(messageInt);
from.SendLocalizedMessage(messageInt);
}
else
{
@from.SendMessage(checkMessage.ToString());
from.SendMessage(checkMessage.ToString());
}
return;
@ -1136,15 +1136,15 @@ namespace Server.Engines.Craft
{
if (tool?.Deleted == false && tool.UsesRemaining > 0)
{
@from.SendGump(new CraftGump(@from, craftSystem, tool, message));
from.SendGump(new CraftGump(from, craftSystem, tool, message));
}
else if (message is int messageIn && messageIn > 0)
{
@from.SendLocalizedMessage(messageIn);
from.SendLocalizedMessage(messageIn);
}
else
{
@from.SendMessage(message.ToString());
from.SendMessage(message.ToString());
}
return;
@ -1154,7 +1154,7 @@ namespace Server.Engines.Craft
if (craftSystem is DefBlacksmithy)
{
if (@from.FindItemOnLayer(Layer.OneHanded) is AncientSmithyHammer hammer && hammer != tool)
if (from.FindItemOnLayer(Layer.OneHanded) is AncientSmithyHammer hammer && hammer != tool)
{
hammer.UsesRemaining--;
if (hammer.UsesRemaining < 1)
@ -1195,7 +1195,7 @@ namespace Server.Engines.Craft
{
if (item is ICraftable craftable)
{
endquality = craftable.OnCraft(quality, makersMark, @from, craftSystem, typeRes, tool, this, resHue);
endquality = craftable.OnCraft(quality, makersMark, from, craftSystem, typeRes, tool, this, resHue);
}
else if (item.Hue == 0)
{
@ -1219,7 +1219,7 @@ namespace Server.Engines.Craft
if (from.AccessLevel > AccessLevel.Player)
{
CommandLogging.WriteLine(
@from,
from,
"Crafting {0} with craft system {1}",
CommandLogging.Format(item),
craftSystem.GetType().Name
@ -1231,7 +1231,7 @@ namespace Server.Engines.Craft
if (num == 0)
{
num = craftSystem.PlayEndingEffect(@from, false, true, toolBroken, endquality, makersMark, this);
num = craftSystem.PlayEndingEffect(from, false, true, toolBroken, endquality, makersMark, this);
}
var queryFactionImbue = false;
@ -1261,7 +1261,7 @@ namespace Server.Engines.Craft
if (availableSilver >= def.SilverCost)
{
queryFactionImbue = Faction.IsNearType(@from, def.VendorType, 12);
queryFactionImbue = Faction.IsNearType(from, def.VendorType, 12);
}
}
}
@ -1273,11 +1273,11 @@ namespace Server.Engines.Craft
if (queryFactionImbue)
{
@from.SendGump(
from.SendGump(
new FactionImbueGump(
quality,
item,
@from,
from,
craftSystem,
tool,
num,
@ -1289,22 +1289,22 @@ namespace Server.Engines.Craft
}
else if (tool?.Deleted == false && tool.UsesRemaining > 0)
{
@from.SendGump(new CraftGump(@from, craftSystem, tool, num));
from.SendGump(new CraftGump(from, craftSystem, tool, num));
}
else if (num > 0)
{
@from.SendLocalizedMessage(num);
from.SendLocalizedMessage(num);
}
}
else if (!allRequiredSkills)
{
if (tool?.Deleted == false && tool.UsesRemaining > 0)
{
@from.SendGump(new CraftGump(@from, craftSystem, tool, 1044153));
from.SendGump(new CraftGump(from, craftSystem, tool, 1044153));
}
else
{
@from.SendLocalizedMessage(1044153); // You don't have the required skills to attempt this item.
from.SendLocalizedMessage(1044153); // You don't have the required skills to attempt this item.
}
}
else
@ -1320,15 +1320,15 @@ namespace Server.Engines.Craft
{
if (tool?.Deleted == false && tool.UsesRemaining > 0)
{
@from.SendGump(new CraftGump(@from, craftSystem, tool, message));
from.SendGump(new CraftGump(from, craftSystem, tool, message));
}
else if (message is int messageInt && messageInt > 0)
{
@from.SendLocalizedMessage(messageInt);
from.SendLocalizedMessage(messageInt);
}
else
{
@from.SendMessage(message.ToString());
from.SendMessage(message.ToString());
}
return;
@ -1351,11 +1351,11 @@ namespace Server.Engines.Craft
if (!tool.Deleted && tool.UsesRemaining > 0)
{
@from.SendGump(new CraftGump(@from, craftSystem, tool, num));
from.SendGump(new CraftGump(from, craftSystem, tool, num));
}
else if (num > 0)
{
@from.SendLocalizedMessage(num);
from.SendLocalizedMessage(num);
}
}
}

View file

@ -32,15 +32,15 @@ namespace Server.Engines.Craft
{
if (MessageNumber > 0)
{
@from.SendLocalizedMessage(MessageNumber);
from.SendLocalizedMessage(MessageNumber);
}
else if (!string.IsNullOrEmpty(MessageString))
{
@from.SendMessage(MessageString);
from.SendMessage(MessageString);
}
else
{
@from.SendLocalizedMessage(502925); // You don't have the resources required to make that item.
from.SendLocalizedMessage(502925); // You don't have the resources required to make that item.
}
}
}

View file

@ -100,7 +100,7 @@ namespace Server.Engines.Craft
// Verify if the type is in the list of the craftable item
if (CraftItems.SearchFor(type) != null)
{
realCraftItem.Craft(@from, this, typeRes, tool);
realCraftItem.Craft(from, this, typeRes, tool);
}
}

View file

@ -101,7 +101,7 @@ namespace Server.Engines.Craft
if (craftSystem is DefBlacksmithy)
{
if (@from.FindItemOnLayer(Layer.OneHanded) is AncientSmithyHammer hammer)
if (from.FindItemOnLayer(Layer.OneHanded) is AncientSmithyHammer hammer)
{
hammer.UsesRemaining--;
if (hammer.UsesRemaining < 1)

View file

@ -78,7 +78,7 @@ namespace Server.Engines.Craft
{
if (m_Deed != null)
{
return m_Deed.Check(@from);
return m_Deed.Check(from);
}
return true;

View file

@ -50,7 +50,7 @@ namespace Server.Engines.Craft
{
if (toolBroken)
{
@from.SendLocalizedMessage(1044038); // You have worn out your tool
from.SendLocalizedMessage(1044038); // You have worn out your tool
}
if (failed)

View file

@ -13,16 +13,16 @@ namespace Server.Engines.Craft
private DefBlacksmithy() : base(1, 1, 1.25) // base( 1, 2, 1.7 )
{
/*
base( MinCraftEffect, MaxCraftEffect, Delay )
MinCraftEffect : The minimum number of time the mobile will play the craft effect
MaxCraftEffect : The maximum number of time the mobile will play the craft effect
Delay : The delay between each craft effect
Example: (3, 6, 1.7) would make the mobile do the PlayCraftEffect override
function between 3 and 6 time, with a 1.7 second delay each time.
*/
}
@ -82,7 +82,7 @@ namespace Server.Engines.Craft
{
for (var y = -range; (!anvil || !forge) && y <= range; ++y)
{
var tiles = map.Tiles.GetStaticTiles(@from.X + x, @from.Y + y, true);
var tiles = map.Tiles.GetStaticTiles(from.X + x, from.Y + y, true);
for (var i = 0; (!anvil || !forge) && i < tiles.Length; ++i)
{
@ -93,8 +93,8 @@ namespace Server.Engines.Craft
if (isAnvil || isForge)
{
if (@from.Z + 16 < tiles[i].Z || tiles[i].Z + 16 < @from.Z ||
!@from.InLOS(new Point3D(@from.X + x, @from.Y + y, tiles[i].Z + tiles[i].Height / 2 + 1)))
if (from.Z + 16 < tiles[i].Z || tiles[i].Z + 16 < from.Z ||
!from.InLOS(new Point3D(from.X + x, from.Y + y, tiles[i].Z + tiles[i].Height / 2 + 1)))
{
continue;
}
@ -151,7 +151,7 @@ namespace Server.Engines.Craft
{
if (toolBroken)
{
@from.SendLocalizedMessage(1044038); // You have worn out your tool
from.SendLocalizedMessage(1044038); // You have worn out your tool
}
if (failed)
@ -187,7 +187,7 @@ namespace Server.Engines.Craft
/*
Syntax for a SIMPLE craft item
AddCraft( ObjectType, Group, MinSkill, MaxSkill, ResourceType, Amount, Message )
ObjectType : The type of the object you want to add to the build list.
Group : The group in which the object will be showed in the craft menu.
MinSkill : The minimum of skill value
@ -195,10 +195,10 @@ namespace Server.Engines.Craft
ResourceType : The type of the resource the mobile need to create the item
Amount : The amount of the ResourceType it need to create the item
Message : String or Int for Localized. The message that will be sent to the mobile, if the specified resource is missing.
Syntax for a COMPLEX craft item. A complex item is an item that need either more than
only one skill, or more than only one resource.
Coming soon....
*/

View file

@ -52,7 +52,7 @@ namespace Server.Engines.Craft
{
if (toolBroken)
{
@from.SendLocalizedMessage(1044038); // You have worn out your tool
from.SendLocalizedMessage(1044038); // You have worn out your tool
}
if (failed)

View file

@ -50,7 +50,7 @@ namespace Server.Engines.Craft
{
if (toolBroken)
{
@from.SendLocalizedMessage(1044038); // You have worn out your tool
from.SendLocalizedMessage(1044038); // You have worn out your tool
}
if (failed)
@ -380,7 +380,7 @@ namespace Server.Engines.Craft
AddRecipe( index, 308 );
ForceNonExceptional( index );
SetNeededExpansion( index, Expansion.ML );
index = AddCraft( typeof( OrnateElvenChestEastDeed ), 1044292, 1073383, 94.7, 119.7, typeof( Log ), 1044041, 40, 1044351 );
AddRecipe( index, 309 );
ForceNonExceptional( index );

View file

@ -46,7 +46,7 @@ namespace Server.Engines.Craft
{
if (toolBroken)
{
@from.SendLocalizedMessage(1044038); // You have worn out your tool
from.SendLocalizedMessage(1044038); // You have worn out your tool
}
if (failed)

View file

@ -47,7 +47,7 @@ namespace Server.Engines.Craft
{
if (toolBroken)
{
@from.SendLocalizedMessage(1044038); // You have worn out your tool
from.SendLocalizedMessage(1044038); // You have worn out your tool
}
if (failed)

View file

@ -64,7 +64,7 @@ namespace Server.Engines.Craft
{
if (toolBroken)
{
@from.SendLocalizedMessage(1044038); // You have worn out your tool
from.SendLocalizedMessage(1044038); // You have worn out your tool
}
if (failed)

View file

@ -87,7 +87,7 @@ namespace Server.Engines.Craft
{
if (toolBroken)
{
@from.SendLocalizedMessage(1044038); // You have worn out your tool
from.SendLocalizedMessage(1044038); // You have worn out your tool
}
if (!typeofSpellScroll.IsAssignableFrom(item.ItemType)) // not a scroll

View file

@ -62,7 +62,7 @@ namespace Server.Engines.Craft
{
if (toolBroken)
{
@from.SendLocalizedMessage(1044038); // You have worn out your tool
from.SendLocalizedMessage(1044038); // You have worn out your tool
}
if (failed)

View file

@ -75,7 +75,7 @@ namespace Server.Engines.Craft
{
if (toolBroken)
{
@from.SendLocalizedMessage(1044038); // You have worn out your tool
from.SendLocalizedMessage(1044038); // You have worn out your tool
}
if (failed)

View file

@ -97,7 +97,7 @@ namespace Server.Engines.Craft
{
if (toolBroken)
{
@from.SendLocalizedMessage(1044038); // You have worn out your tool
from.SendLocalizedMessage(1044038); // You have worn out your tool
}
if (failed)
@ -710,11 +710,11 @@ namespace Server.Engines.Craft
if (tool?.Deleted == false && tool.UsesRemaining > 0)
{
@from.SendGump(new CraftGump(@from, m_TrapCraft.CraftSystem, tool, message));
from.SendGump(new CraftGump(from, m_TrapCraft.CraftSystem, tool, message));
}
else if (message > 0)
{
@from.SendLocalizedMessage(message);
from.SendLocalizedMessage(message);
}
}
}

View file

@ -71,11 +71,11 @@ namespace Server.Mobiles
{
if (Ethic.Find(from) != Ethic.Evil)
{
@from.SendMessage("You may not ride this steed.");
from.SendMessage("You may not ride this steed.");
}
else
{
base.OnDoubleClick(@from);
base.OnDoubleClick(from);
}
}

View file

@ -18,7 +18,7 @@ namespace Server.Ethics.Evil
{
if (from.Familiar?.Deleted == true)
{
@from.Familiar = null;
from.Familiar = null;
}
if (from.Familiar != null)

View file

@ -18,7 +18,7 @@ namespace Server.Ethics.Evil
{
if (from.Steed?.Deleted == true)
{
@from.Steed = null;
from.Steed = null;
}
if (from.Steed != null)

View file

@ -71,11 +71,11 @@ namespace Server.Mobiles
{
if (Ethic.Find(from) != Ethic.Hero)
{
@from.SendMessage("You may not ride this steed.");
from.SendMessage("You may not ride this steed.");
}
else
{
base.OnDoubleClick(@from);
base.OnDoubleClick(from);
}
}

View file

@ -18,7 +18,7 @@ namespace Server.Ethics.Hero
{
if (from.Steed?.Deleted == true)
{
@from.Steed = null;
from.Steed = null;
}
if (from.Steed != null)

View file

@ -18,7 +18,7 @@ namespace Server.Ethics.Hero
{
if (from.Familiar?.Deleted == true)
{
@from.Familiar = null;
from.Familiar = null;
}
if (from.Familiar != null)

View file

@ -854,12 +854,12 @@ namespace Server.Factions
if (faction != null)
{
@from.SendGump(new ElectionManagementGump(faction.Election));
from.SendGump(new ElectionManagementGump(faction.Election));
}
// from.SendGump( new Gumps.PropertiesGump( from, faction.Election ) );
else
{
@from.SendMessage("That stone has no faction assigned.");
from.SendMessage("That stone has no faction assigned.");
}
}
else

View file

@ -32,18 +32,18 @@ namespace Server.Factions
{
case 0x00E4: // *i wish to access the city treasury*
{
var town = Town.FromRegion(@from.Region);
var town = Town.FromRegion(from.Region);
if (town?.IsFinance(@from) != true || !@from.Alive)
if (town?.IsFinance(from) != true || !from.Alive)
{
break;
}
if (FactionGump.Exists(@from))
if (FactionGump.Exists(from))
{
@from.SendLocalizedMessage(1042160); // You already have a faction menu open.
from.SendLocalizedMessage(1042160); // You already have a faction menu open.
}
else if (town.Owner != null && @from is PlayerMobile mobile)
else if (town.Owner != null && from is PlayerMobile mobile)
{
mobile.SendGump(new FinanceGump(mobile, town.Owner, town));
}
@ -52,71 +52,71 @@ namespace Server.Factions
}
case 0x0ED: // *i am sheriff*
{
var town = Town.FromRegion(@from.Region);
var town = Town.FromRegion(from.Region);
if (town?.IsSheriff(@from) != true || !@from.Alive)
if (town?.IsSheriff(from) != true || !from.Alive)
{
break;
}
if (FactionGump.Exists(@from))
if (FactionGump.Exists(from))
{
@from.SendLocalizedMessage(1042160); // You already have a faction menu open.
from.SendLocalizedMessage(1042160); // You already have a faction menu open.
}
else if (town.Owner != null)
{
@from.SendGump(new SheriffGump((PlayerMobile)@from, town.Owner, town));
from.SendGump(new SheriffGump((PlayerMobile)from, town.Owner, town));
}
break;
}
case 0x00EF: // *you are fired*
{
var town = Town.FromRegion(@from.Region);
var town = Town.FromRegion(from.Region);
if (town == null)
{
break;
}
if (town.IsFinance(@from) || town.IsSheriff(@from))
if (town.IsFinance(from) || town.IsSheriff(from))
{
town.BeginOrderFiring(@from);
town.BeginOrderFiring(from);
}
break;
}
case 0x00E5: // *i wish to resign as finance minister*
{
var pl = PlayerState.Find(@from);
var pl = PlayerState.Find(from);
if (pl?.Finance != null)
{
pl.Finance.Finance = null;
@from.SendLocalizedMessage(1005081); // You have been fired as Finance Minister
from.SendLocalizedMessage(1005081); // You have been fired as Finance Minister
}
break;
}
case 0x00EE: // *i wish to resign as sheriff*
{
var pl = PlayerState.Find(@from);
var pl = PlayerState.Find(from);
if (pl?.Sheriff != null)
{
pl.Sheriff.Sheriff = null;
@from.SendLocalizedMessage(1010270); // You have been fired as Sheriff
from.SendLocalizedMessage(1010270); // You have been fired as Sheriff
}
break;
}
case 0x00E9: // *what is my faction term status*
{
var pl = PlayerState.Find(@from);
var pl = PlayerState.Find(from);
if (pl?.IsLeaving == true)
{
if (Faction.CheckLeaveTimer(@from))
if (Faction.CheckLeaveTimer(from))
{
break;
}
@ -125,7 +125,7 @@ namespace Server.Factions
if (remaining.TotalDays >= 1)
{
@from.SendLocalizedMessage(
from.SendLocalizedMessage(
1042743,
remaining.TotalDays
.ToString("N0")
@ -133,7 +133,7 @@ namespace Server.Factions
}
else if (remaining.TotalHours >= 1)
{
@from.SendLocalizedMessage(
from.SendLocalizedMessage(
1042741,
remaining.TotalHours
.ToString("N0")
@ -141,43 +141,43 @@ namespace Server.Factions
}
else
{
@from.SendLocalizedMessage(
from.SendLocalizedMessage(
1042742
); // Your term of service will come to an end in less than one hour.
}
}
else if (pl != null)
{
@from.SendLocalizedMessage(1042233); // You are not in the process of quitting the faction.
from.SendLocalizedMessage(1042233); // You are not in the process of quitting the faction.
}
break;
}
case 0x00EA: // *message faction*
{
var faction = Faction.Find(@from);
var faction = Faction.Find(from);
if (faction?.IsCommander(@from) != true)
if (faction?.IsCommander(from) != true)
{
break;
}
if (@from.AccessLevel == AccessLevel.Player && !faction.FactionMessageReady)
if (from.AccessLevel == AccessLevel.Player && !faction.FactionMessageReady)
{
@from.SendLocalizedMessage(
from.SendLocalizedMessage(
1010264
); // The required time has not yet passed since the last message was sent
}
else
{
faction.BeginBroadcast(@from);
faction.BeginBroadcast(from);
}
break;
}
case 0x00EC: // *showscore*
{
var pl = PlayerState.Find(@from);
var pl = PlayerState.Find(from);
if (pl != null)
{
@ -188,7 +188,7 @@ namespace Server.Factions
}
case 0x0178: // i honor your leadership
{
Faction.Find(@from)?.BeginHonorLeadership(@from);
Faction.Find(from)?.BeginHonorLeadership(from);
break;
}
}

View file

@ -216,7 +216,7 @@ namespace Server.Factions
}
else
{
@from.SendMessage("That is not a {0}!", type);
from.SendMessage("That is not a {0}!", type);
}
}

View file

@ -180,7 +180,7 @@ namespace Server.Factions
if (bid >= 0 && bid < m_Election.Candidates.Count)
{
@from.SendGump(new ElectionManagementGump(m_Election, m_Election.Candidates[bid]));
from.SendGump(new ElectionManagementGump(m_Election, m_Election.Candidates[bid]));
}
}
}

View file

@ -42,11 +42,11 @@ namespace Server.Factions
if (!from.InRange(GetWorldLocation(), 2))
{
@from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
}
else if (FactionGump.Exists(from))
{
@from.SendLocalizedMessage(1042160); // You already have a faction menu open.
from.SendLocalizedMessage(1042160); // You already have a faction menu open.
}
else if (Faction.Find(from) == null && from is PlayerMobile mobile)
{

View file

@ -23,7 +23,7 @@ namespace Server
if (from.Body.IsHuman && !from.Mounted)
{
@from.Animate(34, 5, 1, true, false, 0);
from.Animate(34, 5, 1, true, false, 0);
}
var amount = Utility.Dice(3, 3, 3);

View file

@ -26,7 +26,7 @@ namespace Server
if (from.Body.IsHuman)
{
@from.Animate(34, 5, 1, true, false, 0);
from.Animate(34, 5, 1, true, false, 0);
}
from.FixedParticles(0x375A, 10, 15, 5011, EffectLayer.Head);

View file

@ -27,7 +27,7 @@ namespace Server
foreach (var mob in from.GetMobilesInRange(8))
{
if (mob.Player && !mob.Alive && @from.InLOS(mob))
if (mob.Player && !mob.Alive && from.InLOS(mob))
{
if (Faction.Find(mob) != ourFaction)
{
@ -36,11 +36,11 @@ namespace Server
var house = BaseHouse.FindHouseAt(mob);
if (house?.IsFriend(@from) != false || house.IsFriend(mob))
if (house?.IsFriend(from) != false || house.IsFriend(mob))
{
Faction.ClearSkillLoss(mob);
mob.SendGump(new ResurrectGump(mob, @from));
mob.SendGump(new ResurrectGump(mob, from));
used = true;
}
}

View file

@ -178,11 +178,11 @@ namespace Server.Factions
{
if (m_Corrupted.Definition.SigilControl.Number > 0)
{
LabelTo(@from, m_Corrupted.Definition.SigilControl.Number);
LabelTo(from, m_Corrupted.Definition.SigilControl.Number);
}
else if (m_Corrupted.Definition.SigilControl.String != null)
{
LabelTo(@from, m_Corrupted.Definition.SigilControl.String);
LabelTo(from, m_Corrupted.Definition.SigilControl.String);
}
}
else
@ -192,15 +192,15 @@ namespace Server.Factions
if (IsCorrupting)
{
LabelTo(@from, 1042257); // This sigil is in the process of being corrupted.
LabelTo(from, 1042257); // This sigil is in the process of being corrupted.
}
else if (IsPurifying)
{
LabelTo(@from, 1042258); // This sigil has been recently corrupted, and is undergoing purification.
LabelTo(from, 1042258); // This sigil has been recently corrupted, and is undergoing purification.
}
else
{
LabelTo(@from, 1042259); // This sigil is not in the process of being corrupted.
LabelTo(from, 1042259); // This sigil is not in the process of being corrupted.
}
}

View file

@ -47,15 +47,15 @@ namespace Server.Factions
if (m_Town.Owner == null || from.AccessLevel < AccessLevel.GameMaster && faction != m_Town.Owner)
{
@from.SendLocalizedMessage(1010332); // Your faction does not control this town
from.SendLocalizedMessage(1010332); // Your faction does not control this town
}
else if (!m_Town.Owner.IsCommander(from))
{
@from.SendLocalizedMessage(1005242); // Only faction Leaders can use townstones
from.SendLocalizedMessage(1005242); // Only faction Leaders can use townstones
}
else if (FactionGump.Exists(from))
{
@from.SendLocalizedMessage(1042160); // You already have a faction menu open.
from.SendLocalizedMessage(1042160); // You already have a faction menu open.
}
else if (from is PlayerMobile mobile)
{

View file

@ -96,14 +96,14 @@ namespace Server.Factions
Placer.SendMessage(
"You have earned {0} silver pieces because {1} fell for your trap.",
silverGiven,
@from.Name
from.Name
);
}
else
{
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

@ -71,21 +71,21 @@ namespace Server.Factions
if (pl == null)
{
@from.SendLocalizedMessage(1010366); // You cannot mount a faction war horse!
from.SendLocalizedMessage(1010366); // You cannot mount a faction war horse!
}
else if (pl.Faction != Faction)
{
@from.SendLocalizedMessage(1010367); // You cannot ride an opposing faction's war horse!
from.SendLocalizedMessage(1010367); // You cannot ride an opposing faction's war horse!
}
else if (pl.Rank.Rank < 2)
{
@from.SendLocalizedMessage(
from.SendLocalizedMessage(
1010368
); // You must achieve a faction rank of at least two before riding a war horse!
}
else
{
base.OnDoubleClick(@from);
base.OnDoubleClick(from);
}
}

View file

@ -41,12 +41,12 @@ namespace Server.Factions
MessageType.Regular,
0x3B2,
1042201,
@from.NetState
from.NetState
); // You are not in my faction, I cannot sell you a horse!
}
else if (FactionGump.Exists(from))
{
@from.SendLocalizedMessage(1042160); // You already have a faction menu open.
from.SendLocalizedMessage(1042160); // You already have a faction menu open.
}
else if (from is PlayerMobile mobile)
{

View file

@ -85,11 +85,11 @@ namespace Server.Engines.Harvest
{
if (message.Number > 0)
{
@from.SendLocalizedMessage(message.Number);
from.SendLocalizedMessage(message.Number);
}
else
{
@from.SendMessage(message);
from.SendMessage(message);
}
}

View file

@ -19,7 +19,7 @@ namespace Server.Engines.Harvest
if (wornOut)
{
@from.SendLocalizedMessage(1044038); // You have worn out your tool!
from.SendLocalizedMessage(1044038); // You have worn out your tool!
}
return !wornOut;
@ -36,7 +36,7 @@ namespace Server.Engines.Harvest
if (!inRange)
{
def.SendMessageTo(@from, timed ? def.TimedOutOfRangeMessage : def.OutOfRangeMessage);
def.SendMessageTo(from, timed ? def.TimedOutOfRangeMessage : def.OutOfRangeMessage);
}
return inRange;
@ -49,7 +49,7 @@ namespace Server.Engines.Harvest
if (!available)
{
def.SendMessageTo(@from, timed ? def.DoubleHarvestMessage : def.NoResourcesMessage);
def.SendMessageTo(from, timed ? def.DoubleHarvestMessage : def.NoResourcesMessage);
}
return available;
@ -132,7 +132,7 @@ namespace Server.Engines.Harvest
if (vein != null)
{
vein = MutateVein(@from, tool, def, bank, toHarvest, vein);
vein = MutateVein(from, tool, def, bank, toHarvest, vein);
}
if (vein == null)
@ -155,7 +155,7 @@ namespace Server.Engines.Harvest
if (type != null)
{
type = MutateType(type, @from, tool, def, map, loc, resource);
type = MutateType(type, from, tool, def, map, loc, resource);
}
if (type != null)
@ -220,7 +220,7 @@ namespace Server.Engines.Harvest
if (Give(from, bonusItem, true)
) // Bonuses always allow placing at feet, even if pack is full irregrdless of def
{
bonus.SendSuccessTo(@from);
bonus.SendSuccessTo(from);
}
else
{
@ -249,7 +249,7 @@ namespace Server.Engines.Harvest
if (type == null)
{
def.SendMessageTo(@from, def.FailMessage);
def.SendMessageTo(from, def.FailMessage);
}
OnHarvestFinished(from, tool, def, vein, bank, resource, toHarvest);
@ -414,7 +414,7 @@ namespace Server.Engines.Harvest
if (!from.Mounted)
{
@from.Animate(def.EffectActions.RandomElement(), 5, 1, true, false, 0);
from.Animate(def.EffectActions.RandomElement(), 5, 1, true, false, 0);
}
}

View file

@ -28,7 +28,7 @@ namespace Server.Engines.Harvest
if (itemID == 0xED3 || itemID == 0xEDF || itemID == 0xEE0 || itemID == 0xEE1 || itemID == 0xEE2 ||
itemID == 0xEE8)
{
if (@from is PlayerMobile player)
if (from is PlayerMobile player)
{
var qs = player.Quest;
if (!(qs is WitchApprenticeQuest))
@ -61,11 +61,11 @@ namespace Server.Engines.Harvest
if (!item.IsChildOf(from.Backpack))
{
@from.SendLocalizedMessage(1062334); // This item must be in your backpack to be used.
from.SendLocalizedMessage(1062334); // This item must be in your backpack to be used.
}
else if (obj.Axe(from, axe))
{
@from.PlaySound(0x13E);
from.PlaySound(0x13E);
}
}
else if (m_System is Lumberjacking && targeted is ICarvable carvable)
@ -107,7 +107,7 @@ namespace Server.Engines.Harvest
{
if (container is TrappableContainer trappableContainer)
{
trappableContainer.ExecuteTrap(@from);
trappableContainer.ExecuteTrap(from);
}
container.Destroy();

View file

@ -207,7 +207,7 @@ namespace Server.Engines.Harvest
if (type == typeof(MessageInABottle))
{
return new MessageInABottle(@from.Map == Map.Felucca ? Map.Felucca : Map.Trammel);
return new MessageInABottle(from.Map == Map.Felucca ? Map.Felucca : Map.Trammel);
}
var pack = from.Backpack;
@ -468,11 +468,11 @@ namespace Server.Engines.Harvest
if (number == 1043297 || ns.HighSeas)
{
@from.SendLocalizedMessage(number, name);
from.SendLocalizedMessage(number, name);
}
else
{
@from.SendLocalizedMessage(number, true, name);
from.SendLocalizedMessage(number, true, name);
}
}
}
@ -489,7 +489,7 @@ namespace Server.Engines.Harvest
{
if (Core.ML)
{
@from.RevealingAction();
from.RevealingAction();
}
Effects.SendLocationEffect(loc, map, 0x352D, 16, 4);
@ -508,7 +508,7 @@ namespace Server.Engines.Harvest
if (Core.ML)
{
@from.RevealingAction();
from.RevealingAction();
}
}

View file

@ -162,20 +162,20 @@ namespace Server.Engines.Harvest
MessageType.Regular,
0x3B2,
500450,
@from.NetState
from.NetState
); // You can only skin dead creatures.
}
else if (toHarvest is Item item)
{
item.LabelTo(@from, 500464); // Use this on corpses to carve away meat and hide
item.LabelTo(from, 500464); // Use this on corpses to carve away meat and hide
}
else if (toHarvest is StaticTarget || toHarvest is LandTarget)
{
@from.SendLocalizedMessage(500489); // You can't use an axe on that.
from.SendLocalizedMessage(500489); // You can't use an axe on that.
}
else
{
@from.SendLocalizedMessage(1005213); // You can't do that
from.SendLocalizedMessage(1005213); // You can't do that
}
}
@ -185,7 +185,7 @@ namespace Server.Engines.Harvest
if (Core.ML)
{
@from.RevealingAction();
from.RevealingAction();
}
}

View file

@ -283,7 +283,7 @@ namespace Server.Engines.Harvest
{
if (def != OreAndStone)
{
return base.GetResourceType(@from, tool, def, map, loc, resource);
return base.GetResourceType(from, tool, def, map, loc, resource);
}
if (from.Skills.Mining.Base >= 100.0 && from is PlayerMobile pm && pm.StoneMining && pm.ToggleMiningStone
@ -321,11 +321,11 @@ namespace Server.Engines.Harvest
{
if (item is BaseGranite)
{
@from.SendLocalizedMessage(1044606); // You carefully extract some workable stone from the ore vein!
from.SendLocalizedMessage(1044606); // You carefully extract some workable stone from the ore vein!
}
else
{
base.SendSuccessTo(@from, item, resource);
base.SendSuccessTo(from, item, resource);
}
}
@ -389,7 +389,7 @@ namespace Server.Engines.Harvest
{
try
{
var map = @from.Map;
var map = from.Map;
if (map == null)
{
@ -402,31 +402,31 @@ namespace Server.Engines.Harvest
for (var i = 0; i < m_Offsets.Length; i += 2)
{
var x = @from.X + m_Offsets[(offset + i) % m_Offsets.Length];
var y = @from.Y + m_Offsets[(offset + i + 1) % m_Offsets.Length];
var x = from.X + m_Offsets[(offset + i) % m_Offsets.Length];
var y = from.Y + m_Offsets[(offset + i + 1) % m_Offsets.Length];
if (map.CanSpawnMobile(x, y, @from.Z))
if (map.CanSpawnMobile(x, y, from.Z))
{
spawned.OnBeforeSpawn(new Point3D(x, y, @from.Z), map);
spawned.MoveToWorld(new Point3D(x, y, @from.Z), map);
spawned.Combatant = @from;
spawned.OnBeforeSpawn(new Point3D(x, y, from.Z), map);
spawned.MoveToWorld(new Point3D(x, y, from.Z), map);
spawned.Combatant = from;
return;
}
var z = map.GetAverageZ(x, y);
if (Math.Abs(z - @from.Z) < 10 && map.CanSpawnMobile(x, y, z))
if (Math.Abs(z - from.Z) < 10 && map.CanSpawnMobile(x, y, z))
{
spawned.OnBeforeSpawn(new Point3D(x, y, z), map);
spawned.MoveToWorld(new Point3D(x, y, z), map);
spawned.Combatant = @from;
spawned.Combatant = from;
return;
}
}
spawned.OnBeforeSpawn(@from.Location, @from.Map);
spawned.MoveToWorld(@from.Location, @from.Map);
spawned.Combatant = @from;
spawned.OnBeforeSpawn(from.Location, from.Map);
spawned.MoveToWorld(from.Location, from.Map);
spawned.Combatant = from;
}
}
catch
@ -454,7 +454,7 @@ namespace Server.Engines.Harvest
if (Core.ML)
{
@from.RevealingAction();
from.RevealingAction();
}
}
@ -462,11 +462,11 @@ namespace Server.Engines.Harvest
{
if (toHarvest is LandTarget)
{
@from.SendLocalizedMessage(501862); // You can't mine there.
from.SendLocalizedMessage(501862); // You can't mine there.
}
else
{
@from.SendLocalizedMessage(501863); // You can't mine that.
from.SendLocalizedMessage(501863); // You can't mine that.
}
}
}

View file

@ -419,7 +419,7 @@ namespace Server.Engines.Help
{
if (from.Region.IsPartOf<JailRegion>())
{
@from.SendLocalizedMessage(
from.SendLocalizedMessage(
1114345,
"",
0x35
@ -427,11 +427,11 @@ namespace Server.Engines.Help
}
else if (from.Region.IsPartOf("Haven Island"))
{
@from.SendLocalizedMessage(1041529); // You're already in Haven
from.SendLocalizedMessage(1041529); // You're already in Haven
}
else
{
@from.MoveToWorld(new Point3D(3503, 2574, 14), Map.Trammel);
from.MoveToWorld(new Point3D(3503, 2574, 14), Map.Trammel);
}
}
@ -441,7 +441,7 @@ namespace Server.Engines.Help
if (type != (PageType)(-1) && PageQueue.CheckAllowedToPage(from))
{
@from.SendGump(new PagePromptGump(@from, type));
from.SendGump(new PagePromptGump(from, type));
}
}
}

View file

@ -115,7 +115,7 @@ namespace Server.Engines.Help
{
if (m_Page - 1 >= 0)
{
@from.SendGump(new SpeechLogGump(m_Player, m_Log, m_Page - 1));
from.SendGump(new SpeechLogGump(m_Player, m_Log, m_Page - 1));
}
break;
@ -124,7 +124,7 @@ namespace Server.Engines.Help
{
if ((m_Page + 1) * MaxEntriesPerPage < m_Log.Count)
{
@from.SendGump(new SpeechLogGump(m_Player, m_Log, m_Page + 1));
from.SendGump(new SpeechLogGump(m_Player, m_Log, m_Page + 1));
}
break;

View file

@ -153,37 +153,37 @@ namespace Server.Engines.MLQuests.Gumps
if (from.Race == targetRace)
{
@from.SendLocalizedMessage(1111918); // You are already that race.
from.SendLocalizedMessage(1111918); // You are already that race.
}
else if (!MondainsLegacy.CheckML(from, false))
{
@from.SendLocalizedMessage(1073651); // You must have Mondain's Legacy before proceeding...
from.SendLocalizedMessage(1073651); // You must have Mondain's Legacy before proceeding...
}
else if (!from.Alive)
{
@from.SendLocalizedMessage(1073646); // Only the living may proceed...
from.SendLocalizedMessage(1073646); // Only the living may proceed...
}
else if (from.Mounted)
{
@from.SendLocalizedMessage(1073647); // You may not continue while mounted...
from.SendLocalizedMessage(1073647); // You may not continue while mounted...
}
else if (!from.CanBeginAction<PolymorphSpell>() || DisguiseTimers.IsDisguised(from) ||
AnimalForm.UnderTransformation(from) || !from.CanBeginAction<IncognitoSpell>() ||
from.IsBodyMod) // TODO: Does this cover everything?
{
@from.SendLocalizedMessage(1073648); // You may only proceed while in your original state...
from.SendLocalizedMessage(1073648); // You may only proceed while in your original state...
}
else if (from.Spell?.IsCasting == true)
{
@from.SendLocalizedMessage(1073649); // One may not proceed while embracing magic...
from.SendLocalizedMessage(1073649); // One may not proceed while embracing magic...
}
else if (from.Poisoned)
{
@from.SendLocalizedMessage(1073652); // You must be healthy to proceed...
from.SendLocalizedMessage(1073652); // You must be healthy to proceed...
}
else if (IsWearingEquipment(from))
{
@from.SendLocalizedMessage(1073650); // To proceed you must be unburdened by equipment...
from.SendLocalizedMessage(1073650); // To proceed you must be unburdened by equipment...
}
else
{

View file

@ -26,7 +26,7 @@ namespace Server.Items
if (ret)
{
DestroyItem(@from);
DestroyItem(from);
}
return ret;
@ -38,7 +38,7 @@ namespace Server.Items
if (ret)
{
DestroyItem(@from);
DestroyItem(from);
}
return ret;
@ -50,7 +50,7 @@ namespace Server.Items
if (ret && Parent != from.Backpack)
{
DestroyItem(@from);
DestroyItem(from);
}
return ret;

View file

@ -43,11 +43,11 @@ namespace Server.Engines.MLQuests.Items
{
if (!from.InRange(GetWorldLocation(), 2))
{
@from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
}
else if (!IsChildOf(from.Backpack))
{
@from.SendLocalizedMessage(1042593); // That is not in your backpack.
from.SendLocalizedMessage(1042593); // That is not in your backpack.
}
else if (MLQuestSystem.Enabled && CanGiveMLQuest && from is PlayerMobile mobile)
{
@ -121,11 +121,11 @@ namespace Server.Engines.MLQuests.Items
{
if (!from.InRange(GetWorldLocation(), 2))
{
@from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
}
else if (!IsChildOf(from.Backpack))
{
@from.SendLocalizedMessage(1042593); // That is not in your backpack.
from.SendLocalizedMessage(1042593); // That is not in your backpack.
}
else if (MLQuestSystem.Enabled && CanGiveMLQuest && from is PlayerMobile mobile)
{

View file

@ -90,11 +90,11 @@ namespace Server.Engines.MLQuests.Mobiles
if (!from.Hidden && !from.HasGump<RaceChangeConfirmGump>() &&
!RaceChangeConfirmGump.IsPending(from.NetState) && CanTalkTo(from))
{
TalkTo(@from as PlayerMobile);
TalkTo(from as PlayerMobile);
}
else if (fromClick)
{
DenyTalk(@from);
DenyTalk(from);
}
}

View file

@ -154,15 +154,15 @@ namespace Server.Engines.PartySystem
if (m == from)
{
p.SendPublicMessage(@from, "I killed myself !!");
p.SendPublicMessage(from, "I killed myself !!");
}
else if (m == null)
{
p.SendPublicMessage(@from, "I was killed !!");
p.SendPublicMessage(from, "I was killed !!");
}
else
{
p.SendPublicMessage(@from, $"I was killed by {m.Name} !!");
p.SendPublicMessage(from, $"I was killed by {m.Name} !!");
}
}
}
@ -173,11 +173,11 @@ namespace Server.Engines.PartySystem
if (p != null)
{
new RejoinTimer(@from).Start();
new RejoinTimer(from).Start();
}
else
{
@from.Party = null;
from.Party = null;
}
}
@ -348,7 +348,7 @@ namespace Server.Engines.PartySystem
if (p == null)
{
@from.Party = p = new Party(@from);
from.Party = p = new Party(from);
}
if (!p.Candidates.Contains(target))
@ -405,7 +405,7 @@ namespace Server.Engines.PartySystem
if (mob.Party != this)
{
m_Listeners[i].SendMessage("[{0}]: {1}", @from.Name, text);
m_Listeners[i].SendMessage("[{0}]: {1}", from.Name, text);
}
}
@ -422,7 +422,7 @@ namespace Server.Engines.PartySystem
if (mob.Party != this)
{
m_Listeners[i].SendMessage("[{0}]->[{1}]: {2}", @from.Name, to.Name, text);
m_Listeners[i].SendMessage("[{0}]->[{1}]: {2}", from.Name, to.Name, text);
}
}
@ -444,13 +444,13 @@ namespace Server.Engines.PartySystem
{
p = Packet.Acquire(
new UnicodeMessage(
@from.Serial,
@from.Body,
from.Serial,
from.Body,
MessageType.Regular,
@from.SpeechHue,
from.SpeechHue,
3,
@from.Language,
@from.Name,
from.Language,
from.Name,
text
)
);

View file

@ -13,15 +13,15 @@ namespace Server.Engines.PartySystem
if (p != null && p.Leader != from)
{
@from.SendLocalizedMessage(1005453); // You may only add members to the party if you are the leader.
from.SendLocalizedMessage(1005453); // You may only add members to the party if you are the leader.
}
else if (p != null && p.Members.Count + p.Candidates.Count >= Party.Capacity)
{
@from.SendLocalizedMessage(1008095); // You may only have 10 in your party (this includes candidates).
from.SendLocalizedMessage(1008095); // You may only have 10 in your party (this includes candidates).
}
else
{
@from.Target = new AddPartyTarget(@from);
from.Target = new AddPartyTarget(from);
}
}
@ -57,11 +57,11 @@ namespace Server.Engines.PartySystem
if (p?.Contains(target) == true)
{
p.SendPrivateMessage(@from, target, text);
p.SendPrivateMessage(from, target, text);
}
else
{
@from.SendLocalizedMessage(3000211); // You are not in a party.
from.SendLocalizedMessage(3000211); // You are not in a party.
}
}
@ -76,11 +76,11 @@ namespace Server.Engines.PartySystem
if (p != null)
{
p.SendPublicMessage(@from, text);
p.SendPublicMessage(from, text);
}
else
{
@from.SendLocalizedMessage(3000211); // You are not in a party.
from.SendLocalizedMessage(3000211); // You are not in a party.
}
}
@ -102,11 +102,11 @@ namespace Server.Engines.PartySystem
if (canLoot)
{
@from.SendLocalizedMessage(1005447); // You have chosen to allow your party to loot your corpse.
from.SendLocalizedMessage(1005447); // You have chosen to allow your party to loot your corpse.
}
else
{
@from.SendLocalizedMessage(
from.SendLocalizedMessage(
1005448
); // You have chosen to prevent your party from looting your corpse.
}
@ -123,11 +123,11 @@ namespace Server.Engines.PartySystem
if (leader == null || p?.Candidates.Contains(from) != true)
{
@from.SendLocalizedMessage(3000222); // No one has invited you to be in a party.
from.SendLocalizedMessage(3000222); // No one has invited you to be in a party.
}
else if (p.Members.Count + p.Candidates.Count <= Party.Capacity)
{
p.OnAccept(@from);
p.OnAccept(from);
}
}
@ -140,11 +140,11 @@ namespace Server.Engines.PartySystem
if (leader == null || p?.Candidates.Contains(from) != true)
{
@from.SendLocalizedMessage(3000222); // No one has invited you to be in a party.
from.SendLocalizedMessage(3000222); // No one has invited you to be in a party.
}
else
{
p.OnDecline(@from, leader);
p.OnDecline(from, leader);
}
}
}

View file

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

View file

@ -29,7 +29,7 @@ namespace Server.Items
{
if (item != this)
{
return base.CheckItemUse(@from, item);
return base.CheckItemUse(from, item);
}
if (from != RootParent)

View file

@ -178,19 +178,19 @@ namespace Server.Engines.Plants
{
if (m_PlantStatus >= PlantStatus.DeadTwigs)
{
LabelTo(@from, LabelNumber);
LabelTo(from, LabelNumber);
}
else if (m_PlantStatus >= PlantStatus.DecorativePlant)
{
LabelTo(@from, 1061924); // a decorative plant
LabelTo(from, 1061924); // a decorative plant
}
else if (m_PlantStatus >= PlantStatus.FullGrownPlant)
{
LabelTo(@from, PlantTypeInfo.GetInfo(m_PlantType).Name);
LabelTo(from, PlantTypeInfo.GetInfo(m_PlantType).Name);
}
else
{
LabelTo(@from, 1029913); // plant bowl
LabelTo(from, 1029913); // plant bowl
}
}

View file

@ -12,7 +12,7 @@ namespace Server.Engines.Plants
{
if (!m_Plant.Deleted && from.InRange(m_Plant.GetWorldLocation(), 3) && targeted is Item item)
{
m_Plant.Pour(@from, item);
m_Plant.Pour(from, item);
}
}
@ -23,7 +23,7 @@ namespace Server.Engines.Plants
{
if (from.HasGump<MainPlantGump>())
{
@from.CloseGump<MainPlantGump>();
from.CloseGump<MainPlantGump>();
}
from.SendGump(new MainPlantGump(m_Plant));

View file

@ -88,7 +88,7 @@ namespace Server.Engines.Plants
m_Plant.PlantStatus != PlantStatus.BowlOfDirt && from.InRange(m_Plant.GetWorldLocation(), 3) &&
m_Plant.IsUsableBy(from))
{
@from.SendGump(new ReproductionGump(m_Plant));
from.SendGump(new ReproductionGump(m_Plant));
}
}
}

View file

@ -158,7 +158,7 @@ namespace Server.Engines.Plants
{
if (m_Plant.PlantStatus == PlantStatus.Stage9)
{
@from.SendGump(new SetToDecorativeGump(m_Plant));
from.SendGump(new SetToDecorativeGump(m_Plant));
}
break;
@ -225,11 +225,11 @@ namespace Server.Engines.Plants
{
if (m_Plant.IsCrossable)
{
m_Plant.LabelTo(@from, 1053056); // This plant has no resources to gather!
m_Plant.LabelTo(from, 1053056); // This plant has no resources to gather!
}
else
{
m_Plant.LabelTo(@from, 1053055); // Mutated plants do not produce resources!
m_Plant.LabelTo(from, 1053055); // Mutated plants do not produce resources!
}
}
else if (system.AvailableResources == 0)

View file

@ -224,15 +224,15 @@ namespace Server.Engines.Plants
if (targeted is PlantItem plant)
{
plant.PlantSeed(@from, m_Seed);
plant.PlantSeed(from, m_Seed);
}
else if (targeted is Item item)
{
item.LabelTo(@from, 1061919); // You must use a seed on a bowl of dirt!
item.LabelTo(from, 1061919); // You must use a seed on a bowl of dirt!
}
else
{
@from.SendLocalizedMessage(1061919); // You must use a seed on a bowl of dirt!
from.SendLocalizedMessage(1061919); // You must use a seed on a bowl of dirt!
}
}
}

View file

@ -43,7 +43,7 @@ namespace Server.Engines.Quests.Ambitious
if (redSolen)
{
return @from is RedSolenQueen;
return from is RedSolenQueen;
}
return from is BlackSolenQueen;

View file

@ -161,15 +161,15 @@ namespace Server.Engines.Quests.Collector
{
if (m_Quantity < m_Partial)
{
LabelTo(@from, 1055137); // a section of an obsidian statue
LabelTo(from, 1055137); // a section of an obsidian statue
}
else if (m_Quantity < m_Completed)
{
LabelTo(@from, 1055138); // a partially reconstructed obsidian statue
LabelTo(from, 1055138); // a partially reconstructed obsidian statue
}
else
{
LabelTo(@from, 1055139, m_StatueName); // an obsidian statue of ~1_STATUE_NAME~
LabelTo(from, 1055139, m_StatueName); // an obsidian statue of ~1_STATUE_NAME~
}
}
@ -189,7 +189,7 @@ namespace Server.Engines.Quests.Collector
{
if (!IsChildOf(from.Backpack))
{
@from.Send(
from.Send(
new MessageLocalized(
Serial,
ItemID,
@ -204,7 +204,7 @@ namespace Server.Engines.Quests.Collector
}
else
{
@from.Target = new InternalTarget(this);
from.Target = new InternalTarget(this);
}
}
}
@ -243,7 +243,7 @@ namespace Server.Engines.Quests.Collector
{
for (var i = 0; i < m_Obsidian.Quantity - 1; i++)
{
@from.AddToBackpack(new Obsidian());
from.AddToBackpack(new Obsidian());
}
m_Obsidian.Quantity = 1;
@ -283,10 +283,10 @@ namespace Server.Engines.Quests.Collector
if (targObsidian.Quantity >= m_Completed)
{
targObsidian.StatueName = RandomName(@from);
targObsidian.StatueName = RandomName(from);
}
@from.Send(
from.Send(
new AsciiMessage(
targObsidian.Serial,
targObsidian.ItemID,

View file

@ -134,7 +134,7 @@ namespace Server.Items
{
foreach (var entry in moongates.Entries)
{
var dist = @from.GetDistanceToSqrt(entry.Location);
var dist = from.GetDistanceToSqrt(entry.Location);
if (moongateDistance > dist)
{
closestMoongate = entry.Location;
@ -149,7 +149,7 @@ namespace Server.Items
{
foreach (var p in banks)
{
var dist = @from.GetDistanceToSqrt(p);
var dist = from.GetDistanceToSqrt(p);
if (bankDistance > dist)
{
closestBank = p;
@ -165,11 +165,11 @@ namespace Server.Items
}
else if (moongateDistance > m_LongDistance)
{
moonMsg = 1046449 + (int)@from.GetDirectionTo(closestMoongate); // A moongate is * from here
moonMsg = 1046449 + (int)from.GetDirectionTo(closestMoongate); // A moongate is * from here
}
else if (moongateDistance > m_ShortDistance)
{
moonMsg = 1048010 + (int)@from.GetDirectionTo(closestMoongate); // There is a Moongate * of here.
moonMsg = 1048010 + (int)from.GetDirectionTo(closestMoongate); // There is a Moongate * of here.
}
else
{
@ -185,11 +185,11 @@ namespace Server.Items
}
else if (bankDistance > m_LongDistance)
{
bankMsg = 1046462 + (int)@from.GetDirectionTo(closestBank); // A town is * from here
bankMsg = 1046462 + (int)from.GetDirectionTo(closestBank); // A town is * from here
}
else if (bankDistance > m_ShortDistance)
{
bankMsg = 1048002 + (int)@from.GetDirectionTo(closestBank); // There is a city Bank * of here.
bankMsg = 1048002 + (int)from.GetDirectionTo(closestBank); // There is a city Bank * of here.
}
else
{

View file

@ -96,7 +96,7 @@ namespace Server.Engines.Quests.Necro
qs.IsObjectiveInProgress(typeof(FindWellOfTearsObjective)) ||
qs.IsObjectiveInProgress(typeof(UseCallingScrollObjective)))
{
return @from.Backpack?.FindItemByType<KronusScroll>() == null;
return from.Backpack?.FindItemByType<KronusScroll>() == null;
}
}

View file

@ -125,7 +125,7 @@ namespace Server.Engines.Quests.Necro
if (from.Alive)
{
if (@from is PlayerMobile pm)
if (from is PlayerMobile pm)
{
var qs = pm.Quest;

Some files were not shown because too many files have changed in this diff Show more