Revert "Updates Packets & Randomizer (#43)" (#61)

This reverts commit 179cb50557.
This commit is contained in:
Kamron Batman 2019-11-11 08:46:11 -08:00 • committed by GitHub
parent 179cb50557
commit c2ecc76457
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
588 changed files with 16260 additions and 10926 deletions

View file

@ -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