Reorganizes Project (#41)
This commit is contained in:
parent
08bf44af9a
commit
3614a66aee
3499 changed files with 79 additions and 55 deletions
106
Projects/Server/BaseVendor.cs
Normal file
106
Projects/Server/BaseVendor.cs
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
/***************************************************************************
|
||||
* BaseVendor.cs
|
||||
* -------------------
|
||||
* begin : May 1, 2002
|
||||
* copyright : (C) The RunUO Software Team
|
||||
* email : info@runuo.com
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class BuyItemStateComparer : IComparer<BuyItemState>
|
||||
{
|
||||
public int Compare(BuyItemState l, BuyItemState r)
|
||||
{
|
||||
if (l == null && r == null) return 0;
|
||||
if (l == null) return -1;
|
||||
if (r == null) return 1;
|
||||
|
||||
return l.MySerial.CompareTo(r.MySerial);
|
||||
}
|
||||
}
|
||||
|
||||
public class BuyItemResponse
|
||||
{
|
||||
public BuyItemResponse(Serial serial, int amount)
|
||||
{
|
||||
Serial = serial;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public Serial Serial{ get; }
|
||||
|
||||
public int Amount{ get; }
|
||||
}
|
||||
|
||||
public class SellItemResponse
|
||||
{
|
||||
public SellItemResponse(Item i, int amount)
|
||||
{
|
||||
Item = i;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public Item Item{ get; }
|
||||
|
||||
public int Amount{ get; }
|
||||
}
|
||||
|
||||
public class SellItemState
|
||||
{
|
||||
public SellItemState(Item item, int price, string name)
|
||||
{
|
||||
Item = item;
|
||||
Price = price;
|
||||
Name = name;
|
||||
}
|
||||
|
||||
public Item Item{ get; }
|
||||
|
||||
public int Price{ get; }
|
||||
|
||||
public string Name{ get; }
|
||||
}
|
||||
|
||||
public class BuyItemState
|
||||
{
|
||||
public BuyItemState(string name, Serial cont, Serial serial, int price, int amount, int itemID, int hue)
|
||||
{
|
||||
Description = name;
|
||||
ContainerSerial = cont;
|
||||
MySerial = serial;
|
||||
Price = price;
|
||||
Amount = amount;
|
||||
ItemID = itemID;
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public int Price{ get; }
|
||||
|
||||
public Serial MySerial{ get; }
|
||||
|
||||
public Serial ContainerSerial{ get; }
|
||||
|
||||
public int ItemID{ get; }
|
||||
|
||||
public int Amount{ get; }
|
||||
|
||||
public int Hue{ get; }
|
||||
|
||||
public string Description{ get; }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue