.bank withdraw <expression> will now correctly use bank amount for calculations. Fixed .br giving double win amounts

This commit is contained in:
Kwoth
2022-07-28 12:41:38 +02:00
parent 31e1cbb19f
commit 3c715a29ca
11 changed files with 201 additions and 108 deletions

View File

@@ -0,0 +1,19 @@
namespace Nadeko.Common;
public readonly struct ShmartBankAmount
{
public long Amount { get; }
public ShmartBankAmount(long amount)
{
Amount = amount;
}
public static implicit operator ShmartBankAmount(long num)
=> new(num);
public static implicit operator long(ShmartBankAmount num)
=> num.Amount;
public static implicit operator ShmartBankAmount(int num)
=> new(num);
}

View File

@@ -3,12 +3,10 @@
public readonly struct ShmartNumber : IEquatable<ShmartNumber>
{
public long Value { get; }
public string? Input { get; }
public ShmartNumber(long val, string? input = null)
public ShmartNumber(long val)
{
Value = val;
Input = input;
}
public static implicit operator ShmartNumber(long num)