fix(core): Removes implicit cast between Serial and uint (#728)
* Fixes spellbooks using serial ctor * Fixes misc items where someone thought they had an amount and it didn't * Fixes all `Food` types.
This commit is contained in:
parent
17521c9cd7
commit
0dc4acc164
74 changed files with 319 additions and 248 deletions
|
|
@ -39,10 +39,10 @@ namespace UOContent.Tests
|
|||
[InlineData("🅵🅰🅽🅲🆈 🆃🅴🆇🆃 Author", "🅵🅰🅽🅲🆈 🆃🅴🆇🆃 Title")]
|
||||
public void TestBookCover(string author, string title)
|
||||
{
|
||||
var m = new Mobile(0x1);
|
||||
var m = new Mobile((Serial)0x1);
|
||||
m.DefaultMobileInit();
|
||||
|
||||
Serial serial = 0x1001;
|
||||
Serial serial = (Serial)0x1001;
|
||||
var book = new TestBook(serial) { Author = author, Title = title };
|
||||
|
||||
var expected = new BookHeader(m, book).Compile();
|
||||
|
|
@ -57,10 +57,10 @@ namespace UOContent.Tests
|
|||
[Fact]
|
||||
public void TestBookContent()
|
||||
{
|
||||
var m = new Mobile(0x1);
|
||||
var m = new Mobile((Serial)0x1);
|
||||
m.DefaultMobileInit();
|
||||
|
||||
Serial serial = 0x1001;
|
||||
Serial serial = (Serial)0x1001;
|
||||
var book = new TestBook(serial) { Author = "Some Author", Title = "Some Title" };
|
||||
book.Pages[0].Lines = new[]
|
||||
{
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ namespace UOContent.Tests
|
|||
[InlineData("🅵🅰🅽🅲🆈 🆃🅴🆇🆃", true, "First Line", "Second Line")]
|
||||
public void TestSendBBHeaderMessage(string subject, bool content, params string[] lines)
|
||||
{
|
||||
var poster = new Mobile(0x1024u) { Name = "Kamron" };
|
||||
var poster = new Mobile((Serial)0x1024u) { Name = "Kamron" };
|
||||
poster.DefaultMobileInit();
|
||||
|
||||
var bb = new TestBulletinBoard(0x234);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace UOContent.Tests
|
|||
[Fact]
|
||||
public void TestMahjongJoinGame()
|
||||
{
|
||||
Serial game = 0x1024u;
|
||||
Serial game = (Serial)0x1024u;
|
||||
|
||||
var expected = new MahjongJoinGame(game).Compile();
|
||||
|
||||
|
|
@ -29,7 +29,7 @@ namespace UOContent.Tests
|
|||
[InlineData(false)]
|
||||
public void TestMahjongPlayersInfo(bool showScores)
|
||||
{
|
||||
var m = new Mobile(0x1);
|
||||
var m = new Mobile((Serial)0x1);
|
||||
m.DefaultMobileInit();
|
||||
|
||||
var game = new MahjongGame { ShowScores = showScores };
|
||||
|
|
@ -67,7 +67,7 @@ namespace UOContent.Tests
|
|||
[InlineData(false)]
|
||||
public void TestMahjongTilesInfo(bool spectatorVision)
|
||||
{
|
||||
var m = new Mobile(0x1);
|
||||
var m = new Mobile((Serial)0x1);
|
||||
m.DefaultMobileInit();
|
||||
|
||||
var game = new MahjongGame { SpectatorVision = spectatorVision };
|
||||
|
|
@ -87,7 +87,7 @@ namespace UOContent.Tests
|
|||
[InlineData(false)]
|
||||
public void TestMahjongTileInfo(bool spectatorVision)
|
||||
{
|
||||
var m = new Mobile(0x1);
|
||||
var m = new Mobile((Serial)0x1);
|
||||
m.DefaultMobileInit();
|
||||
|
||||
var game = new MahjongGame { SpectatorVision = spectatorVision };
|
||||
|
|
@ -105,7 +105,7 @@ namespace UOContent.Tests
|
|||
[Fact]
|
||||
public void TestMahjongRelieve()
|
||||
{
|
||||
Serial game = 0x1024u;
|
||||
Serial game = (Serial)0x1024u;
|
||||
|
||||
var expected = new MahjongRelieve(game).Compile();
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace UOContent.Tests
|
|||
[Fact]
|
||||
public void TestCorpseEquipPacket()
|
||||
{
|
||||
var m = new Mobile(0x1);
|
||||
var m = new Mobile((Serial)0x1);
|
||||
m.DefaultMobileInit();
|
||||
|
||||
var weapon = new VikingSword();
|
||||
|
|
@ -36,7 +36,7 @@ namespace UOContent.Tests
|
|||
[InlineData(ProtocolChanges.ContainerGridLines)]
|
||||
public void TestCorpseContainerPacket(ProtocolChanges changes)
|
||||
{
|
||||
var m = new Mobile(0x1);
|
||||
var m = new Mobile((Serial)0x1);
|
||||
m.DefaultMobileInit();
|
||||
|
||||
var weapon = new VikingSword();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue