This reverts commit 179cb50557.
This commit is contained in:
parent
179cb50557
commit
c2ecc76457
588 changed files with 16260 additions and 10926 deletions
4
GOALS.md
4
GOALS.md
|
|
@ -7,8 +7,8 @@
|
|||
- [X] Support configuration via a `modernuo.json` file
|
||||
|
||||
### Networking
|
||||
- [X] Replace Packet classes with functions
|
||||
- [X] Improve asynchronous socket handling using Pipes
|
||||
- [ ] Replace Packet classes with functions
|
||||
- [ ] Improve asynchronous socket handling using Pipes
|
||||
- [ ] Improve socket handling (2-5x) and event loop using libuv
|
||||
|
||||
### Administration
|
||||
|
|
|
|||
20
ModernUO.sln
20
ModernUO.sln
|
|
@ -3,9 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
|||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.29102.190
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Server", "Projects\Server\Server.csproj", "{9514A3D3-5C0F-4EE0-B168-67C3F50DC225}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Server", "Projects\Server\Server.csproj", "{5E93BB35-3661-4822-9A8A-859726BAD87F}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Scripts", "Projects\Scripts\Scripts.csproj", "{BF29C43A-A539-448D-93DB-D7CBE13BACFE}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Scripts", "Projects\Scripts\Scripts.csproj", "{83CF2484-BCCB-4B7C-9C5F-7AB43AEA5E8F}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
|
@ -13,14 +13,14 @@ Global
|
|||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{9514A3D3-5C0F-4EE0-B168-67C3F50DC225}.Debug|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9514A3D3-5C0F-4EE0-B168-67C3F50DC225}.Debug|Any CPU.Build.0 = Release|Any CPU
|
||||
{9514A3D3-5C0F-4EE0-B168-67C3F50DC225}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9514A3D3-5C0F-4EE0-B168-67C3F50DC225}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{BF29C43A-A539-448D-93DB-D7CBE13BACFE}.Debug|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{BF29C43A-A539-448D-93DB-D7CBE13BACFE}.Debug|Any CPU.Build.0 = Release|Any CPU
|
||||
{BF29C43A-A539-448D-93DB-D7CBE13BACFE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{BF29C43A-A539-448D-93DB-D7CBE13BACFE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{5E93BB35-3661-4822-9A8A-859726BAD87F}.Debug|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5E93BB35-3661-4822-9A8A-859726BAD87F}.Debug|Any CPU.Build.0 = Release|Any CPU
|
||||
{5E93BB35-3661-4822-9A8A-859726BAD87F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5E93BB35-3661-4822-9A8A-859726BAD87F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{83CF2484-BCCB-4B7C-9C5F-7AB43AEA5E8F}.Debug|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{83CF2484-BCCB-4B7C-9C5F-7AB43AEA5E8F}.Debug|Any CPU.Build.0 = Release|Any CPU
|
||||
{83CF2484-BCCB-4B7C-9C5F-7AB43AEA5E8F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{83CF2484-BCCB-4B7C-9C5F-7AB43AEA5E8F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
|
|
|
|||
|
|
@ -61,7 +61,8 @@ namespace Server.Accounting
|
|||
|
||||
InvalidAccountAccessLog accessLog = FindAccessLog(ns);
|
||||
|
||||
m_List.Add(accessLog ??= new InvalidAccountAccessLog(ns.Address));
|
||||
if (accessLog == null)
|
||||
m_List.Add(accessLog = new InvalidAccountAccessLog(ns.Address));
|
||||
|
||||
accessLog.Counts += 1;
|
||||
accessLog.RefreshAccessTime();
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using Server.Accounting;
|
||||
using Server.Engines.Help;
|
||||
|
|
@ -177,8 +176,8 @@ namespace Server.Misc
|
|||
|
||||
from.SendLocalizedMessage(501234, "",
|
||||
0x35); /* The next available Counselor/Game Master will respond as soon as possible.
|
||||
* Please check your Journal for messages every few minutes.
|
||||
*/
|
||||
* Please check your Journal for messages every few minutes.
|
||||
*/
|
||||
|
||||
PageQueue.Enqueue(new PageEntry(from,
|
||||
$"[Automated: Change Password]<br>Desired password: {pass}<br>Current IP address: {ipAddress}<br>Account IP address: {accessList[0]}",
|
||||
|
|
@ -200,27 +199,38 @@ namespace Server.Misc
|
|||
if (!(state.Account is Account acct))
|
||||
{
|
||||
state.Dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
DeleteResultType deleteType;
|
||||
|
||||
if (index < 0 || index >= acct.Length)
|
||||
deleteType = DeleteResultType.BadRequest;
|
||||
else if (index < 0 || index >= acct.Length)
|
||||
{
|
||||
state.Send(new DeleteResult(DeleteResultType.BadRequest));
|
||||
state.Send(new CharacterListUpdate(acct));
|
||||
}
|
||||
else
|
||||
{
|
||||
Mobile m = acct[index];
|
||||
|
||||
if (m == null)
|
||||
deleteType = DeleteResultType.CharNotExist;
|
||||
{
|
||||
state.Send(new DeleteResult(DeleteResultType.CharNotExist));
|
||||
state.Send(new CharacterListUpdate(acct));
|
||||
}
|
||||
else if (m.NetState != null)
|
||||
deleteType = DeleteResultType.CharBeingPlayed;
|
||||
{
|
||||
state.Send(new DeleteResult(DeleteResultType.CharBeingPlayed));
|
||||
state.Send(new CharacterListUpdate(acct));
|
||||
}
|
||||
else if (RestrictDeletion && DateTime.UtcNow < m.CreationTime + DeleteDelay)
|
||||
deleteType = DeleteResultType.CharTooYoung;
|
||||
{
|
||||
state.Send(new DeleteResult(DeleteResultType.CharTooYoung));
|
||||
state.Send(new CharacterListUpdate(acct));
|
||||
}
|
||||
else if (m.AccessLevel == AccessLevel.Player &&
|
||||
Region.Find(m.LogoutLocation, m.LogoutMap).IsPartOf<Jail>()
|
||||
) //Don't need to check current location, if netstate is null, they're logged out
|
||||
deleteType = DeleteResultType.BadRequest;
|
||||
{
|
||||
state.Send(new DeleteResult(DeleteResultType.BadRequest));
|
||||
state.Send(new CharacterListUpdate(acct));
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Client: {0}: Deleting character {1} (0x{2:X})", state, index, m.Serial.Value);
|
||||
|
|
@ -228,18 +238,27 @@ namespace Server.Misc
|
|||
acct.Comments.Add(new AccountComment("System", $"Character #{index + 1} {m} deleted by {state}"));
|
||||
|
||||
m.Delete();
|
||||
Packets.SendCharacterListUpdate(state, acct);
|
||||
return;
|
||||
state.Send(new CharacterListUpdate(acct));
|
||||
}
|
||||
}
|
||||
|
||||
Packets.SendDeleteResult(state, deleteType);
|
||||
Packets.SendCharacterListUpdate(state, acct);
|
||||
}
|
||||
|
||||
public static bool CanCreate(IPAddress ip) => !IPTable.ContainsKey(ip) || IPTable[ip] < MaxAccountsPerIP;
|
||||
public static bool CanCreate(IPAddress ip)
|
||||
{
|
||||
if (!IPTable.ContainsKey(ip))
|
||||
return true;
|
||||
|
||||
private static bool IsForbiddenChar(char c) => m_ForbiddenChars.Any(t => c == t);
|
||||
return IPTable[ip] < MaxAccountsPerIP;
|
||||
}
|
||||
|
||||
private static bool IsForbiddenChar(char c)
|
||||
{
|
||||
for (int i = 0; i < m_ForbiddenChars.Length; ++i)
|
||||
if (c == m_ForbiddenChars[i])
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private static Account CreateAccount(NetState state, string un, string pw)
|
||||
{
|
||||
|
|
@ -358,7 +377,9 @@ namespace Server.Misc
|
|||
string pw = e.Password;
|
||||
|
||||
if (!(Accounts.GetAccount(un) is Account acct))
|
||||
{
|
||||
e.Accepted = false;
|
||||
}
|
||||
else if (!acct.HasAccess(e.State))
|
||||
{
|
||||
Console.WriteLine("Login: {0}: Access denied for '{1}'", e.State, un);
|
||||
|
|
|
|||
|
|
@ -90,4 +90,4 @@ namespace Server.Accounting
|
|||
xml.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -191,7 +191,9 @@ namespace Server
|
|||
return otherAddress.Equals(m_Address);
|
||||
}
|
||||
else if (obj is IPFirewallEntry entry)
|
||||
{
|
||||
return m_Address.Equals(entry.m_Address);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
@ -244,7 +246,7 @@ namespace Server
|
|||
|
||||
public WildcardIPFirewallEntry(string entry) => m_Entry = entry;
|
||||
|
||||
bool IFirewallEntry.IsBlocked(IPAddress address)
|
||||
public bool IsBlocked(IPAddress address)
|
||||
{
|
||||
if (!m_Valid)
|
||||
return false; //Why process if it's invalid? it'll return false anyway after processing it.
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ using CPA = Server.CommandPropertyAttribute;
|
|||
|
||||
namespace Server.Commands
|
||||
{
|
||||
public static class Add
|
||||
public class Add
|
||||
{
|
||||
private static Type m_EntityType = typeof(IEntity);
|
||||
|
||||
|
|
|
|||
|
|
@ -120,7 +120,8 @@ namespace Server.Commands
|
|||
|
||||
command.ExecuteList(eventArgs[i], usedList);
|
||||
|
||||
CommandLogging.Enabled |= list.Count > 20;
|
||||
if (list.Count > 20)
|
||||
CommandLogging.Enabled = true;
|
||||
|
||||
command.Flush(e.Mobile, list.Count > 20);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
using Server.Targeting;
|
||||
|
||||
namespace Server.Commands
|
||||
namespace Server
|
||||
{
|
||||
public delegate void BoundingBoxCallback(Map map, Point3D start, Point3D end);
|
||||
|
||||
|
|
@ -60,4 +60,4 @@ namespace Server.Commands
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -7,7 +7,7 @@ using Server.Network;
|
|||
|
||||
namespace Server.Commands
|
||||
{
|
||||
public static class ConvertPlayers
|
||||
public class ConvertPlayers
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ using Server.Mobiles;
|
|||
|
||||
namespace Server.Commands
|
||||
{
|
||||
public static class Decorate
|
||||
public class Decorate
|
||||
{
|
||||
private static Mobile m_Mobile;
|
||||
private static int m_Count;
|
||||
|
|
@ -878,7 +878,9 @@ namespace Server.Commands
|
|||
res = true;
|
||||
}
|
||||
else if ((item.ItemData.Flags & TileFlag.LightSource) != 0 && item.ItemData.Name == srcName)
|
||||
{
|
||||
m_DeleteQueue.Enqueue(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (srcItem is Teleporter || srcItem is FillableContainer || srcItem is BaseBook)
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ using Server.Mobiles;
|
|||
|
||||
namespace Server.Commands
|
||||
{
|
||||
public static class DecorateMag
|
||||
public class DecorateMag
|
||||
{
|
||||
private static Mobile m_Mobile;
|
||||
private static int m_Count;
|
||||
|
|
|
|||
|
|
@ -82,7 +82,9 @@ namespace Server.Commands
|
|||
if (baseInfo == null)
|
||||
m_Types[baseType] = baseInfo = new TypeInfo(baseType);
|
||||
|
||||
baseInfo.m_Derived ??= new List<TypeInfo>();
|
||||
if (baseInfo.m_Derived == null)
|
||||
baseInfo.m_Derived = new List<TypeInfo>();
|
||||
|
||||
baseInfo.m_Derived.Add(info);
|
||||
}
|
||||
|
||||
|
|
@ -95,7 +97,9 @@ namespace Server.Commands
|
|||
if (decInfo == null)
|
||||
m_Types[decType] = decInfo = new TypeInfo(decType);
|
||||
|
||||
decInfo.m_Nested ??= new List<TypeInfo>();
|
||||
if (decInfo.m_Nested == null)
|
||||
decInfo.m_Nested = new List<TypeInfo>();
|
||||
|
||||
decInfo.m_Nested.Add(info);
|
||||
}
|
||||
|
||||
|
|
@ -111,7 +115,9 @@ namespace Server.Commands
|
|||
if (ifaceInfo == null)
|
||||
m_Types[iface] = ifaceInfo = new TypeInfo(iface);
|
||||
|
||||
ifaceInfo.m_Derived ??= new List<TypeInfo>();
|
||||
if (ifaceInfo.m_Derived == null)
|
||||
ifaceInfo.m_Derived = new List<TypeInfo>();
|
||||
|
||||
ifaceInfo.m_Derived.Add(info);
|
||||
}
|
||||
}
|
||||
|
|
@ -638,7 +644,6 @@ namespace Server.Commands
|
|||
m_Namespaces = new Dictionary<string, List<TypeInfo>>();
|
||||
|
||||
List<Assembly> assemblies = new List<Assembly> { Core.Assembly };
|
||||
assemblies.AddRange(AssemblyHandler.Assemblies);
|
||||
|
||||
|
||||
foreach (Assembly asm in AssemblyHandler.Assemblies)
|
||||
|
|
@ -1158,21 +1163,37 @@ namespace Server.Commands
|
|||
Item item = items[i].Construct();
|
||||
|
||||
if (item is Sandals)
|
||||
{
|
||||
rewards[5] = true;
|
||||
}
|
||||
else if (item is SmallStretchedHideEastDeed || item is SmallStretchedHideSouthDeed)
|
||||
{
|
||||
rewards[10] = rewards[11] = true;
|
||||
}
|
||||
else if (item is MediumStretchedHideEastDeed || item is MediumStretchedHideSouthDeed)
|
||||
{
|
||||
rewards[10] = rewards[11] = true;
|
||||
}
|
||||
else if (item is LightFlowerTapestryEastDeed || item is LightFlowerTapestrySouthDeed)
|
||||
{
|
||||
rewards[12] = rewards[13] = true;
|
||||
}
|
||||
else if (item is DarkFlowerTapestryEastDeed || item is DarkFlowerTapestrySouthDeed)
|
||||
{
|
||||
rewards[12] = rewards[13] = true;
|
||||
}
|
||||
else if (item is BrownBearRugEastDeed || item is BrownBearRugSouthDeed)
|
||||
{
|
||||
rewards[14] = rewards[15] = true;
|
||||
}
|
||||
else if (item is PolarBearRugEastDeed || item is PolarBearRugSouthDeed)
|
||||
{
|
||||
rewards[14] = rewards[15] = true;
|
||||
}
|
||||
else if (item is ClothingBlessDeed)
|
||||
{
|
||||
rewards[16] = true;
|
||||
}
|
||||
else if (item is PowerScroll ps)
|
||||
{
|
||||
if (ps.Value == 105.0)
|
||||
|
|
@ -1197,7 +1218,10 @@ namespace Server.Commands
|
|||
else
|
||||
rewards[4] = true;
|
||||
}
|
||||
else if (item is RunicSewingKit rkit) rewards[16 + CraftResources.GetIndex(rkit.Resource)] = true;
|
||||
else if (item is RunicSewingKit rkit)
|
||||
{
|
||||
rewards[16 + CraftResources.GetIndex(rkit.Resource)] = true;
|
||||
}
|
||||
|
||||
item.Delete();
|
||||
}
|
||||
|
|
@ -1415,21 +1439,37 @@ namespace Server.Commands
|
|||
Item item = items[i].Construct();
|
||||
|
||||
if (item is SturdyPickaxe || item is SturdyShovel)
|
||||
{
|
||||
rewards[0] = true;
|
||||
}
|
||||
else if (item is LeatherGlovesOfMining)
|
||||
{
|
||||
rewards[1] = true;
|
||||
}
|
||||
else if (item is StuddedGlovesOfMining)
|
||||
{
|
||||
rewards[2] = true;
|
||||
}
|
||||
else if (item is RingmailGlovesOfMining)
|
||||
{
|
||||
rewards[3] = true;
|
||||
}
|
||||
else if (item is GargoylesPickaxe)
|
||||
{
|
||||
rewards[4] = true;
|
||||
}
|
||||
else if (item is ProspectorsTool)
|
||||
{
|
||||
rewards[5] = true;
|
||||
}
|
||||
else if (item is PowderOfTemperament)
|
||||
{
|
||||
rewards[6] = true;
|
||||
}
|
||||
else if (item is ColoredAnvil)
|
||||
{
|
||||
rewards[7] = true;
|
||||
}
|
||||
else if (item is PowerScroll ps)
|
||||
{
|
||||
if (ps.Value == 105.0)
|
||||
|
|
@ -1442,7 +1482,9 @@ namespace Server.Commands
|
|||
rewards[11] = true;
|
||||
}
|
||||
else if (item is RunicHammer rh)
|
||||
{
|
||||
rewards[11 + CraftResources.GetIndex(rh.Resource)] = true;
|
||||
}
|
||||
else if (item is AncientSmithyHammer ash)
|
||||
{
|
||||
if (ash.Bonus == 10)
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ using Server.Items;
|
|||
|
||||
namespace Server.Commands
|
||||
{
|
||||
public static class GenTeleporter
|
||||
public class GenTeleporter
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
|
|
@ -282,7 +282,7 @@ namespace Server.Commands
|
|||
CreateTeleporter(2758, 2092, -20, 2756, 2097, 38, map, false);
|
||||
CreateTeleporter(2759, 2092, -20, 2756, 2097, 38, map, false);
|
||||
CreateTeleporter(2685, 2063, 39, 2685, 2063, -20, map,
|
||||
false); // that should not be a teleporter: on OSI you simply fall under the ground
|
||||
false); // that should not be a teleporter: on OSI you simply fall under the ground
|
||||
|
||||
// Misc
|
||||
CreateTeleporter(5217, 18, 15, 5204, 74, 17, map, false);
|
||||
|
|
@ -597,7 +597,7 @@ namespace Server.Commands
|
|||
CreateTeleporter(11, 1519, -27, 11, 873, -28, map, false);
|
||||
CreateTeleporter(12, 1519, -27, 12, 873, -27, map, false);
|
||||
|
||||
// Ratman Lair
|
||||
// Ratman Lair
|
||||
CreateTeleporter(636, 813, -62, 164, 743, -28, map, false);
|
||||
CreateTeleporter(164, 746, -16, 636, 815, -52, map, false);
|
||||
|
||||
|
|
@ -775,47 +775,47 @@ namespace Server.Commands
|
|||
CreateTeleporter(548, 455, -40, 428, 113, -28, map, true);
|
||||
CreateTeleporter(429, 113, -28, 548, 455, -40, map, false);
|
||||
|
||||
CreateTeleporter(242, 27, -16, 372, 31, -31, map, false); // stairs - 0x754
|
||||
CreateTeleporter(242, 26, -16, 372, 30, -31, map, false); // stairs - 0x754
|
||||
CreateTeleporter(242, 25, -16, 372, 29, -31, map, false); // stairs - 0x754
|
||||
CreateTeleporter(371, 31, -36, 241, 27, -18, map, false); // stairs - 0x754
|
||||
CreateTeleporter(371, 30, -36, 241, 26, -18, map, false); // stairs - 0x754
|
||||
CreateTeleporter(242, 27, -16, 372, 31, -31, map, false); // stairs - 0x754
|
||||
CreateTeleporter(242, 26, -16, 372, 30, -31, map, false); // stairs - 0x754
|
||||
CreateTeleporter(242, 25, -16, 372, 29, -31, map, false); // stairs - 0x754
|
||||
CreateTeleporter(371, 31, -36, 241, 27, -18, map, false); // stairs - 0x754
|
||||
CreateTeleporter(371, 30, -36, 241, 26, -18, map, false); // stairs - 0x754
|
||||
|
||||
DestroyTeleporter(371, 29, -36, map); //To remove old erroneous teleporter
|
||||
|
||||
CreateTeleporter(371, 29, -36, 241, 25, -18, map, false); // stairs - 0x754
|
||||
|
||||
CreateTeleporter(272, 141, -16, 555, 427, -1, map, false); // stairs - 1st 0x753
|
||||
CreateTeleporter(273, 141, -16, 556, 427, -1, map, false); // stairs - 1st 0x753
|
||||
CreateTeleporter(274, 141, -16, 557, 427, -1, map, false); // stairs - 1st 0x753
|
||||
CreateTeleporter(555, 426, -6, 272, 140, -21, map, false); // stairs - 1st 0x753
|
||||
CreateTeleporter(556, 426, -6, 273, 140, -21, map, false); // stairs - 1st 0x753
|
||||
CreateTeleporter(557, 426, -6, 274, 140, -21, map, false); // stairs - 1st 0x753
|
||||
CreateTeleporter(272, 141, -16, 555, 427, -1, map, false); // stairs - 1st 0x753
|
||||
CreateTeleporter(273, 141, -16, 556, 427, -1, map, false); // stairs - 1st 0x753
|
||||
CreateTeleporter(274, 141, -16, 557, 427, -1, map, false); // stairs - 1st 0x753
|
||||
CreateTeleporter(555, 426, -6, 272, 140, -21, map, false); // stairs - 1st 0x753
|
||||
CreateTeleporter(556, 426, -6, 273, 140, -21, map, false); // stairs - 1st 0x753
|
||||
CreateTeleporter(557, 426, -6, 274, 140, -21, map, false); // stairs - 1st 0x753
|
||||
|
||||
CreateTeleporter(265, 130, -31, 284, 72, -21, map, false); // stairs - 0x753
|
||||
CreateTeleporter(266, 130, -31, 285, 72, -21, map, false); // stairs - 0x753
|
||||
CreateTeleporter(267, 130, -31, 286, 72, -21, map, false); // stairs - 0x753
|
||||
CreateTeleporter(268, 130, -31, 287, 72, -21, map, false); // stairs - 0x753
|
||||
CreateTeleporter(284, 73, -16, 265, 131, -28, map, false); // stairs - 0x753
|
||||
CreateTeleporter(285, 73, -16, 266, 131, -28, map, false); // stairs - 0x753
|
||||
CreateTeleporter(286, 73, -16, 267, 131, -28, map, false); // stairs - 0x753
|
||||
CreateTeleporter(287, 73, -16, 268, 131, -28, map, false); // stairs - 0x753
|
||||
CreateTeleporter(265, 130, -31, 284, 72, -21, map, false); // stairs - 0x753
|
||||
CreateTeleporter(266, 130, -31, 285, 72, -21, map, false); // stairs - 0x753
|
||||
CreateTeleporter(267, 130, -31, 286, 72, -21, map, false); // stairs - 0x753
|
||||
CreateTeleporter(268, 130, -31, 287, 72, -21, map, false); // stairs - 0x753
|
||||
CreateTeleporter(284, 73, -16, 265, 131, -28, map, false); // stairs - 0x753
|
||||
CreateTeleporter(285, 73, -16, 266, 131, -28, map, false); // stairs - 0x753
|
||||
CreateTeleporter(286, 73, -16, 267, 131, -28, map, false); // stairs - 0x753
|
||||
CreateTeleporter(287, 73, -16, 268, 131, -28, map, false); // stairs - 0x753
|
||||
|
||||
CreateTeleporter(284, 67, -30, 131, 128, -21, map, false); // stairs - 0x753
|
||||
CreateTeleporter(285, 67, -30, 132, 128, -21, map, false); // stairs - 0x753
|
||||
CreateTeleporter(286, 67, -30, 133, 128, -21, map, false); // stairs - 0x753
|
||||
CreateTeleporter(287, 67, -30, 134, 128, -21, map, false); // stairs - 0x753
|
||||
CreateTeleporter(131, 129, -16, 284, 68, -28, map, false); // stairs - 0x753
|
||||
CreateTeleporter(132, 129, -16, 285, 68, -28, map, false); // stairs - 0x753
|
||||
CreateTeleporter(133, 129, -16, 286, 68, -28, map, false); // stairs - 0x753
|
||||
CreateTeleporter(134, 129, -16, 287, 68, -28, map, false); // stairs - 0x753
|
||||
CreateTeleporter(284, 67, -30, 131, 128, -21, map, false); // stairs - 0x753
|
||||
CreateTeleporter(285, 67, -30, 132, 128, -21, map, false); // stairs - 0x753
|
||||
CreateTeleporter(286, 67, -30, 133, 128, -21, map, false); // stairs - 0x753
|
||||
CreateTeleporter(287, 67, -30, 134, 128, -21, map, false); // stairs - 0x753
|
||||
CreateTeleporter(131, 129, -16, 284, 68, -28, map, false); // stairs - 0x753
|
||||
CreateTeleporter(132, 129, -16, 285, 68, -28, map, false); // stairs - 0x753
|
||||
CreateTeleporter(133, 129, -16, 286, 68, -28, map, false); // stairs - 0x753
|
||||
CreateTeleporter(134, 129, -16, 287, 68, -28, map, false); // stairs - 0x753
|
||||
|
||||
CreateTeleporter(358, 40, -36, 156, 88, -18, map, false); // stairs - 0x73A
|
||||
CreateTeleporter(358, 41, -36, 156, 89, -18, map, false); // stairs - 0x73A
|
||||
CreateTeleporter(358, 42, -36, 156, 90, -18, map, false); // stairs - 0x73A
|
||||
CreateTeleporter(155, 88, -16, 357, 40, -31, map, false); // stairs - 0x73A
|
||||
CreateTeleporter(155, 89, -16, 357, 41, -31, map, false); // stairs - 0x73A
|
||||
CreateTeleporter(155, 90, -16, 357, 42, -31, map, false); // stairs - 0x73A
|
||||
CreateTeleporter(358, 40, -36, 156, 88, -18, map, false); // stairs - 0x73A
|
||||
CreateTeleporter(358, 41, -36, 156, 89, -18, map, false); // stairs - 0x73A
|
||||
CreateTeleporter(358, 42, -36, 156, 90, -18, map, false); // stairs - 0x73A
|
||||
CreateTeleporter(155, 88, -16, 357, 40, -31, map, false); // stairs - 0x73A
|
||||
CreateTeleporter(155, 89, -16, 357, 41, -31, map, false); // stairs - 0x73A
|
||||
CreateTeleporter(155, 90, -16, 357, 42, -31, map, false); // stairs - 0x73A
|
||||
|
||||
CreateTeleporter(259, 90, -28, 236, 113, -28, map, true);
|
||||
|
||||
|
|
@ -923,7 +923,7 @@ namespace Server.Commands
|
|||
|
||||
public void CreateTeleportersMap3(Map map)
|
||||
{
|
||||
// CreateTeleporter( 408, 254, 2, 428, 319, 2, map, false ); // for doom quest; use blockers to avoid players teleporting into the ship!
|
||||
// CreateTeleporter( 408, 254, 2, 428, 319, 2, map, false ); // for doom quest; use blockers to avoid players teleporting into the ship!
|
||||
// CreateTeleporter( 428, 321, 2, 422, 328, -1, map, false ); // for doom quest; use blockers to avoid players teleporting into the ship!
|
||||
|
||||
// Doom Dungeon
|
||||
|
|
@ -1040,4 +1040,4 @@ namespace Server.Commands
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Server.Accounting;
|
||||
using Server.Engines.Help;
|
||||
using Server.Factions;
|
||||
|
|
@ -13,7 +12,7 @@ using Server.Spells;
|
|||
|
||||
namespace Server.Commands.Generic
|
||||
{
|
||||
public static class TargetCommands
|
||||
public class TargetCommands
|
||||
{
|
||||
public static List<BaseCommand> AllCommands{ get; } = new List<BaseCommand>();
|
||||
|
||||
|
|
@ -186,7 +185,10 @@ namespace Server.Commands.Generic
|
|||
|
||||
public override void ExecuteList(CommandEventArgs e, List<object> list)
|
||||
{
|
||||
AddResponse(list.Count == 1 ? "There is one matching object." : $"There are {list.Count} matching objects.");
|
||||
if (list.Count == 1)
|
||||
AddResponse("There is one matching object.");
|
||||
else
|
||||
AddResponse($"There are {list.Count} matching objects.");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -232,7 +234,9 @@ namespace Server.Commands.Generic
|
|||
NetState ns = mob.NetState;
|
||||
|
||||
if (ns == null)
|
||||
{
|
||||
LogFailure("That player is not online.");
|
||||
}
|
||||
else
|
||||
{
|
||||
string url = e.GetString(0);
|
||||
|
|
@ -240,7 +244,10 @@ namespace Server.Commands.Generic
|
|||
CommandLogging.WriteLine(from, "{0} {1} requesting to open web browser of {2} to {3}",
|
||||
from.AccessLevel, CommandLogging.Format(from), CommandLogging.Format(mob), url);
|
||||
|
||||
AddResponse(echo ? "Awaiting user confirmation..." : "Open web browser request sent.");
|
||||
if (echo)
|
||||
AddResponse("Awaiting user confirmation...");
|
||||
else
|
||||
AddResponse("Open web browser request sent.");
|
||||
|
||||
mob.SendGump(new WarningGump(1060637, 30720,
|
||||
$"A game master is requesting to open your web browser to the following URL:<br>{url}", 0xFFC000,
|
||||
|
|
@ -248,10 +255,14 @@ namespace Server.Commands.Generic
|
|||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LogFailure("That is not a player.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LogFailure("Format: OpenBrowser <url>");
|
||||
}
|
||||
}
|
||||
|
||||
public override void Execute(CommandEventArgs e, object obj)
|
||||
|
|
@ -325,7 +336,7 @@ namespace Server.Commands.Generic
|
|||
|
||||
CommandLogging.WriteLine(from, "{0} {1} playing sound {2} for {3}", from.AccessLevel,
|
||||
CommandLogging.Format(from), index, CommandLogging.Format(mob));
|
||||
Packets.SendPlaySound(mob.NetState, index, mob.Location);
|
||||
mob.Send(new PlaySound(index, mob.Location));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -447,10 +458,14 @@ namespace Server.Commands.Generic
|
|||
e.Mobile.SendGump(new AddGump(e.Mobile, match, 0, Type.EmptyTypes, false));
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Mobile.SendGump(new AddGump(e.Mobile, match, 0, AddGump.Match(match).ToArray(), true));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -619,9 +634,19 @@ namespace Server.Commands.Generic
|
|||
|
||||
public override void Execute(CommandEventArgs e, object obj)
|
||||
{
|
||||
AddResponse(obj == null ?
|
||||
"The object is null." :
|
||||
$"The type of that object is {obj.GetType().FullName}.");
|
||||
if (obj == null)
|
||||
{
|
||||
AddResponse("The object is null.");
|
||||
}
|
||||
else
|
||||
{
|
||||
Type type = obj.GetType();
|
||||
|
||||
if (type.DeclaringType == null)
|
||||
AddResponse($"The type of that object is {type.Name}.");
|
||||
else
|
||||
AddResponse($"The type of that object is {type.FullName}.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -835,9 +860,13 @@ namespace Server.Commands.Generic
|
|||
if (m_Value)
|
||||
{
|
||||
if (!mob.Alive)
|
||||
{
|
||||
LogFailure("They are already dead.");
|
||||
}
|
||||
else if (!mob.CanBeDamaged())
|
||||
{
|
||||
LogFailure("They cannot be harmed.");
|
||||
}
|
||||
else
|
||||
{
|
||||
CommandLogging.WriteLine(from, "{0} {1} killing {2}", from.AccessLevel, CommandLogging.Format(from),
|
||||
|
|
@ -931,7 +960,10 @@ namespace Server.Commands.Generic
|
|||
m.PlaySound(0x228);
|
||||
m.Hidden = m_Value;
|
||||
|
||||
AddResponse(m_Value ? "They have been hidden." : "They have been revealed.");
|
||||
if (m_Value)
|
||||
AddResponse("They have been hidden.");
|
||||
else
|
||||
AddResponse("They have been revealed.");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -970,7 +1002,9 @@ namespace Server.Commands.Generic
|
|||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LogFailure("They are not online.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1064,11 +1098,12 @@ namespace Server.Commands.Generic
|
|||
return;
|
||||
}
|
||||
|
||||
foreach (BaseHouse house in BaseHouse.AllHouses.Where(house => house.HasSecureItem(item) || house.HasLockedDownItem(item)))
|
||||
{
|
||||
e.Mobile.SendGump(new PropertiesGump(e.Mobile, house));
|
||||
return;
|
||||
}
|
||||
foreach (BaseHouse house in BaseHouse.AllHouses)
|
||||
if (house.HasSecureItem(item) || house.HasLockedDownItem(item))
|
||||
{
|
||||
e.Mobile.SendGump(new PropertiesGump(e.Mobile, house));
|
||||
return;
|
||||
}
|
||||
|
||||
LogFailure("No house was found.");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ namespace Server.Commands.Generic
|
|||
AddResponse("Awaiting confirmation...");
|
||||
}
|
||||
|
||||
private void OnConfirmCallback(Mobile from, bool okay, IReadOnlyList<object> list, bool staticsOnly)
|
||||
private void OnConfirmCallback(Mobile from, bool okay, List<object> list, bool staticsOnly)
|
||||
{
|
||||
bool flushToLog = false;
|
||||
|
||||
|
|
@ -191,11 +191,13 @@ namespace Server.Commands.Generic
|
|||
house.Delta(ItemDelta.Update);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddResponse("Command aborted.");
|
||||
}
|
||||
|
||||
Flush(from, flushToLog);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -160,6 +160,10 @@ namespace Server.Commands.Generic
|
|||
FieldAttributes.Private | FieldAttributes.InitOnly
|
||||
);
|
||||
|
||||
// parseMethod.Invoke(null,
|
||||
// parseArgs.Length == 2 ? new object[] {toParse, (int) parseArgs[1]} : new object[] {toParse});
|
||||
|
||||
|
||||
il.Emit(OpCodes.Ldarg_0);
|
||||
|
||||
il.Emit(OpCodes.Ldstr, toParse);
|
||||
|
|
@ -230,17 +234,36 @@ namespace Server.Commands.Generic
|
|||
|
||||
public override void Compile(MethodEmitter emitter)
|
||||
{
|
||||
bool inverse = m_Operator == StringOperator.NotEqual;
|
||||
bool inverse = false;
|
||||
|
||||
string methodName = m_Operator switch
|
||||
string methodName;
|
||||
|
||||
switch (m_Operator)
|
||||
{
|
||||
StringOperator.Equal => "Equals",
|
||||
StringOperator.NotEqual => "Equals",
|
||||
StringOperator.Contains => "Contains",
|
||||
StringOperator.StartsWith => "StartsWith",
|
||||
StringOperator.EndsWith => "EndsWith",
|
||||
_ => throw new InvalidOperationException("Invalid string comparison operator.")
|
||||
};
|
||||
case StringOperator.Equal:
|
||||
methodName = "Equals";
|
||||
break;
|
||||
|
||||
case StringOperator.NotEqual:
|
||||
methodName = "Equals";
|
||||
inverse = true;
|
||||
break;
|
||||
|
||||
case StringOperator.Contains:
|
||||
methodName = "Contains";
|
||||
break;
|
||||
|
||||
case StringOperator.StartsWith:
|
||||
methodName = "StartsWith";
|
||||
break;
|
||||
|
||||
case StringOperator.EndsWith:
|
||||
methodName = "EndsWith";
|
||||
break;
|
||||
|
||||
default:
|
||||
throw new InvalidOperationException("Invalid string comparison operator.");
|
||||
}
|
||||
|
||||
if (m_IgnoreCase || methodName == "Equals")
|
||||
{
|
||||
|
|
|
|||
|
|
@ -32,7 +32,8 @@ namespace Server.Commands.Generic
|
|||
prop.CheckAccess(from);
|
||||
}
|
||||
|
||||
assembly ??= new AssemblyEmitter("__dynamic");
|
||||
if (assembly == null)
|
||||
assembly = new AssemblyEmitter("__dynamic");
|
||||
|
||||
m_Comparer = DistinctCompiler.Compile<object>(assembly, baseType, m_Properties.ToArray());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,8 @@ namespace Server.Commands.Generic
|
|||
order.Property.CheckAccess(from);
|
||||
}
|
||||
|
||||
assembly ??= new AssemblyEmitter("__dynamic");
|
||||
if (assembly == null)
|
||||
assembly = new AssemblyEmitter("__dynamic");
|
||||
|
||||
m_Comparer = SortCompiler.Compile<object>(assembly, baseType, m_Orders.ToArray());
|
||||
}
|
||||
|
|
@ -68,6 +69,7 @@ namespace Server.Commands.Generic
|
|||
case "up":
|
||||
case "asc":
|
||||
case "ascending":
|
||||
isAscending = true;
|
||||
++offset;
|
||||
break;
|
||||
|
||||
|
|
|
|||
|
|
@ -111,15 +111,20 @@ namespace Server.Commands.Generic
|
|||
case ObjectTypes.All:
|
||||
case ObjectTypes.Both:
|
||||
{
|
||||
items |= condIsItem;
|
||||
mobiles |= condIsMobile;
|
||||
if (condIsItem)
|
||||
items = true;
|
||||
|
||||
if (condIsMobile)
|
||||
mobiles = true;
|
||||
|
||||
break;
|
||||
}
|
||||
case ObjectTypes.Items:
|
||||
{
|
||||
if (condIsItem)
|
||||
{
|
||||
items = true;
|
||||
}
|
||||
else if (condIsMobile)
|
||||
{
|
||||
from.SendMessage("You may not use a mobile type condition for this command.");
|
||||
|
|
@ -131,7 +136,9 @@ namespace Server.Commands.Generic
|
|||
case ObjectTypes.Mobiles:
|
||||
{
|
||||
if (condIsMobile)
|
||||
{
|
||||
mobiles = true;
|
||||
}
|
||||
else if (condIsItem)
|
||||
{
|
||||
from.SendMessage("You may not use an item type condition for this command.");
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Server.Items;
|
||||
using Server.Targeting;
|
||||
|
||||
|
|
@ -41,7 +40,7 @@ namespace Server.Commands.Generic
|
|||
from.SendMessage("That is not a container.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
Extensions ext = Extensions.Parse(from, ref args);
|
||||
|
|
@ -71,4 +70,4 @@ namespace Server.Commands.Generic
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Server.Commands.Generic
|
||||
{
|
||||
|
|
@ -29,10 +28,14 @@ namespace Server.Commands.Generic
|
|||
List<object> list = new List<object>();
|
||||
|
||||
if (items)
|
||||
list.AddRange(World.Items.Values.Where(item => ext.IsValid(item)));
|
||||
foreach (Item item in World.Items.Values)
|
||||
if (ext.IsValid(item))
|
||||
list.Add(item);
|
||||
|
||||
if (mobiles)
|
||||
list.AddRange(World.Mobiles.Values.Where(mob => ext.IsValid(mob)));
|
||||
foreach (Mobile mob in World.Mobiles.Values)
|
||||
if (ext.IsValid(mob))
|
||||
list.Add(mob);
|
||||
|
||||
ext.Filter(list);
|
||||
|
||||
|
|
@ -44,4 +47,4 @@ namespace Server.Commands.Generic
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -30,7 +30,8 @@ namespace Server.Commands.Generic
|
|||
|
||||
public void Compile(ref AssemblyEmitter emitter)
|
||||
{
|
||||
emitter ??= new AssemblyEmitter("__dynamic");
|
||||
if (emitter == null)
|
||||
emitter = new AssemblyEmitter("__dynamic");
|
||||
|
||||
m_Conditionals = new IConditional[m_Conditions.Length];
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Server.Commands.Generic
|
||||
{
|
||||
|
|
@ -31,7 +30,16 @@ namespace Server.Commands.Generic
|
|||
List<object> list = new List<object>();
|
||||
|
||||
if (mobiles)
|
||||
list.AddRange(reg.GetMobiles().Where(mob => BaseCommand.IsAccessible(from, mob)).Where(mob => ext.IsValid(mob)));
|
||||
{
|
||||
foreach (Mobile mob in reg.GetMobiles())
|
||||
{
|
||||
if (!BaseCommand.IsAccessible(from, mob))
|
||||
continue;
|
||||
|
||||
if (ext.IsValid(mob))
|
||||
list.Add(mob);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
command.LogFailure("This command does not support items.");
|
||||
|
|
@ -48,4 +56,4 @@ namespace Server.Commands.Generic
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -17,7 +17,7 @@ namespace Server.Commands.Generic
|
|||
{
|
||||
Serial serial = e.GetUInt32(0);
|
||||
|
||||
IEntity obj = null;
|
||||
object obj = null;
|
||||
|
||||
if (serial.IsItem)
|
||||
obj = World.FindItem(serial);
|
||||
|
|
@ -25,16 +25,22 @@ namespace Server.Commands.Generic
|
|||
obj = World.FindMobile(serial);
|
||||
|
||||
if (obj == null)
|
||||
{
|
||||
e.Mobile.SendMessage("That is not a valid serial.");
|
||||
}
|
||||
else
|
||||
{
|
||||
Commands.TryGetValue(e.GetString(1), out BaseCommand command);
|
||||
|
||||
if (command == null)
|
||||
{
|
||||
e.Mobile.SendMessage(
|
||||
"That is either an invalid command name or one that does not support this modifier.");
|
||||
}
|
||||
else if (e.Mobile.AccessLevel < command.AccessLevel)
|
||||
{
|
||||
e.Mobile.SendMessage("You do not have access to that command.");
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (command.ObjectTypes)
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Server.Commands.Generic;
|
||||
using Server.Engines.Help;
|
||||
using Server.Gumps;
|
||||
using Server.Items;
|
||||
using Server.Menus;
|
||||
using Server.Menus.ItemLists;
|
||||
using Server.Menus.Questions;
|
||||
using Server.Misc;
|
||||
using Server.Mobiles;
|
||||
|
|
@ -17,7 +16,7 @@ using Server.Targets;
|
|||
|
||||
namespace Server.Commands
|
||||
{
|
||||
public static class CommandHandlers
|
||||
public class CommandHandlers
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
|
|
@ -89,17 +88,19 @@ namespace Server.Commands
|
|||
{
|
||||
if (e.Length == 1 && !e.GetBoolean(0))
|
||||
{
|
||||
Packets.SendSpeedControlDisabled(from.NetState);
|
||||
from.Send(SpeedControl.Disable);
|
||||
from.SendMessage("Speed boost has been disabled.");
|
||||
}
|
||||
else
|
||||
{
|
||||
Packets.SendSpeedControlMount(from.NetState);
|
||||
from.Send(SpeedControl.MountSpeed);
|
||||
from.SendMessage("Speed boost has been enabled.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage("Format: SpeedBoost [true|false]");
|
||||
}
|
||||
}
|
||||
|
||||
[Usage("Where")]
|
||||
|
|
@ -158,16 +159,18 @@ namespace Server.Commands
|
|||
{
|
||||
PageEntry pe = PageQueue.GetEntry(targ);
|
||||
|
||||
from.SendMessage(pe?.Handler == from
|
||||
? "You may only use this command if you are handling their help page."
|
||||
: "You may only use this command on someone who has paged you.");
|
||||
if (pe?.Handler == from)
|
||||
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.");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
from.SendMessage(targ.AddToBackpack(held)
|
||||
? "The item they were holding has been placed into their backpack."
|
||||
: "The item they were holding has been placed at their feet.");
|
||||
if (targ.AddToBackpack(held))
|
||||
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.");
|
||||
|
||||
held.ClearBounce();
|
||||
|
||||
|
|
@ -217,8 +220,14 @@ namespace Server.Commands
|
|||
}
|
||||
|
||||
List<IEntity> list = new List<IEntity>();
|
||||
list.AddRange(World.Items.Values.Where(item => item.Map == map && item.Parent == null));
|
||||
list.AddRange(World.Mobiles.Values.Where(m => m.Map == map && !m.Player));
|
||||
|
||||
foreach (Item item in World.Items.Values)
|
||||
if (item.Map == map && item.Parent == null)
|
||||
list.Add(item);
|
||||
|
||||
foreach (Mobile m in World.Mobiles.Values)
|
||||
if (m.Map == map && !m.Player)
|
||||
list.Add(m);
|
||||
|
||||
if (list.Count > 0)
|
||||
{
|
||||
|
|
@ -268,7 +277,9 @@ namespace Server.Commands
|
|||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage("There were no pets found for that player.");
|
||||
}
|
||||
}
|
||||
else if (obj is Mobile master && master.Player)
|
||||
{
|
||||
|
|
@ -297,7 +308,9 @@ namespace Server.Commands
|
|||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage("There were no pets found for that player.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -336,9 +349,15 @@ namespace Server.Commands
|
|||
CommandLogging.WriteLine(m, "{0} {1} playing sound {2} (toAll={3})", m.AccessLevel, CommandLogging.Format(m),
|
||||
index, toAll);
|
||||
|
||||
Packet p = new PlaySound(index, m.Location);
|
||||
|
||||
p.Acquire();
|
||||
|
||||
foreach (NetState state in m.GetClientsInRange(12))
|
||||
if (toAll || state.Mobile.CanSee(m))
|
||||
Packets.SendPlaySound(state, index, m.Location);
|
||||
state.Send(p);
|
||||
|
||||
p.Release();
|
||||
}
|
||||
|
||||
[Usage("Echo <text>")]
|
||||
|
|
@ -347,7 +366,10 @@ namespace Server.Commands
|
|||
{
|
||||
string toEcho = e.ArgString.Trim();
|
||||
|
||||
e.Mobile.SendMessage(toEcho.Length > 0 ? toEcho : "Format: Echo \"<text>\"");
|
||||
if (toEcho.Length > 0)
|
||||
e.Mobile.SendMessage(toEcho);
|
||||
else
|
||||
e.Mobile.SendMessage("Format: Echo \"<text>\"");
|
||||
}
|
||||
|
||||
[Usage("Bank")]
|
||||
|
|
@ -506,12 +528,16 @@ namespace Server.Commands
|
|||
|
||||
Dictionary<string, Region> list = from.Map.Regions;
|
||||
|
||||
foreach (var (_, r) in list)
|
||||
foreach (KeyValuePair<string, Region> kvp in list)
|
||||
{
|
||||
Region r = kvp.Value;
|
||||
|
||||
if (Insensitive.Equals(r.Name, name))
|
||||
{
|
||||
from.Location = new Point3D(r.GoLocation);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < Map.AllMaps.Count; ++i)
|
||||
{
|
||||
|
|
@ -592,7 +618,11 @@ namespace Server.Commands
|
|||
{
|
||||
Mobile m = e.Mobile;
|
||||
|
||||
List<CommandEntry> list = CommandSystem.Entries.Values.Where(entry => m.AccessLevel >= entry.AccessLevel).ToList();
|
||||
List<CommandEntry> list = new List<CommandEntry>();
|
||||
|
||||
foreach (CommandEntry entry in CommandSystem.Entries.Values)
|
||||
if (m.AccessLevel >= entry.AccessLevel)
|
||||
list.Add(entry);
|
||||
|
||||
list.Sort();
|
||||
|
||||
|
|
@ -641,8 +671,13 @@ namespace Server.Commands
|
|||
|
||||
public static void BroadcastMessage(AccessLevel ac, int hue, string message)
|
||||
{
|
||||
foreach (Mobile m in NetState.Instances.Select(state => state.Mobile).Where(m => m?.AccessLevel >= ac))
|
||||
m.SendMessage(hue, message);
|
||||
foreach (NetState state in NetState.Instances)
|
||||
{
|
||||
Mobile m = state.Mobile;
|
||||
|
||||
if (m?.AccessLevel >= ac)
|
||||
m.SendMessage(hue, message);
|
||||
}
|
||||
}
|
||||
|
||||
[Usage("AutoPageNotify")]
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ using CommandInfoSorter = Server.Commands.Docs.CommandEntrySorter;
|
|||
|
||||
namespace Server.Commands
|
||||
{
|
||||
public static class HelpInfo
|
||||
public class HelpInfo
|
||||
{
|
||||
public static Dictionary<string, CommandInfo> HelpInfos{ get; } = new Dictionary<string, CommandInfo>();
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ using Server.Accounting;
|
|||
|
||||
namespace Server.Commands
|
||||
{
|
||||
public static class CommandLogging
|
||||
public class CommandLogging
|
||||
{
|
||||
private static char[] m_NotSafe = { '\\', '/', ':', '*', '?', '"', '<', '>', '|' };
|
||||
public static bool Enabled{ get; set; } = true;
|
||||
|
|
|
|||
|
|
@ -196,7 +196,7 @@ namespace Server.Commands
|
|||
}
|
||||
}
|
||||
|
||||
return chain[^1];
|
||||
return chain[chain.Length - 1];
|
||||
}
|
||||
|
||||
public static string GetValue(Mobile from, object o, string name)
|
||||
|
|
@ -328,7 +328,7 @@ namespace Server.Commands
|
|||
concat[i * 2 + 1] = i < chain.Length - 1 ? "." : " = ";
|
||||
}
|
||||
|
||||
concat[^1] = toString;
|
||||
concat[concat.Length - 1] = toString;
|
||||
|
||||
return string.Concat(concat);
|
||||
}
|
||||
|
|
@ -382,7 +382,7 @@ namespace Server.Commands
|
|||
if (IsEnum(type))
|
||||
try
|
||||
{
|
||||
toSet = Enum.Parse(type, value ?? "", true);
|
||||
toSet = Enum.Parse(type, value, true);
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
|
@ -654,7 +654,7 @@ namespace Server
|
|||
if (!IsBound)
|
||||
throw new NotYetBoundException(this);
|
||||
|
||||
return m_Chain[^1].PropertyType;
|
||||
return m_Chain[m_Chain.Length - 1].PropertyType;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace Server.Commands
|
||||
{
|
||||
public static class ShardTime
|
||||
public class ShardTime
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
|
|
@ -16,4 +16,4 @@ namespace Server.Commands
|
|||
e.Mobile.SendMessage(DateTime.UtcNow.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -4,7 +4,7 @@ using Server.Items;
|
|||
|
||||
namespace Server.Commands
|
||||
{
|
||||
public static class SignParser
|
||||
public class SignParser
|
||||
{
|
||||
private static Queue<Item> m_ToDelete = new Queue<Item>();
|
||||
|
||||
|
|
@ -76,7 +76,9 @@ namespace Server.Commands
|
|||
from.SendMessage("Sign generating complete.");
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage("{0} not found!", cfg);
|
||||
}
|
||||
}
|
||||
|
||||
public static void Add_Static(int itemID, Point3D location, Map map, string name)
|
||||
|
|
@ -92,8 +94,17 @@ namespace Server.Commands
|
|||
while (m_ToDelete.Count > 0)
|
||||
m_ToDelete.Dequeue().Delete();
|
||||
|
||||
Item sign = name.StartsWith("#") ? new LocalizedSign(itemID, Utility.ToInt32(name.Substring(1))) :
|
||||
new Sign(itemID) {Name = name};
|
||||
Item sign;
|
||||
|
||||
if (name.StartsWith("#"))
|
||||
{
|
||||
sign = new LocalizedSign(itemID, Utility.ToInt32(name.Substring(1)));
|
||||
}
|
||||
else
|
||||
{
|
||||
sign = new Sign(itemID);
|
||||
sign.Name = name;
|
||||
}
|
||||
|
||||
if (map == Map.Malas)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ using Server.Targeting;
|
|||
|
||||
namespace Server.Commands
|
||||
{
|
||||
public static class SkillsCommand
|
||||
public class SkillsCommand
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
|
|
@ -123,4 +123,4 @@ namespace Server.Commands
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3,7 +3,7 @@ using Server.Targeting;
|
|||
|
||||
namespace Server.Commands
|
||||
{
|
||||
public static class Skills
|
||||
public class Skills
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
|
|
@ -35,4 +35,4 @@ namespace Server.Commands
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +1,12 @@
|
|||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using Server.Commands;
|
||||
using Server.Gumps;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Commands
|
||||
namespace Server
|
||||
{
|
||||
public static class Statics
|
||||
public class Statics
|
||||
{
|
||||
private const string BaseFreezeWarning = "{0} " +
|
||||
"Those items <u>will be removed from the world</u> and placed into the server data files. " +
|
||||
|
|
@ -179,8 +180,11 @@ namespace Server.Commands
|
|||
|
||||
int totalFrozen = 0;
|
||||
|
||||
foreach (var (map, table) in mapTable)
|
||||
foreach (KeyValuePair<Map, Dictionary<Point2D, DeltaState>> de in mapTable)
|
||||
{
|
||||
Map map = de.Key;
|
||||
Dictionary<Point2D, DeltaState> table = de.Value;
|
||||
|
||||
TileMatrix matrix = map.Tiles;
|
||||
|
||||
using FileStream idxStream = OpenWrite(matrix.IndexStream);
|
||||
|
|
|
|||
|
|
@ -49,7 +49,9 @@ namespace Server.Commands
|
|||
pm.SendMessage("#{0}: {1}", i + 1, list[i].Name);
|
||||
}
|
||||
else
|
||||
{
|
||||
pm.SendMessage("Your visibility list is empty.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -69,7 +71,7 @@ namespace Server.Commands
|
|||
Mobile m = list[i];
|
||||
|
||||
if (!m.CanSee(pm) && Utility.InUpdateRange(m, pm))
|
||||
Packets.SendRemoveEntity(m.NetState, pm.Serial);
|
||||
m.Send(pm.RemovePacket);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -82,54 +84,58 @@ namespace Server.Commands
|
|||
|
||||
protected override void OnTarget(Mobile from, object targeted)
|
||||
{
|
||||
if (!(from is PlayerMobile pm) || !(targeted is Mobile targ))
|
||||
if (from is PlayerMobile pm && targeted is Mobile targ)
|
||||
{
|
||||
from.SendMessage("Add only mobiles to your visibility list.");
|
||||
return;
|
||||
}
|
||||
if (targ.AccessLevel <= pm.AccessLevel)
|
||||
{
|
||||
List<Mobile> list = pm.VisibilityList;
|
||||
|
||||
if (targ.AccessLevel > pm.AccessLevel)
|
||||
{
|
||||
pm.SendMessage("They can already see you!");
|
||||
return;
|
||||
}
|
||||
if (list.Contains(targ))
|
||||
{
|
||||
list.Remove(targ);
|
||||
pm.SendMessage("{0} has been removed from your visibility list.", targ.Name);
|
||||
}
|
||||
else
|
||||
{
|
||||
list.Add(targ);
|
||||
pm.SendMessage("{0} has been added to your visibility list.", targ.Name);
|
||||
}
|
||||
|
||||
List<Mobile> list = pm.VisibilityList;
|
||||
if (Utility.InUpdateRange(targ, from))
|
||||
{
|
||||
NetState ns = targ.NetState;
|
||||
|
||||
if (list.Contains(targ))
|
||||
{
|
||||
list.Remove(targ);
|
||||
pm.SendMessage("{0} has been removed from your visibility list.", targ.Name);
|
||||
if (ns != null)
|
||||
{
|
||||
if (targ.CanSee(pm))
|
||||
{
|
||||
ns.Send(MobileIncoming.Create(ns, targ, pm));
|
||||
|
||||
if (ObjectPropertyList.Enabled)
|
||||
{
|
||||
ns.Send(pm.OPLPacket);
|
||||
|
||||
foreach (Item item in pm.Items)
|
||||
ns.Send(item.OPLPacket);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ns.Send(pm.RemovePacket);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pm.SendMessage("They can already see you!");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
list.Add(targ);
|
||||
pm.SendMessage("{0} has been added to your visibility list.", targ.Name);
|
||||
}
|
||||
|
||||
if (Utility.InUpdateRange(targ, from))
|
||||
{
|
||||
NetState ns = targ.NetState;
|
||||
|
||||
if (ns != null)
|
||||
{
|
||||
if (targ.CanSee(pm))
|
||||
{
|
||||
Packets.SendMobileIncoming(ns, targ, pm);
|
||||
|
||||
if (ObjectPropertyList.Enabled)
|
||||
{
|
||||
pm.PropertyList.Send(ns);
|
||||
|
||||
foreach (Item item in pm.Items)
|
||||
item.PropertyList.SendOPLInfo(ns);
|
||||
}
|
||||
}
|
||||
else
|
||||
Packets.SendRemoveEntity(ns, pm.Serial);
|
||||
}
|
||||
from.SendMessage("Add only mobiles to your visibility list.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -5,7 +5,7 @@ using Server.Multis;
|
|||
|
||||
namespace Server.Commands
|
||||
{
|
||||
public static class Wipe
|
||||
public class Wipe
|
||||
{
|
||||
[Flags]
|
||||
public enum WipeType
|
||||
|
|
@ -74,7 +74,7 @@ namespace Server.Commands
|
|||
|
||||
if (!items && !multis || !mobiles)
|
||||
return;
|
||||
|
||||
|
||||
eable = map.GetObjectsInBounds(rect);
|
||||
|
||||
foreach (IEntity obj in eable)
|
||||
|
|
@ -91,4 +91,4 @@ namespace Server.Commands
|
|||
toDelete[i].Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -34,7 +34,9 @@ namespace Server.ContextMenus
|
|||
{
|
||||
}
|
||||
else if (book.HasSpell(m_Scroll.SpellID))
|
||||
{
|
||||
from.SendLocalizedMessage(500179); // That spell is already present in that spellbook.
|
||||
}
|
||||
else
|
||||
{
|
||||
int val = m_Scroll.SpellID - book.BookOffset;
|
||||
|
|
@ -45,11 +47,11 @@ namespace Server.ContextMenus
|
|||
|
||||
m_Scroll.Consume();
|
||||
|
||||
Packets.SendPlaySound(from.NetState, 0x249, book.GetWorldLocation());
|
||||
from.Send(new PlaySound(0x249, book.GetWorldLocation()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -4,6 +4,7 @@ using Server.Gumps;
|
|||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
using Server.Prompts;
|
||||
|
||||
namespace Server.Engines.BulkOrders
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Gumps;
|
||||
using Server.Multis;
|
||||
using Server.Prompts;
|
||||
using Server.Mobiles;
|
||||
using Server.ContextMenus;
|
||||
using Server.Items;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
using System.Linq;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.BulkOrders
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ namespace Server.Engines.BulkOrders
|
|||
{
|
||||
public class LargeTailorBOD : LargeBOD
|
||||
{
|
||||
public static readonly double[] m_TailoringMaterialChances =
|
||||
public static double[] m_TailoringMaterialChances =
|
||||
{
|
||||
0.857421875, // None
|
||||
0.125000000, // Spined
|
||||
|
|
@ -19,6 +19,7 @@ namespace Server.Engines.BulkOrders
|
|||
switch (Utility.Random(14))
|
||||
{
|
||||
default:
|
||||
case 0:
|
||||
entries = LargeBulkEntry.ConvertEntries(this, LargeBulkEntry.Farmer);
|
||||
break;
|
||||
case 1:
|
||||
|
|
|
|||
|
|
@ -357,14 +357,7 @@ namespace Server.Engines.BulkOrders
|
|||
int[][][] goldTable = m_GoldTable;
|
||||
|
||||
int typeIndex = ComputeType(type, itemCount);
|
||||
|
||||
int quanIndex = quantity switch
|
||||
{
|
||||
20 => 2,
|
||||
15 => 1,
|
||||
_ => 0
|
||||
};
|
||||
|
||||
int quanIndex = quantity == 20 ? 2 : quantity == 15 ? 1 : 0;
|
||||
int mtrlIndex = material >= BulkMaterialType.DullCopper && material <= BulkMaterialType.Valorite
|
||||
? 1 + (material - BulkMaterialType.DullCopper)
|
||||
: 0;
|
||||
|
|
@ -606,28 +599,11 @@ namespace Server.Engines.BulkOrders
|
|||
{
|
||||
int[][][] goldTable = Core.AOS ? m_AosGoldTable : m_OldGoldTable;
|
||||
|
||||
int typeIndex = itemCount switch
|
||||
{
|
||||
6 => 3,
|
||||
5 => 2,
|
||||
4 => 1,
|
||||
_ => 0
|
||||
} * 2 + (exceptional ? 1 : 0);
|
||||
|
||||
int quanIndex = quantity switch
|
||||
{
|
||||
20 => 2,
|
||||
15 => 1,
|
||||
_ => 0
|
||||
};
|
||||
|
||||
int mtrlIndex = material switch
|
||||
{
|
||||
BulkMaterialType.Barbed => 3,
|
||||
BulkMaterialType.Horned => 2,
|
||||
BulkMaterialType.Spined => 1,
|
||||
_ => 0
|
||||
};
|
||||
int typeIndex = (itemCount == 6 ? 3 : itemCount == 5 ? 2 : itemCount == 4 ? 1 : 0) * 2 + (exceptional ? 1 : 0);
|
||||
int quanIndex = quantity == 20 ? 2 : quantity == 15 ? 1 : 0;
|
||||
int mtrlIndex = material == BulkMaterialType.Barbed ? 3 :
|
||||
material == BulkMaterialType.Horned ? 2 :
|
||||
material == BulkMaterialType.Spined ? 1 : 0;
|
||||
|
||||
int gold = goldTable[typeIndex][quanIndex][mtrlIndex];
|
||||
|
||||
|
|
@ -639,7 +615,7 @@ namespace Server.Engines.BulkOrders
|
|||
|
||||
#region Constructors
|
||||
|
||||
private static readonly int[][] m_ClothHues =
|
||||
private static int[][] m_ClothHues =
|
||||
{
|
||||
new[] { 0x483, 0x48C, 0x488, 0x48A },
|
||||
new[] { 0x495, 0x48B, 0x486, 0x485 },
|
||||
|
|
@ -702,15 +678,13 @@ namespace Server.Engines.BulkOrders
|
|||
};
|
||||
}
|
||||
|
||||
private static Item CreateRunicKit(int type) =>
|
||||
type >= 1 && type <= 3
|
||||
? new RunicSewingKit(CraftResource.RegularLeather + type, 60 - type * 15)
|
||||
: throw new InvalidOperationException();
|
||||
private static Item CreateRunicKit(int type)
|
||||
{
|
||||
if (type >= 1 && type <= 3)
|
||||
return new RunicSewingKit(CraftResource.RegularLeather + type, 60 - type * 15);
|
||||
|
||||
private static Item CreatePowerScroll(int type) =>
|
||||
type == 5 || type == 10 || type == 15 || type == 20
|
||||
? new PowerScroll(SkillName.Tailoring, 100 + type)
|
||||
: throw new InvalidOperationException();
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
|
||||
private static Item CreatePowerScroll(int type)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -65,16 +65,22 @@ namespace Server.Engines.CannedEvil
|
|||
Skull = null;
|
||||
|
||||
if (from.Map != Map || !from.InRange(GetWorldLocation(), 3))
|
||||
{
|
||||
from.SendLocalizedMessage(500446); // That is too far away.
|
||||
}
|
||||
else if (!Harrower.CanSpawn)
|
||||
{
|
||||
from.SendMessage("The harrower has already been spawned.");
|
||||
}
|
||||
else if (m_Skull == null)
|
||||
{
|
||||
from.SendLocalizedMessage(1049485); // What would you like to sacrifice?
|
||||
from.Target = new SacrificeTarget(this);
|
||||
}
|
||||
else
|
||||
SendLocalizedMessageTo(from, 1049487); // I already have my champions awakening skull!
|
||||
{
|
||||
SendLocalizedMessageTo(from, 1049487, ""); // I already have my champions awakening skull!
|
||||
}
|
||||
}
|
||||
|
||||
public void EndSacrifice(Mobile from, ChampionSkull skull)
|
||||
|
|
@ -86,15 +92,25 @@ namespace Server.Engines.CannedEvil
|
|||
Skull = null;
|
||||
|
||||
if (from.Map != Map || !from.InRange(GetWorldLocation(), 3))
|
||||
{
|
||||
from.SendLocalizedMessage(500446); // That is too far away.
|
||||
}
|
||||
else if (!Harrower.CanSpawn)
|
||||
{
|
||||
from.SendMessage("The harrower has already been spawned.");
|
||||
}
|
||||
else if (skull == null)
|
||||
SendLocalizedMessageTo(from, 1049488); // That is not my champions awakening skull!
|
||||
{
|
||||
SendLocalizedMessageTo(from, 1049488, ""); // That is not my champions awakening skull!
|
||||
}
|
||||
else if (m_Skull != null)
|
||||
SendLocalizedMessageTo(from, 1049487); // I already have my champions awakening skull!
|
||||
{
|
||||
SendLocalizedMessageTo(from, 1049487, ""); // I already have my champions awakening skull!
|
||||
}
|
||||
else if (!skull.IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(1049486); // You can only sacrifice items that are in your backpack!
|
||||
}
|
||||
else
|
||||
{
|
||||
if (skull.Type == Type)
|
||||
|
|
@ -105,7 +121,9 @@ namespace Server.Engines.CannedEvil
|
|||
Skull = skull;
|
||||
}
|
||||
else
|
||||
SendLocalizedMessageTo(from, 1049488); // That is not my champions awakening skull!
|
||||
{
|
||||
SendLocalizedMessageTo(from, 1049488, ""); // That is not my champions awakening skull!
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -950,24 +950,24 @@ namespace Server.Engines.CannedEvil
|
|||
|
||||
Dictionary<Mobile, int> validEntries = new Dictionary<Mobile, int>();
|
||||
|
||||
foreach (var (key, value) in m_DamageEntries)
|
||||
if (IsEligible(key, artifact))
|
||||
foreach (KeyValuePair<Mobile, int> kvp in m_DamageEntries)
|
||||
if (IsEligible(kvp.Key, artifact))
|
||||
{
|
||||
validEntries.Add(key, value);
|
||||
totalDamage += value;
|
||||
validEntries.Add(kvp.Key, kvp.Value);
|
||||
totalDamage += kvp.Value;
|
||||
}
|
||||
|
||||
int randomDamage = Utility.RandomMinMax(1, totalDamage);
|
||||
|
||||
totalDamage = 0;
|
||||
|
||||
foreach (var (key, value) in validEntries)
|
||||
foreach (KeyValuePair<Mobile, int> kvp in validEntries)
|
||||
{
|
||||
totalDamage += value;
|
||||
totalDamage += kvp.Value;
|
||||
|
||||
if (totalDamage >= randomDamage)
|
||||
{
|
||||
GiveArtifact(key, artifact);
|
||||
GiveArtifact(kvp.Key, artifact);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
@ -1001,10 +1001,10 @@ namespace Server.Engines.CannedEvil
|
|||
|
||||
writer.Write(m_SPawnSzMod);
|
||||
writer.Write(m_DamageEntries.Count);
|
||||
foreach (var (key, value) in m_DamageEntries)
|
||||
foreach (KeyValuePair<Mobile, int> kvp in m_DamageEntries)
|
||||
{
|
||||
writer.Write(key);
|
||||
writer.Write(value);
|
||||
writer.Write(kvp.Key);
|
||||
writer.Write(kvp.Value);
|
||||
}
|
||||
|
||||
writer.Write(ConfinedRoaming);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Server.Engines.Chat
|
||||
{
|
||||
|
|
@ -402,7 +401,18 @@ namespace Server.Engines.Chat
|
|||
}
|
||||
}
|
||||
|
||||
public static Channel FindChannelByName(string name) => Channels.FirstOrDefault(channel => channel.m_Name == name);
|
||||
public static Channel FindChannelByName(string name)
|
||||
{
|
||||
for (int i = 0; i < Channels.Count; ++i)
|
||||
{
|
||||
Channel channel = Channels[i];
|
||||
|
||||
if (channel.m_Name == name)
|
||||
return channel;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void Initialize()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,13 +1,12 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Server.Accounting;
|
||||
using Server.Misc;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Engines.Chat
|
||||
{
|
||||
public static class ChatSystem
|
||||
public class ChatSystem
|
||||
{
|
||||
public static bool Enabled{ get; set; } = true;
|
||||
|
||||
|
|
@ -19,7 +18,7 @@ namespace Server.Engines.Chat
|
|||
|
||||
public static void SendCommandTo(Mobile to, ChatCommand type, string param1 = null, string param2 = null)
|
||||
{
|
||||
ChatPackets.SendChatMessage(to?.NetState, null, (int)type + 20, param1, param2);
|
||||
to?.Send(new ChatMessagePacket(null, (int)type + 20, param1, param2));
|
||||
}
|
||||
|
||||
public static void OpenChatWindowRequest(NetState state, PacketReader pvSrc)
|
||||
|
|
@ -62,11 +61,21 @@ namespace Server.Engines.Chat
|
|||
{
|
||||
// TODO: Optimize this search
|
||||
|
||||
if (Accounts.GetAccounts().Cast<Account>().Any(checkAccount => Insensitive.Equals(checkAccount.GetTag("ChatName")?.Trim(), chatName)))
|
||||
foreach (Account checkAccount in Accounts.GetAccounts())
|
||||
{
|
||||
from.SendMessage("Nickname already in use.");
|
||||
SendCommandTo(from, ChatCommand.AskNewNickname);
|
||||
return;
|
||||
string existingName = checkAccount.GetTag("ChatName");
|
||||
|
||||
if (existingName != null)
|
||||
{
|
||||
existingName = existingName.Trim();
|
||||
|
||||
if (Insensitive.Equals(existingName, chatName))
|
||||
{
|
||||
from.SendMessage("Nickname already in use.");
|
||||
SendCommandTo(from, ChatCommand.AskNewNickname);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
accountChatName = chatName;
|
||||
|
|
@ -120,15 +129,17 @@ namespace Server.Engines.Chat
|
|||
|
||||
if (handler.RequireConference && channel == null)
|
||||
user.SendMessage(31); /* You must be in a conference to do this.
|
||||
* To join a conference, select one from the Conference menu.
|
||||
*/
|
||||
* To join a conference, select one from the Conference menu.
|
||||
*/
|
||||
else if (handler.RequireModerator && !user.IsModerator)
|
||||
user.SendMessage(29); // You must have operator status to do this.
|
||||
else
|
||||
handler.Callback(user, channel, param);
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Client: {0}: Unknown chat action 0x{1:X}: {2}", state, actionID, param);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
|
@ -136,4 +147,4 @@ namespace Server.Engines.Chat
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
namespace Server.Engines.Chat
|
||||
{
|
||||
public static class ChatActionHandlers
|
||||
public class ChatActionHandlers
|
||||
{
|
||||
private static ChatActionHandler[] m_Handlers;
|
||||
|
||||
|
|
@ -112,8 +112,8 @@ namespace Server.Engines.Chat
|
|||
{
|
||||
from.IgnorePrivateMessage = true;
|
||||
from.SendMessage(38); /* You will no longer receive private messages.
|
||||
* Those who send you a message will be notified that you are blocking incoming messages.
|
||||
*/
|
||||
* Those who send you a message will be notified that you are blocking incoming messages.
|
||||
*/
|
||||
}
|
||||
|
||||
public static void TogglePrivateMessages(ChatUser from, Channel channel, string param)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Server.Accounting;
|
||||
|
||||
namespace Server.Engines.Chat
|
||||
|
|
@ -65,14 +64,16 @@ namespace Server.Engines.Chat
|
|||
return false;
|
||||
}
|
||||
|
||||
public void SendMessage(int number, string param1 = "", string param2 = "")
|
||||
public void SendMessage(int number, string param1 = null, string param2 = null)
|
||||
{
|
||||
ChatPackets.SendChatMessage(Mobile.NetState, Mobile, number, param1, param2);
|
||||
if (Mobile.NetState != null)
|
||||
Mobile.Send(new ChatMessagePacket(Mobile, number, param1, param2));
|
||||
}
|
||||
|
||||
public void SendMessage(int number, Mobile from, string param1 = "", string param2 = "")
|
||||
public void SendMessage(int number, Mobile from, string param1, string param2)
|
||||
{
|
||||
ChatPackets.SendChatMessage(Mobile.NetState, from, number, param1, param2);
|
||||
if (Mobile.NetState != null)
|
||||
Mobile.Send(new ChatMessagePacket(from, number, param1, param2));
|
||||
}
|
||||
|
||||
public bool IsIgnored(ChatUser check) => Ignored.Contains(check);
|
||||
|
|
@ -80,7 +81,9 @@ namespace Server.Engines.Chat
|
|||
public void AddIgnored(ChatUser user)
|
||||
{
|
||||
if (IsIgnored(user))
|
||||
{
|
||||
SendMessage(22, user.Username); // You are already ignoring %1.
|
||||
}
|
||||
else
|
||||
{
|
||||
Ignored.Add(user);
|
||||
|
|
@ -103,7 +106,9 @@ namespace Server.Engines.Chat
|
|||
SendMessage(26); // You are no longer ignoring anyone.
|
||||
}
|
||||
else
|
||||
{
|
||||
SendMessage(25, user.Username); // You are not ignoring %1.
|
||||
}
|
||||
}
|
||||
|
||||
public static ChatUser AddChatUser(Mobile from)
|
||||
|
|
@ -167,7 +172,18 @@ namespace Server.Engines.Chat
|
|||
return c;
|
||||
}
|
||||
|
||||
public static ChatUser GetChatUser(string username) => m_Users.FirstOrDefault(user => user.Username == username);
|
||||
public static ChatUser GetChatUser(string username)
|
||||
{
|
||||
for (int i = 0; i < m_Users.Count; ++i)
|
||||
{
|
||||
ChatUser user = m_Users[i];
|
||||
|
||||
if (user.Username == username)
|
||||
return user;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void GlobalSendCommand(ChatCommand command, string param1, string param2 = null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
namespace Server.Chat
|
||||
{
|
||||
public static class ChatSystem
|
||||
public class ChatSystem
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
|
|
@ -12,4 +12,4 @@ namespace Server.Chat
|
|||
e.Mobile.SendMessage("Chat is not currently supported.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,36 +1,28 @@
|
|||
using Server.Buffers;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Engines.Chat
|
||||
{
|
||||
public static class ChatPackets
|
||||
public sealed class ChatMessagePacket : Packet
|
||||
{
|
||||
public static void SendChatMessage(NetState ns, Mobile who, int number, string param1, string param2)
|
||||
public ChatMessagePacket(Mobile who, int number, string param1, string param2) : base(0xB2)
|
||||
{
|
||||
if (ns == null)
|
||||
return;
|
||||
if (param1 == null)
|
||||
param1 = string.Empty;
|
||||
|
||||
param1 ??= "";
|
||||
param2 ??= "";
|
||||
if (param2 == null)
|
||||
param2 = string.Empty;
|
||||
|
||||
int length = 13 + (param1.Length + param2.Length) * 2;
|
||||
//base(0xB2)
|
||||
EnsureCapacity(13 + (param1.Length + param2.Length) * 2);
|
||||
|
||||
SpanWriter writer = new SpanWriter(stackalloc byte[length]);
|
||||
writer.Write((byte)0xB2); // Packet ID
|
||||
writer.Write((ushort)length); // Dynamic Length
|
||||
|
||||
writer.Write((ushort)(number - 20));
|
||||
m_Stream.Write((ushort)(number - 20));
|
||||
|
||||
if (who != null)
|
||||
writer.WriteAsciiFixed(who.Language, 4);
|
||||
m_Stream.WriteAsciiFixed(who.Language, 4);
|
||||
else
|
||||
writer.Position += 4;
|
||||
m_Stream.Write(0);
|
||||
|
||||
writer.WriteBigUniNull(param1);
|
||||
writer.WriteBigUniNull(param2);
|
||||
|
||||
ns.Send(writer.Span);
|
||||
m_Stream.WriteBigUniNull(param1);
|
||||
m_Stream.WriteBigUniNull(param2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -512,7 +512,7 @@ namespace Server.Engines.ConPVP
|
|||
if (offset < offsets.Length)
|
||||
p = offsets[offset++];
|
||||
else
|
||||
p = offsets[^1];
|
||||
p = offsets[offsets.Length - 1];
|
||||
|
||||
p.X = p.X * matrix[0, 0] + p.Y * matrix[0, 1];
|
||||
p.Y = p.X * matrix[1, 0] + p.Y * matrix[1, 1];
|
||||
|
|
@ -574,15 +574,12 @@ namespace Server.Engines.ConPVP
|
|||
if (hasBounds)
|
||||
{
|
||||
List<Mobile> pets = new List<Mobile>();
|
||||
IPooledEnumerable eable = facet.GetMobilesInBounds(m_Bounds);
|
||||
|
||||
foreach (Mobile mob in eable)
|
||||
foreach (Mobile mob in facet.GetMobilesInBounds(m_Bounds))
|
||||
if (mob is BaseCreature pet && pet.Controlled && pet.ControlMaster != null &&
|
||||
Players.Contains(pet.ControlMaster))
|
||||
pets.Add(pet);
|
||||
|
||||
eable.Free();
|
||||
|
||||
foreach (Mobile pet in pets)
|
||||
{
|
||||
pet.Combatant = null;
|
||||
|
|
@ -752,7 +749,7 @@ namespace Server.Engines.ConPVP
|
|||
|
||||
#region Offsets & Rotation
|
||||
|
||||
private static readonly Point2D[] m_EdgeOffsets =
|
||||
private static Point2D[] m_EdgeOffsets =
|
||||
{
|
||||
/*
|
||||
* /\
|
||||
|
|
@ -775,7 +772,7 @@ namespace Server.Engines.ConPVP
|
|||
};
|
||||
|
||||
// nw corner
|
||||
private static readonly Point2D[] m_CornerOffsets =
|
||||
private static Point2D[] m_CornerOffsets =
|
||||
{
|
||||
/*
|
||||
* /\
|
||||
|
|
@ -796,7 +793,7 @@ namespace Server.Engines.ConPVP
|
|||
new Point2D(3, 0)
|
||||
};
|
||||
|
||||
private static readonly int[][,] m_Rotate =
|
||||
private static int[][,] m_Rotate =
|
||||
{
|
||||
new[,] { { +1, 0 }, { 0, +1 } }, // west
|
||||
new[,] { { -1, 0 }, { 0, -1 } }, // east
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ namespace Server.Engines.ConPVP
|
|||
if (spell is RecallSpell)
|
||||
from.SendMessage("You may not cast this spell.");
|
||||
|
||||
string title;
|
||||
string title = null;
|
||||
string option;
|
||||
|
||||
if (spell is ArcanistSpell)
|
||||
|
|
@ -854,9 +854,16 @@ namespace Server.Engines.ConPVP
|
|||
Participant p = Participants[i];
|
||||
|
||||
if (p.Eliminated)
|
||||
hasWinner |= ++eliminated == Participants.Count - 1;
|
||||
{
|
||||
++eliminated;
|
||||
|
||||
if (eliminated == Participants.Count - 1)
|
||||
hasWinner = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
winner = p;
|
||||
}
|
||||
}
|
||||
|
||||
return hasWinner ? winner ?? Participants[0] : null;
|
||||
|
|
@ -1623,7 +1630,16 @@ namespace Server.Engines.ConPVP
|
|||
int rx = dx - dy;
|
||||
int ry = dx + dy;
|
||||
|
||||
bool eastToWest = (rx < 0 || ry < 0) && (rx >= 0 || ry >= 0);
|
||||
bool eastToWest;
|
||||
|
||||
if (rx >= 0 && ry >= 0)
|
||||
eastToWest = false;
|
||||
else if (rx >= 0)
|
||||
eastToWest = true;
|
||||
else if (ry >= 0)
|
||||
eastToWest = true;
|
||||
else
|
||||
eastToWest = false;
|
||||
|
||||
Effects.PlaySound(wall, Arena.Facet, 0x1F6);
|
||||
|
||||
|
|
@ -1801,7 +1817,9 @@ namespace Server.Engines.ConPVP
|
|||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
defs = basedef.Options;
|
||||
}
|
||||
|
||||
int changes = 0;
|
||||
|
||||
|
|
@ -1981,7 +1999,9 @@ namespace Server.Engines.ConPVP
|
|||
if (!Registered)
|
||||
return;
|
||||
|
||||
StartedReadyCountdown |= count != -1;
|
||||
if (count != -1)
|
||||
StartedReadyCountdown = true;
|
||||
|
||||
ReadyCount = count;
|
||||
|
||||
if (count == 0)
|
||||
|
|
|
|||
|
|
@ -293,7 +293,7 @@ namespace Server.Engines.ConPVP
|
|||
|
||||
if (list.Count > 0)
|
||||
{
|
||||
Point3D p = list[^1];
|
||||
Point3D p = list[list.Count - 1];
|
||||
|
||||
if (p.X != ix || p.Y != iy || p.Z != iz)
|
||||
list.Add(new Point3D(ix, iy, iz));
|
||||
|
|
@ -308,7 +308,7 @@ namespace Server.Engines.ConPVP
|
|||
z += zslp;
|
||||
}
|
||||
|
||||
if (list.Count > 0 && list[^1] != dest)
|
||||
if (list.Count > 0 && list[list.Count - 1] != dest)
|
||||
list.Add(dest);
|
||||
|
||||
/*if ( dist3d > 4 && ( dest.X != org.X || dest.Y != org.Y ) )
|
||||
|
|
@ -429,7 +429,10 @@ namespace Server.Engines.ConPVP
|
|||
if (t.Z <= point.Z && t.Z + height >= point.Z &&
|
||||
(id.Flags & (TileFlag.Impassable | TileFlag.Wall | TileFlag.NoShoot)) != 0)
|
||||
{
|
||||
point = i > m_PathIdx ? m_Path[i - 1] : GetWorldLocation();
|
||||
if (i > m_PathIdx)
|
||||
point = m_Path[i - 1];
|
||||
else
|
||||
point = GetWorldLocation();
|
||||
HitObject(point, t.Z, height);
|
||||
return;
|
||||
}
|
||||
|
|
@ -445,9 +448,13 @@ namespace Server.Engines.ConPVP
|
|||
continue;
|
||||
|
||||
if (i is BRGoal)
|
||||
{
|
||||
height = 17;
|
||||
}
|
||||
else if (i is Blocker)
|
||||
{
|
||||
height = 20;
|
||||
}
|
||||
else
|
||||
{
|
||||
ItemData id = i.ItemData;
|
||||
|
|
@ -466,7 +473,10 @@ namespace Server.Engines.ConPVP
|
|||
(i is Blocker || loc.Z <= point.Z && loc.Z + height >= point.Z))
|
||||
{
|
||||
found = true;
|
||||
point = j > m_PathIdx ? m_Path[j - 1] : GetWorldLocation();
|
||||
if (j > m_PathIdx)
|
||||
point = m_Path[j - 1];
|
||||
else
|
||||
point = GetWorldLocation();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -484,7 +494,9 @@ namespace Server.Engines.ConPVP
|
|||
HitObject(point, loc.Z, height);
|
||||
}
|
||||
else
|
||||
{
|
||||
HitObject(point, loc.Z, height);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
@ -499,11 +511,12 @@ namespace Server.Engines.ConPVP
|
|||
if (m == null || m == Thrower)
|
||||
continue;
|
||||
|
||||
Point3D point;
|
||||
Point3D loc = m.Location;
|
||||
|
||||
for (int j = m_PathIdx; j < pathCheckEnd && !found; j++)
|
||||
{
|
||||
Point3D point = m_Path[j];
|
||||
point = m_Path[j];
|
||||
|
||||
if (loc.X == point.X && loc.Y == point.Y &&
|
||||
loc.Z <= point.Z && loc.Z + 16 >= point.Z)
|
||||
|
|
@ -537,10 +550,9 @@ namespace Server.Engines.ConPVP
|
|||
else if (m_Path.Count > 0)
|
||||
MoveToWorld(m_Path.Last);
|
||||
|
||||
int myZ = Map?.GetAverageZ(X, Y) ?? 0;
|
||||
|
||||
StaticTile[] statics = Map?.Tiles?.GetStaticTiles(X, Y, true) ?? new StaticTile[0];
|
||||
int myZ = Map.GetAverageZ(X, Y);
|
||||
|
||||
StaticTile[] statics = Map.Tiles.GetStaticTiles(X, Y, true);
|
||||
for (int j = 0; j < statics.Length; j++)
|
||||
{
|
||||
StaticTile t = statics[j];
|
||||
|
|
@ -664,7 +676,7 @@ namespace Server.Engines.ConPVP
|
|||
if (m_Bomb.Parent == null && m_Bomb.m_Game?.Controller != null)
|
||||
{
|
||||
if (!m_Bomb.m_Flying && m_Bomb.Map != Map.Internal)
|
||||
Effects.SendLocationEffect(m_Bomb.GetWorldLocation(), m_Bomb.Map, 0x377A, 16, 10, m_Bomb.Hue);
|
||||
Effects.SendLocationEffect(m_Bomb.GetWorldLocation(), m_Bomb.Map, 0x377A, 16, 10, m_Bomb.Hue, 0);
|
||||
|
||||
if (m_Bomb.Location != m_Bomb.m_Game.Controller.BombHome)
|
||||
{
|
||||
|
|
@ -971,7 +983,9 @@ namespace Server.Engines.ConPVP
|
|||
total = entries.Count;
|
||||
}
|
||||
else
|
||||
total += section.Players.Values.Count(player => player.Score > 0);
|
||||
foreach (BRPlayerInfo player in section.Players.Values)
|
||||
if (player.Score > 0)
|
||||
total++;
|
||||
|
||||
entries.Sort();
|
||||
|
||||
|
|
@ -1708,13 +1722,12 @@ namespace Server.Engines.ConPVP
|
|||
|
||||
for (int i = 0; i < m_Context.Participants.Count; ++i)
|
||||
{
|
||||
DuelPlayer[] players = m_Context.Participants[i]?.Players;
|
||||
if (players == null)
|
||||
if (!(m_Context.Participants[i] is Participant p) || p.Players == null)
|
||||
continue;
|
||||
|
||||
for (int j = 0; j < players.Length; ++j)
|
||||
for (int j = 0; j < p.Players.Length; ++j)
|
||||
{
|
||||
DuelPlayer dp = players[j];
|
||||
DuelPlayer dp = p.Players[j];
|
||||
|
||||
if (dp?.Mobile != null)
|
||||
{
|
||||
|
|
@ -1723,16 +1736,16 @@ namespace Server.Engines.ConPVP
|
|||
}
|
||||
}
|
||||
|
||||
if (i == winner?.TeamID)
|
||||
if (i == winner.TeamID)
|
||||
continue;
|
||||
|
||||
for (int j = 0; j < players.Length; ++j)
|
||||
if (players[j] != null)
|
||||
players[j].Eliminated = true;
|
||||
if (p.Players != null)
|
||||
for (int j = 0; j < p.Players.Length; ++j)
|
||||
if (p.Players[j] != null)
|
||||
p.Players[j].Eliminated = true;
|
||||
}
|
||||
|
||||
if (winner != null)
|
||||
m_Context.Finish(m_Context.Participants[winner.TeamID]);
|
||||
m_Context.Finish(m_Context.Participants[winner.TeamID]);
|
||||
}
|
||||
|
||||
public override void OnStop()
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Server.Gumps;
|
||||
using Server.Items;
|
||||
|
|
@ -71,13 +70,17 @@ namespace Server.Engines.ConPVP
|
|||
{
|
||||
CTFTeamInfo teamInfo = game.Controller.TeamInfo[i % 8];
|
||||
|
||||
if (teamInfo?.Flag != null)
|
||||
entries.Add(teamInfo);
|
||||
if (teamInfo?.Flag == null)
|
||||
continue;
|
||||
|
||||
entries.Add(teamInfo);
|
||||
}
|
||||
else
|
||||
entries.AddRange(section.Players.Values.Where(player => player.Score > 0));
|
||||
foreach (CTFPlayerInfo player in section.Players.Values)
|
||||
if (player.Score > 0)
|
||||
entries.Add(player);
|
||||
|
||||
entries.Sort((a, b) => b.Score - a.Score);
|
||||
entries.Sort(delegate(IRankedCTF a, IRankedCTF b) { return b.Score - a.Score; });
|
||||
|
||||
int height = 0;
|
||||
|
||||
|
|
@ -108,8 +111,7 @@ namespace Server.Engines.ConPVP
|
|||
if (section == null)
|
||||
for (int i = 0; i < entries.Count; ++i)
|
||||
{
|
||||
if (!(entries[i] is CTFTeamInfo teamInfo))
|
||||
continue;
|
||||
CTFTeamInfo teamInfo = entries[i] as CTFTeamInfo;
|
||||
|
||||
AddImage(30, 70 + i * 75, 10152);
|
||||
AddImage(30, 85 + i * 75, 10151);
|
||||
|
|
@ -192,7 +194,10 @@ namespace Server.Engines.ConPVP
|
|||
|
||||
private void AddColoredText(int x, int y, int width, int height, string text, int color)
|
||||
{
|
||||
AddHtml(x, y, width, height, color == 0 ? text : Color(text, color));
|
||||
if (color == 0)
|
||||
AddHtml(x, y, width, height, text);
|
||||
else
|
||||
AddHtml(x, y, width, height, Color(text, color));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -241,8 +246,10 @@ namespace Server.Engines.ConPVP
|
|||
else if (ourTeam == useTeam)
|
||||
{
|
||||
if (Location == m_TeamInfo.Origin && Map == m_TeamInfo.Game.Facet)
|
||||
Packets.SendUnicodeMessage(from.NetState, Serial, ItemID, MessageType.Regular, 0x3B2, 3, "ENU", Name,
|
||||
"Touch me not for I am chaste.");
|
||||
{
|
||||
from.Send(new UnicodeMessage(Serial, ItemID, MessageType.Regular, 0x3B2, 3, "ENU", Name,
|
||||
"Touch me not for I am chaste."));
|
||||
}
|
||||
else
|
||||
{
|
||||
CTFPlayerInfo playerInfo = useTeam[from];
|
||||
|
|
@ -299,7 +306,9 @@ namespace Server.Engines.ConPVP
|
|||
m_ReturnCount = Math.Min(m_ReturnCount, 10);
|
||||
}
|
||||
else
|
||||
{
|
||||
SendHome();
|
||||
}
|
||||
}
|
||||
|
||||
private void StopCountdown()
|
||||
|
|
@ -408,7 +417,9 @@ namespace Server.Engines.ConPVP
|
|||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.LocalOverheadMessage(MessageType.Regular, 0x26, false, "Those are not my cookies.");
|
||||
}
|
||||
}
|
||||
else if (obj is Mobile passTo)
|
||||
{
|
||||
|
|
@ -932,8 +943,15 @@ namespace Server.Engines.ConPVP
|
|||
|
||||
if (ourFlagCarrier != null && GetTeamInfo(ourFlagCarrier) == teamInfo)
|
||||
{
|
||||
if (ourFlagCarrier.Aggressors.Any(t => t.Defender == ourFlagCarrier && t.Attacker == mob))
|
||||
for (int j = 0; j < ourFlagCarrier.Aggressors.Count; ++j)
|
||||
{
|
||||
if (!(ourFlagCarrier.Aggressors[j] is AggressorInfo aggr) ||
|
||||
aggr.Defender != ourFlagCarrier || aggr.Attacker != mob)
|
||||
continue;
|
||||
|
||||
playerInfo.Score += 2; // helped defend guy capturing enemy flag
|
||||
break;
|
||||
}
|
||||
|
||||
if (mob.Map == ourFlagCarrier.Map && ourFlagCarrier.InRange(mob, 12))
|
||||
playerInfo.Score += 1; // helped defend guy capturing enemy flag
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Server.Gumps;
|
||||
using Server.Items;
|
||||
|
|
@ -73,9 +72,11 @@ namespace Server.Engines.ConPVP
|
|||
entries.Add(teamInfo);
|
||||
}
|
||||
else
|
||||
entries.AddRange(section.Players.Values.Where(player => player.Score > 0));
|
||||
foreach (DDPlayerInfo player in section.Players.Values)
|
||||
if (player.Score > 0)
|
||||
entries.Add(player);
|
||||
|
||||
entries.Sort((a, b) => b.Score - a.Score);
|
||||
entries.Sort(delegate(IRankedCTF a, IRankedCTF b) { return b.Score - a.Score; });
|
||||
|
||||
int height = 0;
|
||||
|
||||
|
|
@ -106,8 +107,7 @@ namespace Server.Engines.ConPVP
|
|||
if (section == null)
|
||||
for (int i = 0; i < entries.Count; ++i)
|
||||
{
|
||||
if (!(entries[i] is DDTeamInfo teamInfo))
|
||||
continue;
|
||||
DDTeamInfo teamInfo = entries[i] as DDTeamInfo;
|
||||
|
||||
AddImage(30, 70 + i * 75, 10152);
|
||||
AddImage(30, 85 + i * 75, 10151);
|
||||
|
|
|
|||
|
|
@ -171,7 +171,8 @@ namespace Server.Engines.ConPVP
|
|||
|
||||
King = m;
|
||||
|
||||
m_KingTimer ??= new KingTimer(this);
|
||||
if (m_KingTimer == null)
|
||||
m_KingTimer = new KingTimer(this);
|
||||
m_KingTimer.Stop();
|
||||
m_KingTimer.StartHillTicker();
|
||||
|
||||
|
|
@ -1112,13 +1113,12 @@ namespace Server.Engines.ConPVP
|
|||
|
||||
for (int i = 0; i < m_Context.Participants.Count; ++i)
|
||||
{
|
||||
DuelPlayer[] players = m_Context.Participants[i]?.Players;
|
||||
if (players == null)
|
||||
if (!(m_Context.Participants[i] is Participant p) || p.Players == null)
|
||||
continue;
|
||||
|
||||
for (int j = 0; j < players.Length; ++j)
|
||||
for (int j = 0; j < p.Players.Length; ++j)
|
||||
{
|
||||
DuelPlayer dp = players[j];
|
||||
DuelPlayer dp = p.Players[j];
|
||||
|
||||
if (dp?.Mobile != null)
|
||||
{
|
||||
|
|
@ -1130,9 +1130,10 @@ namespace Server.Engines.ConPVP
|
|||
if (i == winner?.TeamID)
|
||||
continue;
|
||||
|
||||
for (int j = 0; j < players.Length; ++j)
|
||||
if (players[j] != null)
|
||||
players[j].Eliminated = true;
|
||||
if (p.Players != null)
|
||||
for (int j = 0; j < p.Players.Length; ++j)
|
||||
if (p.Players[j] != null)
|
||||
p.Players[j].Eliminated = true;
|
||||
}
|
||||
|
||||
if (winner != null)
|
||||
|
|
@ -1148,7 +1149,7 @@ namespace Server.Engines.ConPVP
|
|||
if (Controller.Hills[i] != null)
|
||||
Controller.Hills[i].Game = null;
|
||||
|
||||
foreach (var board in Controller.Boards)
|
||||
foreach (KHBoard board in Controller.Boards)
|
||||
if (board != null)
|
||||
board.m_Game = null;
|
||||
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ namespace Server.Engines.ConPVP
|
|||
|
||||
foreach (Mobile view in mob.GetMobilesInRange(18))
|
||||
if (!mob.CanSee(view))
|
||||
Packets.SendRemoveEntity(mob.NetState, view.Serial);
|
||||
mob.Send(view.RemovePacket);
|
||||
|
||||
mob.LocalOverheadMessage(MessageType.Emote, 0x3B2, false,
|
||||
"* Your mind focuses intently on the fight and all other distractions fade away *");
|
||||
|
|
|
|||
|
|
@ -93,7 +93,9 @@ namespace Server.Engines.ConPVP
|
|||
for (int i = 0; i < info.Switches.Length; ++i)
|
||||
{
|
||||
int sid = info.Switches[i];
|
||||
opts[sid] |= sid >= 0 && sid < m_Page.Options.Length;
|
||||
|
||||
if (sid >= 0 && sid < m_Page.Options.Length)
|
||||
opts[sid] = true;
|
||||
}
|
||||
|
||||
for (int i = 0; i < opts.Length; ++i)
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ namespace Server.Engines.ConPVP
|
|||
}
|
||||
|
||||
Resize(Players.Length + 1);
|
||||
Players[^1] = new DuelPlayer(player, this);
|
||||
Players[Players.Length - 1] = new DuelPlayer(player, this);
|
||||
}
|
||||
|
||||
public void Resize(int count)
|
||||
|
|
|
|||
|
|
@ -433,7 +433,7 @@ namespace Server.Engines.ConPVP
|
|||
if (Pyramid.Levels.Count < 1)
|
||||
break;
|
||||
|
||||
PyramidLevel top = Pyramid.Levels[^1];
|
||||
PyramidLevel top = Pyramid.Levels[Pyramid.Levels.Count - 1];
|
||||
|
||||
if (top.FreeAdvance != null || top.Matches.Count != 1)
|
||||
break;
|
||||
|
|
@ -451,7 +451,7 @@ namespace Server.Engines.ConPVP
|
|||
if (Pyramid.Levels.Count < 2)
|
||||
break;
|
||||
|
||||
PyramidLevel top = Pyramid.Levels[^1];
|
||||
PyramidLevel top = Pyramid.Levels[Pyramid.Levels.Count - 1];
|
||||
|
||||
if (top.FreeAdvance != null || top.Matches.Count != 1)
|
||||
break;
|
||||
|
|
@ -471,7 +471,7 @@ namespace Server.Engines.ConPVP
|
|||
GiveAwards(part.Players, TrophyRank.Silver, cash / 2);
|
||||
}
|
||||
|
||||
PyramidLevel next = Pyramid.Levels[^2];
|
||||
PyramidLevel next = Pyramid.Levels[Pyramid.Levels.Count - 2];
|
||||
|
||||
if (next.Matches.Count > 2)
|
||||
break;
|
||||
|
|
@ -495,7 +495,7 @@ namespace Server.Engines.ConPVP
|
|||
}
|
||||
}
|
||||
|
||||
private void GiveAwards(IReadOnlyList<Mobile> players, TrophyRank rank, int cash)
|
||||
private void GiveAwards(List<Mobile> players, TrophyRank rank, int cash)
|
||||
{
|
||||
if (players.Count == 0)
|
||||
return;
|
||||
|
|
@ -663,39 +663,69 @@ namespace Server.Engines.ConPVP
|
|||
try
|
||||
{
|
||||
if (EventController != null)
|
||||
{
|
||||
Alert("The tournament has completed!",
|
||||
$"Team {EventController.GetTeamName(Pyramid.Levels[0].Matches[0].Participants.IndexOf(winner))} has won!");
|
||||
}
|
||||
else if (TourneyType == TourneyType.RandomTeam)
|
||||
{
|
||||
Alert("The tournament has completed!",
|
||||
$"Team {Pyramid.Levels[0].Matches[0].Participants.IndexOf(winner) + 1} has won!");
|
||||
}
|
||||
else if (TourneyType == TourneyType.Faction)
|
||||
{
|
||||
if (m_ParticipantsPerMatch == 4)
|
||||
{
|
||||
string name = Pyramid.Levels[0].Matches[0].Participants.IndexOf(winner) switch
|
||||
string name = "(null)";
|
||||
|
||||
switch (Pyramid.Levels[0].Matches[0].Participants.IndexOf(
|
||||
winner))
|
||||
{
|
||||
0 => "Minax",
|
||||
1 => "Council of Mages",
|
||||
2 => "True Britannians",
|
||||
3 => "Shadowlords",
|
||||
_ => "(null)"
|
||||
};
|
||||
case 0:
|
||||
{
|
||||
name = "Minax";
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
name = "Council of Mages";
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
name = "True Britannians";
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
name = "Shadowlords";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Alert("The tournament has completed!", $"The {name} team has won!");
|
||||
}
|
||||
else if (m_ParticipantsPerMatch == 2)
|
||||
{
|
||||
Alert("The tournament has completed!",
|
||||
$"The {(Pyramid.Levels[0].Matches[0].Participants.IndexOf(winner) == 0 ? "Evil" : "Hero")} team has won!");
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert("The tournament has completed!",
|
||||
$"Team {Pyramid.Levels[0].Matches[0].Participants.IndexOf(winner) + 1} has won!");
|
||||
}
|
||||
}
|
||||
else if (TourneyType == TourneyType.RedVsBlue)
|
||||
{
|
||||
Alert("The tournament has completed!",
|
||||
$"Team {(Pyramid.Levels[0].Matches[0].Participants.IndexOf(winner) == 0 ? "Red" : "Blue")} has won!");
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert("The tournament has completed!",
|
||||
$"{winner.NameList} {(winner.Players.Count > 1 ? "are" : "is")} the champion{(winner.Players.Count == 1 ? "" : "s")}.");
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
|
@ -709,7 +739,7 @@ namespace Server.Engines.ConPVP
|
|||
}
|
||||
else if (Pyramid.Levels.Count > 0)
|
||||
{
|
||||
PyramidLevel activeLevel = Pyramid.Levels[^1];
|
||||
PyramidLevel activeLevel = Pyramid.Levels[Pyramid.Levels.Count - 1];
|
||||
bool stillGoing = false;
|
||||
|
||||
for (int i = 0; i < activeLevel.Matches.Count; ++i)
|
||||
|
|
@ -816,6 +846,7 @@ namespace Server.Engines.ConPVP
|
|||
$"The {(Pyramid.Levels[0].Matches[0].Participants.IndexOf(winner) == 0 ? "Evil" : "Hero")} team has won!");
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert("The tournament has completed!",
|
||||
$"Team {Pyramid.Levels[0].Matches[0].Participants.IndexOf(winner) + 1} has won!");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -484,7 +484,8 @@ namespace Server.Engines.Craft
|
|||
if (m_TypesTable[j][0] == baseType)
|
||||
types[i] = m_TypesTable[j];
|
||||
|
||||
types[i] ??= new[] { baseType };
|
||||
if (types[i] == null)
|
||||
types[i] = new[] { baseType };
|
||||
|
||||
amounts[i] = craftRes.Amount;
|
||||
|
||||
|
|
@ -909,7 +910,8 @@ namespace Server.Engines.Craft
|
|||
hammer.Delete();
|
||||
}
|
||||
|
||||
toolBroken |= tool.UsesRemaining < 1 && tool.BreakOnDepletion;
|
||||
if (tool.UsesRemaining < 1 && tool.BreakOnDepletion)
|
||||
toolBroken = true;
|
||||
|
||||
if (toolBroken)
|
||||
tool.Delete();
|
||||
|
|
@ -1031,7 +1033,8 @@ namespace Server.Engines.Craft
|
|||
|
||||
tool.UsesRemaining--;
|
||||
|
||||
toolBroken |= tool.UsesRemaining < 1 && tool.BreakOnDepletion;
|
||||
if (tool.UsesRemaining < 1 && tool.BreakOnDepletion)
|
||||
toolBroken = true;
|
||||
|
||||
if (toolBroken)
|
||||
tool.Delete();
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ namespace Server.Engines.Craft
|
|||
|
||||
public int ID{ get; }
|
||||
|
||||
public TextDefinition TextDefinition => m_TD ??= new TextDefinition(CraftItem.NameNumber, CraftItem.NameString);
|
||||
public TextDefinition TextDefinition => m_TD ?? (m_TD = new TextDefinition(CraftItem.NameNumber, CraftItem.NameString));
|
||||
|
||||
public static void Initialize()
|
||||
{
|
||||
|
|
@ -52,13 +52,15 @@ namespace Server.Engines.Craft
|
|||
{
|
||||
if (targeted is PlayerMobile mobile)
|
||||
{
|
||||
foreach (var (key, _) in Recipes)
|
||||
mobile.AcquireRecipe(key);
|
||||
foreach (KeyValuePair<int, Recipe> kvp in Recipes)
|
||||
mobile.AcquireRecipe(kvp.Key);
|
||||
|
||||
m.SendMessage("You teach them all of the recipes.");
|
||||
}
|
||||
else
|
||||
{
|
||||
m.SendMessage("That is not a player!");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -84,4 +86,4 @@ namespace Server.Engines.Craft
|
|||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -491,7 +491,7 @@ namespace Server.Engines.Craft
|
|||
|
||||
if (!usingDeed)
|
||||
{
|
||||
m_CraftSystem.GetContext(from);
|
||||
CraftContext context = m_CraftSystem.GetContext(from);
|
||||
from.SendGump(new CraftGump(from, m_CraftSystem, m_Tool, number));
|
||||
}
|
||||
else
|
||||
|
|
@ -504,4 +504,4 @@ namespace Server.Engines.Craft
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -17,7 +17,7 @@ namespace Server.Engines.Craft
|
|||
|
||||
public override int GumpTitleNumber => 1044001;
|
||||
|
||||
public static CraftSystem CraftSystem => m_CraftSystem ??= new DefAlchemy();
|
||||
public static CraftSystem CraftSystem => m_CraftSystem ?? (m_CraftSystem = new DefAlchemy());
|
||||
|
||||
public override double GetChanceAtMin(CraftItem item) => 0.0;
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ namespace Server.Engines.Craft
|
|||
|
||||
public override int GumpTitleNumber => 1044002;
|
||||
|
||||
public static CraftSystem CraftSystem => m_CraftSystem ??= new DefBlacksmithy();
|
||||
public static CraftSystem CraftSystem => m_CraftSystem ?? (m_CraftSystem = new DefBlacksmithy());
|
||||
|
||||
public override CraftECA ECA => CraftECA.ChanceMinusSixtyToFourtyFive;
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ namespace Server.Engines.Craft
|
|||
|
||||
public override int GumpTitleNumber => 1044006;
|
||||
|
||||
public static CraftSystem CraftSystem => m_CraftSystem ??= new DefBowFletching();
|
||||
public static CraftSystem CraftSystem => m_CraftSystem ?? (m_CraftSystem = new DefBowFletching());
|
||||
|
||||
public override CraftECA ECA => CraftECA.FiftyPercentChanceMinusTenPercent;
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ namespace Server.Engines.Craft
|
|||
|
||||
public override int GumpTitleNumber => 1044004;
|
||||
|
||||
public static CraftSystem CraftSystem => m_CraftSystem ??= new DefCarpentry();
|
||||
public static CraftSystem CraftSystem => m_CraftSystem ?? (m_CraftSystem = new DefCarpentry());
|
||||
|
||||
public override double GetChanceAtMin(CraftItem item) => 0.5;
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ namespace Server.Engines.Craft
|
|||
|
||||
public override int GumpTitleNumber => 1044008;
|
||||
|
||||
public static CraftSystem CraftSystem => m_CraftSystem ??= new DefCartography();
|
||||
public static CraftSystem CraftSystem => m_CraftSystem ?? (m_CraftSystem = new DefCartography());
|
||||
|
||||
public override double GetChanceAtMin(CraftItem item) => 0.0;
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ namespace Server.Engines.Craft
|
|||
|
||||
public override int GumpTitleNumber => 1044003;
|
||||
|
||||
public static CraftSystem CraftSystem => m_CraftSystem ??= new DefCooking();
|
||||
public static CraftSystem CraftSystem => m_CraftSystem ?? (m_CraftSystem = new DefCooking());
|
||||
|
||||
public override CraftECA ECA => CraftECA.ChanceMinusSixtyToFourtyFive;
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ namespace Server.Engines.Craft
|
|||
|
||||
public override int GumpTitleNumber => 1044622;
|
||||
|
||||
public static CraftSystem CraftSystem => m_CraftSystem ??= new DefGlassblowing();
|
||||
public static CraftSystem CraftSystem => m_CraftSystem ?? (m_CraftSystem = new DefGlassblowing());
|
||||
|
||||
public override double GetChanceAtMin(CraftItem item) => item.ItemType == typeof(HollowPrism) ? 0.5 : 0.0;
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ namespace Server.Engines.Craft
|
|||
|
||||
public override int GumpTitleNumber => 1044009;
|
||||
|
||||
public static CraftSystem CraftSystem => m_CraftSystem ??= new DefInscription();
|
||||
public static CraftSystem CraftSystem => m_CraftSystem ?? (m_CraftSystem = new DefInscription());
|
||||
|
||||
public override double GetChanceAtMin(CraftItem item) => 0.0;
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ namespace Server.Engines.Craft
|
|||
|
||||
public override int GumpTitleNumber => 1044500;
|
||||
|
||||
public static CraftSystem CraftSystem => m_CraftSystem ??= new DefMasonry();
|
||||
public static CraftSystem CraftSystem => m_CraftSystem ?? (m_CraftSystem = new DefMasonry());
|
||||
|
||||
public override double GetChanceAtMin(CraftItem item) => 0.0;
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ namespace Server.Engines.Craft
|
|||
|
||||
public override int GumpTitleNumber => 1044005;
|
||||
|
||||
public static CraftSystem CraftSystem => m_CraftSystem ??= new DefTailoring();
|
||||
public static CraftSystem CraftSystem => m_CraftSystem ?? (m_CraftSystem = new DefTailoring());
|
||||
|
||||
public override CraftECA ECA => CraftECA.ChanceMinusSixtyToFourtyFive;
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ namespace Server.Engines.Craft
|
|||
|
||||
public override int GumpTitleNumber => 1044007;
|
||||
|
||||
public static CraftSystem CraftSystem => m_CraftSystem ??= new DefTinkering();
|
||||
public static CraftSystem CraftSystem => m_CraftSystem ?? (m_CraftSystem = new DefTinkering());
|
||||
|
||||
public override double GetChanceAtMin(CraftItem item)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -5,6 +5,11 @@ using Server.Mobiles;
|
|||
using Server.Network;
|
||||
using Server.Spells;
|
||||
|
||||
/*
|
||||
this is From me to you, Under no terms, Conditions... K? to apply you
|
||||
just simply Unpatch/delete, Stick these in, Same location.. Restart
|
||||
*/
|
||||
|
||||
namespace Server.Engines.Doom
|
||||
{
|
||||
public class LeverPuzzleController : Item
|
||||
|
|
@ -321,7 +326,7 @@ namespace Server.Engines.Doom
|
|||
SendLocationEffect(lp_Center, 0x1153, 0, 60, 1);
|
||||
PlaySounds(lp_Center, cs1);
|
||||
|
||||
Effects.SendBoltEffect(player);
|
||||
Effects.SendBoltEffect(player, true);
|
||||
player.MoveToWorld(lr_Enter, Map.Malas);
|
||||
|
||||
m_Timer = new LampRoomTimer(this);
|
||||
|
|
@ -412,24 +417,25 @@ namespace Server.Engines.Doom
|
|||
|
||||
public static void SendLocationEffect(IPoint3D p, int itemID, int speed, int duration, int hue)
|
||||
{
|
||||
Effects.SendLocationEffect(p, Map.Malas, itemID, speed, duration, hue);
|
||||
Effects.SendPacket(p, Map.Malas, new LocationEffect(p, itemID, speed, duration, hue, 0));
|
||||
}
|
||||
|
||||
public static void PlayerSendASCII(Mobile player, int index)
|
||||
{
|
||||
Packets.SendAsciiMessage(player.NetState, Serial.MinusOne, 0xFFFF, MessageType.Label, MsgParams[index][0],
|
||||
MsgParams[index][1], null, Msgs[index]);
|
||||
player.Send(new AsciiMessage(Serial.MinusOne, 0xFFFF, MessageType.Label, MsgParams[index][0],
|
||||
MsgParams[index][1], null, Msgs[index]));
|
||||
}
|
||||
|
||||
/* I cant find any better way to send "speech" using fonts other than default */
|
||||
public static void POHMessage(Mobile from, int index)
|
||||
{
|
||||
IPooledEnumerable eable = from.Map.GetClientsInRange(from.Location);
|
||||
foreach (NetState state in eable)
|
||||
Packets.SendAsciiMessage(state, from.Serial, from.Body, MessageType.Regular, MsgParams[index][0],
|
||||
Packet p = new AsciiMessage(from.Serial, from.Body, MessageType.Regular, MsgParams[index][0],
|
||||
MsgParams[index][1], from.Name, Msgs[index]);
|
||||
p.Acquire();
|
||||
foreach (NetState state in from.Map.GetClientsInRange(from.Location))
|
||||
state.Send(p);
|
||||
|
||||
eable.Free();
|
||||
Packet.Release(p);
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ namespace Server.Engines.Doom
|
|||
|
||||
public void CallBackMessage()
|
||||
{
|
||||
PublicOverheadMessage(MessageType.Regular, 0x3B2, 1060003); // You try to pry the box open...
|
||||
PublicOverheadMessage(MessageType.Regular, 0x3B2, 1060003, ""); // You try to pry the box open...
|
||||
}
|
||||
|
||||
public override void OnAfterDelete()
|
||||
|
|
|
|||
|
|
@ -77,15 +77,17 @@ namespace Server.Engines.Doom
|
|||
public Mobile m_Occupant;
|
||||
|
||||
public LeverPuzzleRegion(LeverPuzzleController controller, int[] loc)
|
||||
: base(null, Map.Malas, Find(LeverPuzzleController.lr_Enter, Map.Malas), new Rectangle2D(loc[0], loc[1], 1, 1)) =>
|
||||
: base(null, Map.Malas, Find(LeverPuzzleController.lr_Enter, Map.Malas), new Rectangle2D(loc[0], loc[1], 1, 1))
|
||||
{
|
||||
Register();
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public Mobile Occupant => m_Occupant?.Alive == true ? m_Occupant : null;
|
||||
|
||||
public override void OnEnter(Mobile m)
|
||||
{
|
||||
if (m_Occupant == null && m is PlayerMobile && m.Alive)
|
||||
if (m != null && m_Occupant == null && m is PlayerMobile && m.Alive)
|
||||
m_Occupant = m;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -93,8 +93,8 @@ namespace Server.Ethics
|
|||
if (IsImbued(child, true))
|
||||
return true;
|
||||
|
||||
public static bool IsImbued(Item item, bool recurse) =>
|
||||
Find(item) != null || recurse && item.Items.Any(child => IsImbued(child, true));
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void Initialize()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -33,9 +33,7 @@ namespace Server.Ethics.Evil
|
|||
|
||||
SpellHelper.GetSurfaceTop(ref p);
|
||||
|
||||
IPooledEnumerable eable = from.Mobile.GetMobilesInRange(6);
|
||||
|
||||
foreach (Mobile mob in eable)
|
||||
foreach (Mobile mob in from.Mobile.GetMobilesInRange(6))
|
||||
{
|
||||
if (mob == from.Mobile || !SpellHelper.ValidIndirectTarget(from.Mobile, mob))
|
||||
continue;
|
||||
|
|
@ -56,8 +54,6 @@ namespace Server.Ethics.Evil
|
|||
powerFunctioned = true;
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
|
||||
if (powerFunctioned)
|
||||
{
|
||||
SpellHelper.Turn(from.Mobile, p);
|
||||
|
|
@ -75,4 +71,4 @@ namespace Server.Ethics.Evil
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -80,11 +80,13 @@ namespace Server.Ethics.Evil
|
|||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.Append('.');
|
||||
}
|
||||
|
||||
from.Mobile.LocalOverheadMessage(MessageType.Regular, 0x59, false, sb.ToString());
|
||||
|
||||
FinishInvoke(from);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -33,9 +33,7 @@ namespace Server.Ethics.Hero
|
|||
|
||||
SpellHelper.GetSurfaceTop(ref p);
|
||||
|
||||
IPooledEnumerable eable = from.Mobile.GetMobilesInRange(6);
|
||||
|
||||
foreach (Mobile mob in eable)
|
||||
foreach (Mobile mob in from.Mobile.GetMobilesInRange(6))
|
||||
{
|
||||
if (mob != from.Mobile && SpellHelper.ValidIndirectTarget(from.Mobile, mob))
|
||||
continue;
|
||||
|
|
@ -56,8 +54,6 @@ namespace Server.Ethics.Hero
|
|||
powerFunctioned = true;
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
|
||||
if (powerFunctioned)
|
||||
{
|
||||
SpellHelper.Turn(from.Mobile, p);
|
||||
|
|
@ -75,4 +71,4 @@ namespace Server.Ethics.Hero
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -80,11 +80,13 @@ namespace Server.Ethics.Hero
|
|||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.Append('.');
|
||||
}
|
||||
|
||||
from.Mobile.LocalOverheadMessage(MessageType.Regular, 0x59, false, sb.ToString());
|
||||
|
||||
FinishInvoke(from);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -8,6 +8,7 @@ using Server.Ethics;
|
|||
using Server.Guilds;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Prompts;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Factions
|
||||
|
|
@ -132,12 +133,21 @@ namespace Server.Factions
|
|||
|
||||
public static void HandleAtrophy()
|
||||
{
|
||||
if (Factions.Any(f => !f.State.IsAtrophyReady))
|
||||
return;
|
||||
foreach (Faction f in Factions)
|
||||
if (!f.State.IsAtrophyReady)
|
||||
return;
|
||||
|
||||
List<PlayerState> activePlayers = (from f in Factions from ps in f.Members where ps.KillPoints > 0 && ps.IsActive select ps).ToList();
|
||||
List<PlayerState> activePlayers = new List<PlayerState>();
|
||||
|
||||
int distrib = Factions.Sum(f => f.State.CheckAtrophy());
|
||||
foreach (Faction f in Factions)
|
||||
foreach (PlayerState ps in f.Members)
|
||||
if (ps.KillPoints > 0 && ps.IsActive)
|
||||
activePlayers.Add(ps);
|
||||
|
||||
int distrib = 0;
|
||||
|
||||
foreach (Faction f in Factions)
|
||||
distrib += f.State.CheckAtrophy();
|
||||
|
||||
if (activePlayers.Count == 0)
|
||||
return;
|
||||
|
|
@ -148,7 +158,12 @@ namespace Server.Factions
|
|||
|
||||
public static void DistributePoints(int distrib)
|
||||
{
|
||||
List<PlayerState> activePlayers = (from f in Factions from ps in f.Members where ps.KillPoints > 0 && ps.IsActive select ps).ToList();
|
||||
List<PlayerState> activePlayers = new List<PlayerState>();
|
||||
|
||||
foreach (Faction f in Factions)
|
||||
foreach (PlayerState ps in f.Members)
|
||||
if (ps.KillPoints > 0 && ps.IsActive)
|
||||
activePlayers.Add(ps);
|
||||
|
||||
if (activePlayers.Count > 0)
|
||||
for (int i = 0; i < distrib; ++i)
|
||||
|
|
@ -172,9 +187,13 @@ namespace Server.Factions
|
|||
return;
|
||||
|
||||
if (recvState == null || recvState.Faction != giveState.Faction)
|
||||
{
|
||||
from.SendLocalizedMessage(1042497); // Only faction mates can be honored this way.
|
||||
}
|
||||
else if (giveState.KillPoints < 5)
|
||||
{
|
||||
from.SendLocalizedMessage(1042499); // You must have at least five kill points to honor them.
|
||||
}
|
||||
else
|
||||
{
|
||||
recvState.LastHonorTime = DateTime.UtcNow;
|
||||
|
|
@ -186,7 +205,9 @@ namespace Server.Factions
|
|||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1042496); // You may only honor another player.
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void AddMember(Mobile mob)
|
||||
|
|
@ -628,7 +649,11 @@ namespace Server.Factions
|
|||
|
||||
public static void FactionItemReset_OnCommand(CommandEventArgs e)
|
||||
{
|
||||
List<Item> items = World.Items.Values.Where(item => item is IFactionItem && !(item is HoodedShroudOfShadows)).ToList();
|
||||
List<Item> items = new List<Item>();
|
||||
|
||||
foreach (Item item in World.Items.Values)
|
||||
if (item is IFactionItem && !(item is HoodedShroudOfShadows))
|
||||
items.Add(item);
|
||||
|
||||
int[] hues = new int[Factions.Count * 2];
|
||||
|
||||
|
|
@ -648,7 +673,16 @@ namespace Server.Factions
|
|||
if (fci.FactionItemState != null || item.LootType != LootType.Blessed)
|
||||
continue;
|
||||
|
||||
if (hues.Any(t => item.Hue == t))
|
||||
bool isHued = false;
|
||||
|
||||
for (int j = 0; j < hues.Length; ++j)
|
||||
if (item.Hue == hues[j])
|
||||
{
|
||||
isHued = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if (isHued)
|
||||
{
|
||||
fci.FactionItemState = null;
|
||||
++count;
|
||||
|
|
@ -807,7 +841,7 @@ namespace Server.Factions
|
|||
|
||||
Silver += tithed;
|
||||
|
||||
silver -= tithed;
|
||||
silver = silver - tithed;
|
||||
|
||||
if (silver > 0)
|
||||
mob.AddToBackpack(new Silver(silver));
|
||||
|
|
@ -853,12 +887,19 @@ namespace Server.Factions
|
|||
|
||||
Faction smallest = FindSmallestFaction();
|
||||
|
||||
return smallest == null || (Members.Count + influx) * 100 / StabilityFactor <= smallest.Members.Count;
|
||||
if (smallest == null)
|
||||
return true; // sanity
|
||||
|
||||
if ((Members.Count + influx) * 100 / StabilityFactor > smallest.Members.Count)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public static void HandleDeath(Mobile victim, Mobile killer)
|
||||
{
|
||||
killer ??= victim.FindMostRecentDamager(true);
|
||||
if (killer == null)
|
||||
killer = victim.FindMostRecentDamager(true);
|
||||
|
||||
PlayerState killerState = PlayerState.Find(killer);
|
||||
Container killerPack = killer?.Backpack;
|
||||
|
|
@ -900,7 +941,7 @@ namespace Server.Factions
|
|||
int silver = killerState.Faction.AwardSilver(killer, bc.FactionSilverWorth);
|
||||
|
||||
if (silver > 0)
|
||||
killer?.SendLocalizedMessage(1042748,
|
||||
killer.SendLocalizedMessage(1042748,
|
||||
silver.ToString("N0")); // Thou hast earned ~1_AMOUNT~ silver for vanquishing the vile creature.
|
||||
}
|
||||
|
||||
|
|
@ -941,7 +982,7 @@ namespace Server.Factions
|
|||
{
|
||||
if (victimState.KillPoints <= -6)
|
||||
{
|
||||
killer?.SendLocalizedMessage(501693); // This victim is not worth enough to get kill points from.
|
||||
killer.SendLocalizedMessage(501693); // This victim is not worth enough to get kill points from.
|
||||
|
||||
#region Ethics
|
||||
|
||||
|
|
@ -983,12 +1024,13 @@ namespace Server.Factions
|
|||
{
|
||||
victimState.IsActive = true;
|
||||
|
||||
killerState.IsActive |= 1 > Utility.Random(3);
|
||||
if (1 > Utility.Random(3))
|
||||
killerState.IsActive = true;
|
||||
|
||||
int silver = killerState.Faction.AwardSilver(killer, award * 40);
|
||||
|
||||
if (silver > 0)
|
||||
killer?.SendLocalizedMessage(1042736,
|
||||
killer.SendLocalizedMessage(1042736,
|
||||
$"{silver:N0} silver\t{victim.Name}"); // You have earned ~1_SILVER_AMOUNT~ pieces for vanquishing ~2_PLAYER_NAME~!
|
||||
}
|
||||
|
||||
|
|
@ -997,9 +1039,9 @@ namespace Server.Factions
|
|||
|
||||
int offset = award != 1 ? 0 : 2; // for pluralization
|
||||
|
||||
string args = $"{award}\t{victim.Name}\t{killer?.Name ?? ""}";
|
||||
string args = $"{award}\t{victim.Name}\t{killer.Name}";
|
||||
|
||||
killer?.SendLocalizedMessage(1042737 + offset,
|
||||
killer.SendLocalizedMessage(1042737 + offset,
|
||||
args); // Thou hast been honored with ~1_KILL_POINTS~ kill point(s) for vanquishing ~2_DEAD_PLAYER~!
|
||||
victim.SendLocalizedMessage(1042738 + offset,
|
||||
args); // Thou has lost ~1_KILL_POINTS~ kill point(s) to ~3_ATTACKER_NAME~ for being vanquished!
|
||||
|
|
@ -1031,7 +1073,7 @@ namespace Server.Factions
|
|||
}
|
||||
else
|
||||
{
|
||||
killer?.SendLocalizedMessage(
|
||||
killer.SendLocalizedMessage(
|
||||
1042231); // You have recently defeated this enemy and thus their death brings you no honor.
|
||||
}
|
||||
}
|
||||
|
|
@ -1242,7 +1284,9 @@ namespace Server.Factions
|
|||
AddResponse("They have been kicked from their faction.");
|
||||
}
|
||||
else
|
||||
{
|
||||
LogFailure("They are not in a faction.");
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
@ -1256,7 +1300,9 @@ namespace Server.Factions
|
|||
AddResponse("The account has been banned from joining factions.");
|
||||
}
|
||||
else
|
||||
{
|
||||
AddResponse("The account is already banned from joining factions.");
|
||||
}
|
||||
|
||||
for (int i = 0; i < acct.Length; ++i)
|
||||
{
|
||||
|
|
@ -1276,7 +1322,9 @@ namespace Server.Factions
|
|||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LogFailure("They have no assigned account.");
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
@ -1285,7 +1333,9 @@ namespace Server.Factions
|
|||
if (mob.Account is Account acct)
|
||||
{
|
||||
if (acct.GetTag("FactionBanned") == null)
|
||||
{
|
||||
AddResponse("The account is not already banned from joining factions.");
|
||||
}
|
||||
else
|
||||
{
|
||||
acct.RemoveTag("FactionBanned");
|
||||
|
|
@ -1293,7 +1343,9 @@ namespace Server.Factions
|
|||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LogFailure("They have no assigned account.");
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -260,7 +260,9 @@ namespace Server.Factions
|
|||
|
||||
public void OnGivenSilverTo(Mobile mob)
|
||||
{
|
||||
SilverGiven ??= new List<SilverGivenEntry>();
|
||||
if (SilverGiven == null)
|
||||
SilverGiven = new List<SilverGivenEntry>();
|
||||
|
||||
SilverGiven.Add(new SilverGivenEntry(mob));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Server.Factions;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
|
|
@ -42,7 +41,9 @@ namespace Server
|
|||
|
||||
if (chance > Utility.Random(100))
|
||||
{
|
||||
int weight = _items.Sum(item => item.Weight);
|
||||
int weight = 0;
|
||||
|
||||
foreach (WeightedItem item in _items) weight += item.Weight;
|
||||
|
||||
weight = Utility.Random(weight);
|
||||
|
||||
|
|
@ -176,4 +177,4 @@ namespace Server
|
|||
public Item Construct() => Activator.CreateInstance(Type) as Item;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -25,9 +25,7 @@ namespace Server
|
|||
|
||||
bool used = false;
|
||||
|
||||
IPooledEnumerable eable = from.GetMobilesInRange(8);
|
||||
|
||||
foreach (Mobile mob in eable)
|
||||
foreach (Mobile mob in from.GetMobilesInRange(8))
|
||||
if (mob.Player && !mob.Alive && from.InLOS(mob))
|
||||
{
|
||||
if (Faction.Find(mob) != ourFaction) continue;
|
||||
|
|
@ -43,8 +41,6 @@ namespace Server
|
|||
}
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
|
||||
if (used)
|
||||
{
|
||||
from.LocalOverheadMessage(MessageType.Regular, 2219, false, "The urn shatters as you invoke its power.");
|
||||
|
|
|
|||
|
|
@ -113,15 +113,10 @@ namespace Server.Factions
|
|||
return 502956; // You cannot place a trap on that.
|
||||
|
||||
if (Core.ML)
|
||||
{
|
||||
IPooledEnumerable eable = m.GetItemsInRange(p, 0);
|
||||
foreach (Item item in eable)
|
||||
foreach (Item item in m.GetItemsInRange(p, 0))
|
||||
if (item is BaseFactionTrap trap && trap.Faction == Faction)
|
||||
return 1075263; // There is already a trap belonging to your faction at this location.;
|
||||
|
||||
eable.Free();
|
||||
}
|
||||
|
||||
switch (AllowedPlacing)
|
||||
{
|
||||
case AllowedPlacing.FactionStronghold:
|
||||
|
|
@ -134,12 +129,22 @@ namespace Server.Factions
|
|||
return 1010355; // This trap can only be placed in your stronghold
|
||||
}
|
||||
case AllowedPlacing.AnyFactionTown:
|
||||
return Town.FromRegion(Region.Find(p, m)) != null ? 0 : 1010356;
|
||||
{
|
||||
Town town = Town.FromRegion(Region.Find(p, m));
|
||||
|
||||
if (town != null)
|
||||
return 0;
|
||||
|
||||
return 1010356; // This trap can only be placed in a faction town
|
||||
}
|
||||
case AllowedPlacing.ControlledFactionTown:
|
||||
{
|
||||
Town town = Town.FromRegion(Region.Find(p, m));
|
||||
|
||||
return town != null && town.Owner == Faction ? 0 : 1010357;
|
||||
if (town != null && town.Owner == Faction)
|
||||
return 0;
|
||||
|
||||
return 1010357; // This trap can only be placed in a town your faction controls
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -150,16 +155,17 @@ namespace Server.Factions
|
|||
{
|
||||
base.OnMovement(m, oldLocation);
|
||||
|
||||
if (!CheckDecay() && CheckRange(m.Location, oldLocation, 6) &&
|
||||
Faction.Find(m) != null && (m.Skills.DetectHidden.Value - 80.0) / 20.0 > Utility.RandomDouble())
|
||||
PrivateOverheadLocalizedMessage(m, 1010154, MessageHue, "", ""); // [Faction Trap]
|
||||
if (!CheckDecay() && CheckRange(m.Location, oldLocation, 6))
|
||||
if (Faction.Find(m) != null &&
|
||||
(m.Skills.DetectHidden.Value - 80.0) / 20.0 > Utility.RandomDouble())
|
||||
PrivateOverheadLocalizedMessage(m, 1010154, MessageHue, "", ""); // [Faction Trap]
|
||||
}
|
||||
|
||||
public void PrivateOverheadLocalizedMessage(Mobile to, int number, int hue, string name, string args)
|
||||
{
|
||||
NetState ns = to?.NetState;
|
||||
|
||||
Packets.SendMessageLocalized(ns, Serial, ItemID, MessageType.Regular, hue, 3, number, name, args);
|
||||
ns?.Send(new MessageLocalized(Serial, ItemID, MessageType.Regular, hue, 3, number, name, args));
|
||||
}
|
||||
|
||||
public virtual bool CheckDecay()
|
||||
|
|
@ -246,7 +252,10 @@ namespace Server.Factions
|
|||
if (faction == null && mob is BaseFactionGuard guard)
|
||||
faction = guard.Faction;
|
||||
|
||||
return faction != null && faction != Faction;
|
||||
if (faction == null)
|
||||
return false;
|
||||
|
||||
return faction != Faction;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ namespace Server.Factions
|
|||
|
||||
public override void DoVisibleEffect()
|
||||
{
|
||||
Effects.SendLocationEffect(GetWorldLocation(), Map, 0x36BD, 15);
|
||||
Effects.SendLocationEffect(GetWorldLocation(), Map, 0x36BD, 15, 10);
|
||||
}
|
||||
|
||||
public override void DoAttackEffect(Mobile m)
|
||||
|
|
|
|||
|
|
@ -8,10 +8,6 @@ namespace Server.Factions
|
|||
{
|
||||
}
|
||||
|
||||
public FactionSawTrap(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1041047; // faction saw trap
|
||||
|
||||
public override int AttackMessage => 1010544; // The blade cuts deep into your skin!
|
||||
|
|
@ -23,7 +19,7 @@ namespace Server.Factions
|
|||
|
||||
public override void DoVisibleEffect()
|
||||
{
|
||||
Effects.SendLocationEffect(Location, Map, 0x11AD, 25);
|
||||
Effects.SendLocationEffect(Location, Map, 0x11AD, 25, 10);
|
||||
}
|
||||
|
||||
public override void DoAttackEffect(Mobile m)
|
||||
|
|
|
|||
|
|
@ -313,9 +313,7 @@ namespace Server.Factions
|
|||
actPrio = inactPrio = m_Mobile.GetDistanceToSqrt(comb);
|
||||
}
|
||||
|
||||
IPooledEnumerable eable = m_Mobile.GetMobilesInRange(12);
|
||||
|
||||
foreach (Mobile m in eable)
|
||||
foreach (Mobile m in m_Mobile.GetMobilesInRange(12))
|
||||
if (m != m_Mobile && CanDispel(m))
|
||||
{
|
||||
double prio = m_Mobile.GetDistanceToSqrt(m);
|
||||
|
|
@ -333,8 +331,6 @@ namespace Server.Factions
|
|||
}
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
|
||||
return active ?? inactive;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ namespace Server.Engines.Harvest
|
|||
new MutateEntry(0.0, 125.0, -2375.0, false, typeof(PrizedFish), typeof(WondrousFish), typeof(TrulyRareFish),
|
||||
typeof(PeculiarFish)),
|
||||
new MutateEntry(0.0, 105.0, -420.0, false, typeof(Boots), typeof(Shoes), typeof(Sandals), typeof(ThighBoots)),
|
||||
new MutateEntry(0.0, 200.0, -200.0, false, new Type[] { null })
|
||||
new MutateEntry(0.0, 200.0, -200.0, false, new Type[1] { null })
|
||||
};
|
||||
|
||||
private static int[] m_WaterTiles =
|
||||
|
|
@ -87,7 +87,7 @@ namespace Server.Engines.Harvest
|
|||
Definitions.Add(fish);
|
||||
}
|
||||
|
||||
public static Fishing System => m_System ??= new Fishing();
|
||||
public static Fishing System => m_System ?? (m_System = new Fishing());
|
||||
|
||||
public HarvestDefinition Definition{ get; }
|
||||
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ namespace Server.Engines.Harvest
|
|||
Definitions.Add(lumber);
|
||||
}
|
||||
|
||||
public static Lumberjacking System => m_System ??= new Lumberjacking();
|
||||
public static Lumberjacking System => m_System ?? (m_System = new Lumberjacking());
|
||||
|
||||
public HarvestDefinition Definition{ get; }
|
||||
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ namespace Server.Engines.Harvest
|
|||
#endregion
|
||||
}
|
||||
|
||||
public static Mining System => m_System ??= new Mining();
|
||||
public static Mining System => m_System ?? (m_System = new Mining());
|
||||
|
||||
public HarvestDefinition OreAndStone{ get; }
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using Server.Engines.ConPVP;
|
||||
using Server.Factions;
|
||||
using Server.Gumps;
|
||||
using Server.Menus;
|
||||
using Server.Menus.Questions;
|
||||
using Server.Mobiles;
|
||||
using Server.Multis;
|
||||
|
|
@ -29,7 +27,9 @@ namespace Server.Engines.Help
|
|||
public override void OnResponse(NetState state, int index)
|
||||
{
|
||||
if (index == 0)
|
||||
{
|
||||
m_From.SendLocalizedMessage(1005306, "", 0x35); // Help request unchanged.
|
||||
}
|
||||
else if (index == 1)
|
||||
{
|
||||
PageEntry entry = PageQueue.GetEntry(m_From);
|
||||
|
|
@ -141,49 +141,49 @@ namespace Server.Engines.Help
|
|||
|
||||
AddButton(80, 90, 5540, 5541, 7);
|
||||
AddHtmlLocalized(110, 90, 450, 145, 1062572, true,
|
||||
true); /* <U><CENTER>Another player is harassing me (or Exploiting).</CENTER></U><BR>
|
||||
* VERBAL HARASSMENT<BR>
|
||||
* Use this option when another player is verbally harassing your character.
|
||||
* Verbal harassment behaviors include but are not limited to, using bad language, threats etc..
|
||||
* Before you submit a complaint be sure you understand what constitutes harassment
|
||||
* <A HREF="http://uo.custhelp.com/cgi-bin/uo.cfg/php/enduser/std_adp.php?p_faqid=40"><EFBFBD> what is verbal harassment? -</A>
|
||||
* and that you have followed these steps:<BR>
|
||||
* 1. You have asked the player to stop and they have continued.<BR>
|
||||
* 2. You have tried to remove yourself from the situation.<BR>
|
||||
* 3. You have done nothing to instigate or further encourage the harassment.<BR>
|
||||
* 4. You have added the player to your ignore list.
|
||||
* <A HREF="http://uo.custhelp.com/cgi-bin/uo.cfg/php/enduser/std_adp.php?p_faqid=138">- How do I ignore a player?</A><BR>
|
||||
* 5. You have read and understand Origin<EFBFBD>s definition of harassment.<BR>
|
||||
* 6. Your account information is up to date. (Including a current email address)<BR>
|
||||
* *If these steps have not been taken, GMs may be unable to take action against the offending player.<BR>
|
||||
* **A chat log will be review by a GM to assess the validity of this complaint.
|
||||
* Abuse of this system is a violation of the Rules of Conduct.<BR>
|
||||
* EXPLOITING<BR>
|
||||
* Use this option to report someone who may be exploiting or cheating.
|
||||
* <A HREF="http://uo.custhelp.com/cgi-bin/uo.cfg/php/enduser/std_adp.php?p_faqid=41"><EFBFBD> What constitutes an exploit?</a>
|
||||
*/
|
||||
true); /* <U><CENTER>Another player is harassing me (or Exploiting).</CENTER></U><BR>
|
||||
* VERBAL HARASSMENT<BR>
|
||||
* Use this option when another player is verbally harassing your character.
|
||||
* Verbal harassment behaviors include but are not limited to, using bad language, threats etc..
|
||||
* Before you submit a complaint be sure you understand what constitutes harassment
|
||||
* <A HREF="http://uo.custhelp.com/cgi-bin/uo.cfg/php/enduser/std_adp.php?p_faqid=40"><EFBFBD> what is verbal harassment? -</A>
|
||||
* and that you have followed these steps:<BR>
|
||||
* 1. You have asked the player to stop and they have continued.<BR>
|
||||
* 2. You have tried to remove yourself from the situation.<BR>
|
||||
* 3. You have done nothing to instigate or further encourage the harassment.<BR>
|
||||
* 4. You have added the player to your ignore list.
|
||||
* <A HREF="http://uo.custhelp.com/cgi-bin/uo.cfg/php/enduser/std_adp.php?p_faqid=138">- How do I ignore a player?</A><BR>
|
||||
* 5. You have read and understand Origin<EFBFBD>s definition of harassment.<BR>
|
||||
* 6. Your account information is up to date. (Including a current email address)<BR>
|
||||
* *If these steps have not been taken, GMs may be unable to take action against the offending player.<BR>
|
||||
* **A chat log will be review by a GM to assess the validity of this complaint.
|
||||
* Abuse of this system is a violation of the Rules of Conduct.<BR>
|
||||
* EXPLOITING<BR>
|
||||
* Use this option to report someone who may be exploiting or cheating.
|
||||
* <A HREF="http://uo.custhelp.com/cgi-bin/uo.cfg/php/enduser/std_adp.php?p_faqid=41"><EFBFBD> What constitutes an exploit?</a>
|
||||
*/
|
||||
|
||||
AddButton(80, 240, 5540, 5541, 8);
|
||||
AddHtmlLocalized(110, 240, 450, 145, 1062573, true,
|
||||
true); /* <U><CENTER>Another player is harassing me using game mechanics.</CENTER></U><BR>
|
||||
* <BR>
|
||||
* PHYSICAL HARASSMENT<BR>
|
||||
* Use this option when another player is harassing your character using game mechanics.
|
||||
* Physical harassment includes but is not limited to luring, Kill Stealing, and any act that causes a players death in Trammel.
|
||||
* Before you submit a complaint be sure you understand what constitutes harassment
|
||||
* <A HREF="http://uo.custhelp.com/cgi-bin/uo.cfg/php/enduser/std_adp.php?p_faqid=59"> <EFBFBD> what is physical harassment?</A>
|
||||
* and that you have followed these steps:<BR>
|
||||
* 1. You have asked the player to stop and they have continued.<BR>
|
||||
* 2. You have tried to remove yourself from the situation.<BR>
|
||||
* 3. You have done nothing to instigate or further encourage the harassment.<BR>
|
||||
* 4. You have added the player to your ignore list.
|
||||
* <A HREF="http://uo.custhelp.com/cgi-bin/uo.cfg/php/enduser/std_adp.php?p_faqid=138"> - how do I ignore a player?</A><BR>
|
||||
* 5. You have read and understand Origin<EFBFBD>s definition of harassment.<BR>
|
||||
* 6. Your account information is up to date. (Including a current email address)<BR>
|
||||
* *If these steps have not been taken, GMs may be unable to take action against the offending player.<BR>
|
||||
* **This issue will be reviewed by a GM to assess the validity of this complaint.
|
||||
* Abuse of this system is a violation of the Rules of Conduct.
|
||||
*/
|
||||
true); /* <U><CENTER>Another player is harassing me using game mechanics.</CENTER></U><BR>
|
||||
* <BR>
|
||||
* PHYSICAL HARASSMENT<BR>
|
||||
* Use this option when another player is harassing your character using game mechanics.
|
||||
* Physical harassment includes but is not limited to luring, Kill Stealing, and any act that causes a players death in Trammel.
|
||||
* Before you submit a complaint be sure you understand what constitutes harassment
|
||||
* <A HREF="http://uo.custhelp.com/cgi-bin/uo.cfg/php/enduser/std_adp.php?p_faqid=59"> <EFBFBD> what is physical harassment?</A>
|
||||
* and that you have followed these steps:<BR>
|
||||
* 1. You have asked the player to stop and they have continued.<BR>
|
||||
* 2. You have tried to remove yourself from the situation.<BR>
|
||||
* 3. You have done nothing to instigate or further encourage the harassment.<BR>
|
||||
* 4. You have added the player to your ignore list.
|
||||
* <A HREF="http://uo.custhelp.com/cgi-bin/uo.cfg/php/enduser/std_adp.php?p_faqid=138"> - how do I ignore a player?</A><BR>
|
||||
* 5. You have read and understand Origin<EFBFBD>s definition of harassment.<BR>
|
||||
* 6. Your account information is up to date. (Including a current email address)<BR>
|
||||
* *If these steps have not been taken, GMs may be unable to take action against the offending player.<BR>
|
||||
* **This issue will be reviewed by a GM to assess the validity of this complaint.
|
||||
* Abuse of this system is a violation of the Rules of Conduct.
|
||||
*/
|
||||
|
||||
AddButton(150, 390, 5540, 5541, 0, GumpButtonType.Page, 1);
|
||||
AddHtmlLocalized(180, 390, 335, 40, 1001015); // NO - I meant to ask for help with another matter.
|
||||
|
|
@ -196,8 +196,9 @@ namespace Server.Engines.Help
|
|||
|
||||
private static void EventSink_HelpRequest(HelpRequestEventArgs e)
|
||||
{
|
||||
if (e.Mobile.NetState.Gumps.OfType<HelpGump>().Any())
|
||||
return;
|
||||
foreach (Gump g in e.Mobile.NetState.Gumps)
|
||||
if (g is HelpGump)
|
||||
return;
|
||||
|
||||
if (!PageQueue.CheckAllowedToPage(e.Mobile))
|
||||
return;
|
||||
|
|
@ -223,9 +224,9 @@ namespace Server.Engines.Help
|
|||
return false;
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
public override void OnResponse(NetState state, RelayInfo info)
|
||||
{
|
||||
Mobile from = sender.Mobile;
|
||||
Mobile from = state.Mobile;
|
||||
|
||||
PageType type = (PageType)(-1);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
using Server.Prompts;
|
||||
|
||||
namespace Server.Engines.Help
|
||||
{
|
||||
public class PagePrompt : Prompt
|
||||
|
|
@ -14,11 +16,11 @@ namespace Server.Engines.Help
|
|||
public override void OnResponse(Mobile from, string text)
|
||||
{
|
||||
from.SendLocalizedMessage(501234, "",
|
||||
0x35); /* The next available Counselor/Game Master will respond as soon as possible.
|
||||
* Please check your Journal for messages every few minutes.
|
||||
*/
|
||||
0x35); /* The next available Counselor/Game Master will respond as soon as possible.
|
||||
* Please check your Journal for messages every few minutes.
|
||||
*/
|
||||
|
||||
PageQueue.Enqueue(new PageEntry(from, text, m_Type));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -48,9 +48,9 @@ namespace Server.Engines.Help
|
|||
else
|
||||
{
|
||||
m_From.SendLocalizedMessage(501234, "",
|
||||
0x35); /* The next available Counselor/Game Master will respond as soon as possible.
|
||||
* Please check your Journal for messages every few minutes.
|
||||
*/
|
||||
0x35); /* The next available Counselor/Game Master will respond as soon as possible.
|
||||
* Please check your Journal for messages every few minutes.
|
||||
*/
|
||||
|
||||
PageQueue.Enqueue(new PageEntry(m_From, text, m_Type));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -82,6 +82,8 @@ namespace Server.Engines.Help
|
|||
|
||||
private class InternalTimer : Timer
|
||||
{
|
||||
private static TimeSpan StatusDelay = TimeSpan.FromMinutes(2.0);
|
||||
|
||||
private PageEntry m_Entry;
|
||||
|
||||
public InternalTimer(PageEntry entry) : base(TimeSpan.FromSeconds(1.0), StatusDelay) => m_Entry = entry;
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ namespace Server.Engines.Help
|
|||
AddHtmlLocalized(34, 28, 65, 24, 3001002, 0xFFFFFF); // Message
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
public override void OnResponse(NetState state, RelayInfo info)
|
||||
{
|
||||
m_Mobile.SendGump(new PageResponseGump(m_Mobile, m_Name, m_Text));
|
||||
|
||||
|
|
@ -100,20 +100,20 @@ namespace Server.Engines.Help
|
|||
}
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
public override void OnResponse(NetState state, RelayInfo info)
|
||||
{
|
||||
if (info.ButtonID >= 1 && info.ButtonID <= m_List.Length)
|
||||
{
|
||||
if (PageQueue.List.IndexOf(m_List[info.ButtonID - 1]) >= 0)
|
||||
{
|
||||
PageEntryGump g = new PageEntryGump(sender.Mobile, m_List[info.ButtonID - 1]);
|
||||
PageEntryGump g = new PageEntryGump(state.Mobile, m_List[info.ButtonID - 1]);
|
||||
|
||||
g.SendTo(sender);
|
||||
g.SendTo(state);
|
||||
}
|
||||
else
|
||||
{
|
||||
sender.Mobile.SendGump(new PageQueueGump());
|
||||
sender.Mobile.SendMessage("That page has been removed.");
|
||||
state.Mobile.SendGump(new PageQueueGump());
|
||||
state.Mobile.SendMessage("That page has been removed.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -553,12 +553,12 @@ namespace Server.Engines.Help
|
|||
g.SendTo(state);
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
public override void OnResponse(NetState state, RelayInfo info)
|
||||
{
|
||||
if (info.ButtonID != 0 && PageQueue.List.IndexOf(m_Entry) < 0)
|
||||
{
|
||||
sender.Mobile.SendGump(new PageQueueGump());
|
||||
sender.Mobile.SendMessage("That page has been removed.");
|
||||
state.Mobile.SendGump(new PageQueueGump());
|
||||
state.Mobile.SendMessage("That page has been removed.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -566,18 +566,18 @@ namespace Server.Engines.Help
|
|||
{
|
||||
case 0: // close
|
||||
{
|
||||
if (m_Entry.Handler != sender.Mobile)
|
||||
if (m_Entry.Handler != state.Mobile)
|
||||
{
|
||||
PageQueueGump g = new PageQueueGump();
|
||||
|
||||
g.SendTo(sender);
|
||||
g.SendTo(state);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 1: // go to sender
|
||||
{
|
||||
Mobile m = sender.Mobile;
|
||||
Mobile m = state.Mobile;
|
||||
|
||||
if (m_Entry.Sender.Deleted)
|
||||
{
|
||||
|
|
@ -594,14 +594,14 @@ namespace Server.Engines.Help
|
|||
|
||||
m.SendMessage("You have been teleported to that page's sender.");
|
||||
|
||||
Resend(sender);
|
||||
Resend(state);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 2: // go to handler
|
||||
{
|
||||
Mobile m = sender.Mobile;
|
||||
Mobile m = state.Mobile;
|
||||
Mobile h = m_Entry.Handler;
|
||||
|
||||
if (h != null)
|
||||
|
|
@ -620,20 +620,20 @@ namespace Server.Engines.Help
|
|||
m.MoveToWorld(h.Location, h.Map);
|
||||
|
||||
m.SendMessage("You have been teleported to that page's handler.");
|
||||
Resend(sender);
|
||||
Resend(state);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m.SendMessage("Nobody is handling that page.");
|
||||
Resend(sender);
|
||||
Resend(state);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 3: // go to page location
|
||||
{
|
||||
Mobile m = sender.Mobile;
|
||||
Mobile m = state.Mobile;
|
||||
|
||||
if (m_Entry.PageMap == null || m_Entry.PageMap == Map.Internal)
|
||||
{
|
||||
|
|
@ -644,9 +644,9 @@ namespace Server.Engines.Help
|
|||
// m_Entry.AddResponse(state.Mobile, "[Go PageLoc]");
|
||||
m.MoveToWorld(m_Entry.PageLocation, m_Entry.PageMap);
|
||||
|
||||
sender.Mobile.SendMessage("You have been teleported to the original page location.");
|
||||
state.Mobile.SendMessage("You have been teleported to the original page location.");
|
||||
|
||||
Resend(sender);
|
||||
Resend(state);
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
@ -656,14 +656,16 @@ namespace Server.Engines.Help
|
|||
if (m_Entry.Handler == null)
|
||||
{
|
||||
// m_Entry.AddResponse(state.Mobile, "[Handling]");
|
||||
m_Entry.Handler = sender.Mobile;
|
||||
m_Entry.Handler = state.Mobile;
|
||||
|
||||
sender.Mobile.SendMessage("You are now handling the page.");
|
||||
state.Mobile.SendMessage("You are now handling the page.");
|
||||
}
|
||||
else
|
||||
sender.Mobile.SendMessage("Someone is already handling that page.");
|
||||
{
|
||||
state.Mobile.SendMessage("Someone is already handling that page.");
|
||||
}
|
||||
|
||||
Resend(sender);
|
||||
Resend(state);
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
@ -674,57 +676,59 @@ namespace Server.Engines.Help
|
|||
// m_Entry.AddResponse(state.Mobile, "[Deleting]");
|
||||
PageQueue.Remove(m_Entry);
|
||||
|
||||
sender.Mobile.SendMessage("You delete the page.");
|
||||
state.Mobile.SendMessage("You delete the page.");
|
||||
|
||||
PageQueueGump g = new PageQueueGump();
|
||||
|
||||
g.SendTo(sender);
|
||||
g.SendTo(state);
|
||||
}
|
||||
else
|
||||
{
|
||||
sender.Mobile.SendMessage("Someone is handling that page, it can not be deleted.");
|
||||
state.Mobile.SendMessage("Someone is handling that page, it can not be deleted.");
|
||||
|
||||
Resend(sender);
|
||||
Resend(state);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 6: // abandon page
|
||||
{
|
||||
if (m_Entry.Handler == sender.Mobile)
|
||||
if (m_Entry.Handler == state.Mobile)
|
||||
{
|
||||
// m_Entry.AddResponse(state.Mobile, "[Abandoning]");
|
||||
sender.Mobile.SendMessage("You abandon the page.");
|
||||
state.Mobile.SendMessage("You abandon the page.");
|
||||
|
||||
m_Entry.Handler = null;
|
||||
}
|
||||
else
|
||||
sender.Mobile.SendMessage("You are not handling that page.");
|
||||
{
|
||||
state.Mobile.SendMessage("You are not handling that page.");
|
||||
}
|
||||
|
||||
Resend(sender);
|
||||
Resend(state);
|
||||
|
||||
break;
|
||||
}
|
||||
case 7: // page handled
|
||||
{
|
||||
if (m_Entry.Handler == sender.Mobile)
|
||||
if (m_Entry.Handler == state.Mobile)
|
||||
{
|
||||
// m_Entry.AddResponse(state.Mobile, "[Handled]");
|
||||
PageQueue.Remove(m_Entry);
|
||||
|
||||
m_Entry.Handler = null;
|
||||
|
||||
sender.Mobile.SendMessage("You mark the page as handled, and remove it from the queue.");
|
||||
state.Mobile.SendMessage("You mark the page as handled, and remove it from the queue.");
|
||||
|
||||
PageQueueGump g = new PageQueueGump();
|
||||
|
||||
g.SendTo(sender);
|
||||
g.SendTo(state);
|
||||
}
|
||||
else
|
||||
{
|
||||
sender.Mobile.SendMessage("You are not handling that page.");
|
||||
state.Mobile.SendMessage("You are not handling that page.");
|
||||
|
||||
Resend(sender);
|
||||
Resend(state);
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
@ -739,20 +743,20 @@ namespace Server.Engines.Help
|
|||
//m_Entry.Sender.SendMessage( 0x482, "{0} tells you:", state.Mobile.Name );
|
||||
//m_Entry.Sender.SendMessage( 0x482, text.Text );
|
||||
|
||||
Resend(sender);
|
||||
Resend(state);
|
||||
|
||||
break;
|
||||
}
|
||||
case 9: // predef overview
|
||||
{
|
||||
Resend(sender);
|
||||
sender.Mobile.SendGump(new PredefGump(sender.Mobile, null));
|
||||
Resend(state);
|
||||
state.Mobile.SendGump(new PredefGump(state.Mobile, null));
|
||||
|
||||
break;
|
||||
}
|
||||
case 10: // View Speech Log
|
||||
{
|
||||
Resend(sender);
|
||||
Resend(state);
|
||||
|
||||
if (m_Entry.SpeechLog != null) state.Mobile.SendGump(new SpeechLogGump(m_Entry.Sender, m_Entry.SpeechLog));
|
||||
|
||||
|
|
@ -768,7 +772,7 @@ namespace Server.Engines.Help
|
|||
m_Entry.Sender.SendGump(new MessageSentGump(m_Entry.Sender, state.Mobile.Name,
|
||||
preresp[index].Message));
|
||||
|
||||
Resend(sender);
|
||||
Resend(state);
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,9 @@ namespace Server.Engines.Help
|
|||
string sLog;
|
||||
|
||||
if (page < 0 || page > lastPage)
|
||||
{
|
||||
sLog = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
int max = log.Count - (lastPage - page) * MaxEntriesPerPage;
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue