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

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

View file

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

View file

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