#W# Creating rewards for quests.

This commit is contained in:
WarrentyExpired 2026-07-23 11:54:29 -04:00
parent 774e003943
commit f2894f2f70
5 changed files with 335 additions and 3 deletions

View file

@ -8,6 +8,7 @@ namespace Server.Items
{
private PotionEffect m_Type;
private int m_Held;
public virtual int MaxCapacity { get { return 100; } }
[CommandProperty( AccessLevel.GameMaster )]
public int Held
@ -161,7 +162,7 @@ namespace Server.Items
number = 502255; // The keg is about three quarters full.
else if ( m_Held < 96 )
number = 502256; // The keg is very full.
else if ( m_Held < 100 )
else if ( m_Held < MaxCapacity )
number = 502257; // The liquid is almost to the top of the keg.
else
number = 502258; // The keg is completely full.
@ -218,7 +219,7 @@ namespace Server.Items
if ( item is BasePotion )
{
BasePotion pot = (BasePotion)item;
int toHold = Math.Min( 100 - m_Held, pot.Amount );
int toHold = Math.Min( MaxCapacity - m_Held, pot.Amount );
if ( toHold <= 0 )
@ -341,4 +342,4 @@ namespace Server.Items
TileData.ItemTable[0x1940].Height = 4;
}
}
}
}