fix(core): Converts more packets and switches to Moq (#415)
- [X] Switches testing to moq for mocking - [X] Converts race changer packets - [X] Renames some more folders and misc cleanup
This commit is contained in:
parent
fbafd7210d
commit
b4b1b0b122
144 changed files with 197 additions and 181 deletions
|
|
@ -97,7 +97,7 @@ namespace Server.Engines.MLQuests.Gumps
|
|||
CloseCurrent(ns);
|
||||
|
||||
m_Pending[ns] = new RaceChangeState(owner, ns, targetRace);
|
||||
ns.Send(new RaceChanger(from.Female, targetRace));
|
||||
ns.SendRaceChanger(from.Female, targetRace);
|
||||
}
|
||||
|
||||
private static void CloseCurrent(NetState ns)
|
||||
|
|
@ -108,7 +108,7 @@ namespace Server.Engines.MLQuests.Gumps
|
|||
m_Pending.Remove(ns);
|
||||
}
|
||||
|
||||
ns.Send(CloseRaceChanger.Instance);
|
||||
ns.SendCloseRaceChanger();
|
||||
}
|
||||
|
||||
private static void Timeout(NetState ns)
|
||||
|
|
@ -116,7 +116,7 @@ namespace Server.Engines.MLQuests.Gumps
|
|||
if (IsPending(ns))
|
||||
{
|
||||
m_Pending.Remove(ns);
|
||||
ns.Send(CloseRaceChanger.Instance);
|
||||
ns.SendCloseRaceChanger();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -284,34 +284,6 @@ namespace Server.Engines.MLQuests.Gumps
|
|||
}
|
||||
}
|
||||
|
||||
public sealed class RaceChanger : Packet
|
||||
{
|
||||
public RaceChanger(bool female, Race targetRace)
|
||||
: base(0xBF)
|
||||
{
|
||||
EnsureCapacity(7);
|
||||
|
||||
Stream.Write((short)0x2A);
|
||||
Stream.Write((byte)(female ? 1 : 0));
|
||||
Stream.Write((byte)(targetRace.RaceID + 1));
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class CloseRaceChanger : Packet
|
||||
{
|
||||
public static readonly Packet Instance = SetStatic(new CloseRaceChanger());
|
||||
|
||||
private CloseRaceChanger()
|
||||
: base(0xBF)
|
||||
{
|
||||
EnsureCapacity(7);
|
||||
|
||||
Stream.Write((short)0x2A);
|
||||
Stream.Write((byte)0);
|
||||
Stream.Write((byte)0xFF);
|
||||
}
|
||||
}
|
||||
|
||||
public class RaceChangeDeed : Item, IRaceChanger
|
||||
{
|
||||
[Constructible]
|
||||
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