Files
abysmal-isle/Scripts/Services/Expansions/Time Of Legends/AuctionSafe/BidEntry.cs
Unstable Kitsune b918192e4e Overwrite
Complete Overwrite of the Folder with the free shard. ServUO 57.3 has been added.
2023-11-28 23:20:26 -05:00

48 lines
1.3 KiB
C#

using Server;
using System;
using Server.Mobiles;
using Server.Items;
using Server.Multis;
using Server.Accounting;
using System.Collections.Generic;
namespace Server.Engines.Auction
{
public class BidEntry : IComparable<BidEntry>
{
public PlayerMobile Mobile { get; set; }
public long CurrentBid { get; set; }
//Converts to gold/plat
public int TotalGoldBid { get { return (int)(CurrentBid >= Account.CurrencyThreshold ? CurrentBid - (TotalPlatBid * Account.CurrencyThreshold) : CurrentBid); } }
public int TotalPlatBid { get { return (int)(CurrentBid >= Account.CurrencyThreshold ? CurrentBid / Account.CurrencyThreshold : 0); } }
public BidEntry(PlayerMobile m, long bid = 0)
{
Mobile = m;
CurrentBid = bid;
}
public BidEntry(PlayerMobile m, GenericReader reader)
{
Mobile = m;
int version = reader.ReadInt();
CurrentBid = reader.ReadLong();
}
public void Serialize(GenericWriter writer)
{
writer.Write(0);
writer.Write(CurrentBid);
}
public int CompareTo(BidEntry entry)
{
if (CurrentBid > entry.CurrentBid)
return 1;
return 0;
}
}
}