SoT should not exceed skillcaps: http://www.uodemise.com/forum/showthread.php?t=148630
Corrected Potion keg name:  http://www.uodemise.com/forum/showthread.php?t=147423
This commit is contained in:
xavier 2010-09-06 13:51:26 +00:00
parent 83193125b8
commit 4dbb400ce3
8 changed files with 1266 additions and 622 deletions

View file

@ -95,7 +95,7 @@ namespace Server.Items
get
{
if ( m_Held == 0 )
return 1041641;
return 1041084; // A specially lined keg for potions.
else if( m_Type >= PotionEffect.Conflagration )
return 1072658 + (int) m_Type - (int) PotionEffect.Conflagration;
else

View file

@ -97,8 +97,8 @@ namespace Server.Items
if ( !CanUse( from ) )
return;
double tskill = from.Skills[Skill].Base;
double tcap = from.Skills[Skill].Cap;
double tskill = from.Skills[Skill].Base; // value of skill without item bonuses etc
double tcap = from.Skills[Skill].Cap; // maximum value permitted
bool canGain = false;
double newValue = Value;
@ -110,9 +110,12 @@ namespace Server.Items
{
if ( ( from.SkillsTotal + newValue * 10 ) > from.SkillsCap )
{
for ( int i = 0; i <= 54; i++ )
int ns = from.Skills.Length; // number of items in from.Skills[]
for ( int i = 0; i < ns; i++ )
{
if ( from.Skills[i].Lock == SkillLock.Down && tskill >= newValue )
// skill must point down and its value must be enough
if ( from.Skills[i].Lock == SkillLock.Down && from.Skills[i].Base >= newValue )
{
from.Skills[i].Base -= newValue;
canGain = true;