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

@ -153,7 +153,9 @@ namespace Server.Gumps
if (parent != null)
{
m_Stack ??= new Stack<StackEntry>();
if (m_Stack == null)
m_Stack = new Stack<StackEntry>();
m_Stack.Push(parent);
}
@ -279,9 +281,9 @@ namespace Server.Gumps
}
}
public override void OnResponse(NetState sender, RelayInfo info)
public override void OnResponse(NetState state, RelayInfo info)
{
Mobile from = sender.Mobile;
Mobile from = state.Mobile;
if (!BaseCommand.IsAccessible(from, m_Object))
{

View file

@ -127,6 +127,7 @@ namespace Server.Gumps
switch (index)
{
default:
case 0:
type = ModelBodyType.Monsters;
list = m_Monster;
break;
@ -203,17 +204,24 @@ namespace Server.Gumps
if (((Body)bodyID).IsEmpty)
continue;
List<InternalEntry> list = oldEntry.BodyType switch
{
ModelBodyType.Monsters => m_Monster,
ModelBodyType.Animals => m_Animal,
ModelBodyType.Sea => m_Sea,
ModelBodyType.Human => m_Human,
_ => null
};
List<InternalEntry> list;
if (list == null)
return;
switch (oldEntry.BodyType)
{
default: continue;
case ModelBodyType.Monsters:
list = m_Monster;
break;
case ModelBodyType.Animals:
list = m_Animal;
break;
case ModelBodyType.Sea:
list = m_Sea;
break;
case ModelBodyType.Human:
list = m_Human;
break;
}
int itemID = ShrinkTable.Lookup(bodyID, -1);
@ -279,7 +287,7 @@ namespace Server.Gumps
int v = Name.CompareTo(comp.Name);
if (v == 0)
v = Body.CompareTo(comp.Body);
Body.CompareTo(comp.Body);
return v;
}

View file

@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.Reflection;
using Server.Commands;
using Server.HuePickers;
using Server.Network;
namespace Server.Gumps

View file

@ -4,6 +4,7 @@ using System.Reflection;
using Server.Commands;
using Server.Commands.Generic;
using Server.Network;
using Server.Prompts;
namespace Server.Gumps
{