v0.0.1-Alpha (#42)

This commit is contained in:
Kamron Batman 2019-08-02 18:16:11 -07:00 • committed by GitHub
parent d30f93c454
commit a36796c2c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3552 changed files with 2476 additions and 15223 deletions

View file

@ -0,0 +1,56 @@
using System;
namespace Server.Engines.BulkOrders
{
public class BOBLargeSubEntry
{
public BOBLargeSubEntry(LargeBulkEntry lbe)
{
ItemType = lbe.Details.Type;
AmountCur = lbe.Amount;
Number = lbe.Details.Number;
Graphic = lbe.Details.Graphic;
}
public BOBLargeSubEntry(GenericReader reader)
{
int version = reader.ReadEncodedInt();
switch (version)
{
case 0:
{
string type = reader.ReadString();
if (type != null)
ItemType = ScriptCompiler.FindTypeByFullName(type);
AmountCur = reader.ReadEncodedInt();
Number = reader.ReadEncodedInt();
Graphic = reader.ReadEncodedInt();
break;
}
}
}
public Type ItemType{ get; }
public int AmountCur{ get; }
public int Number{ get; }
public int Graphic{ get; }
public void Serialize(GenericWriter writer)
{
writer.WriteEncodedInt(0); // version
writer.Write(ItemType == null ? null : ItemType.FullName);
writer.WriteEncodedInt(AmountCur);
writer.WriteEncodedInt(Number);
writer.WriteEncodedInt(Graphic);
}
}
}