#W# Crafting and Gathering skills don't count towards skill cap.
This commit is contained in:
parent
f556a5a740
commit
5f61347479
3 changed files with 51 additions and 17 deletions
|
|
@ -113,6 +113,31 @@ namespace Server
|
|||
return String.Format( "[{0}: {1}]", Name, Base );
|
||||
}
|
||||
|
||||
public bool IsSecondarySkill()
|
||||
{
|
||||
switch(SkillName)
|
||||
{
|
||||
// Crafting Skills
|
||||
case SkillName.Alchemy:
|
||||
case SkillName.Blacksmith:
|
||||
case SkillName.Fletching:
|
||||
case SkillName.Carpentry:
|
||||
case SkillName.Cooking:
|
||||
case SkillName.Inscribe:
|
||||
case SkillName.Tailoring:
|
||||
case SkillName.Tinkering:
|
||||
return true;
|
||||
// Gathering Skills
|
||||
case SkillName.Forensics:
|
||||
case SkillName.Lumberjacking:
|
||||
case SkillName.Mining:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Skill( Skills owner, SkillInfo info, GenericReader reader )
|
||||
{
|
||||
m_Owner = owner;
|
||||
|
|
@ -283,7 +308,10 @@ namespace Server
|
|||
|
||||
if ( m_Base != sv )
|
||||
{
|
||||
m_Owner.Total = (m_Owner.Total - m_Base) + sv;
|
||||
if (!IsSecondarySkill())
|
||||
m_Owner.Total = (m_Owner.Total - m_Base) + sv;
|
||||
|
||||
int delta = value - sv;
|
||||
|
||||
m_Base = sv;
|
||||
|
||||
|
|
@ -1016,7 +1044,8 @@ namespace Server
|
|||
else
|
||||
{
|
||||
sk.Serialize( writer );
|
||||
m_Total += sk.BaseFixedPoint;
|
||||
if (!sk.IsSecondarySkill())
|
||||
m_Total += sk.BaseFixedPoint;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1072,7 +1101,8 @@ namespace Server
|
|||
if ( sk.BaseFixedPoint != 0 || sk.CapFixedPoint != 1000 || sk.Lock != SkillLock.Up )
|
||||
{
|
||||
m_Skills[i] = sk;
|
||||
m_Total += sk.BaseFixedPoint;
|
||||
if (!sk.IsSecondarySkill())
|
||||
m_Total += sk.BaseFixedPoint;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -1120,4 +1150,4 @@ namespace Server
|
|||
return m_Skills.Where(s => s != null).GetEnumerator();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue