mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
Fixes (by Buggler)
- Fixed allow exception to Dr Q. skill trait code not fully functional - Swapped Dr Q. skill trait xml order so that when exception disabled, he will still have his night ops minor skill due to code execution order - Externalized allow_exception ID number for modding git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5791 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -2657,11 +2657,20 @@ INT8 ProfileHasSkillTrait( INT32 ubProfileID, INT8 bSkillTrait )
|
||||
{
|
||||
INT8 bNumTraits = 0;
|
||||
INT8 bNumMajorTraitsCounted = 0;
|
||||
INT8 bMaxTraits = gSkillTraitValues.ubMaxNumberOfTraits;
|
||||
INT8 bMaxMajorTraits = gSkillTraitValues.ubNumberOfMajorTraitsAllowed;
|
||||
|
||||
// check old/new traits
|
||||
if (gGameOptions.fNewTraitSystem)
|
||||
{
|
||||
for ( INT8 bCnt = 0; bCnt < gSkillTraitValues.ubMaxNumberOfTraits; bCnt++ )
|
||||
// exception for special merc
|
||||
if ( gSkillTraitValues.fAllowSpecialMercTraitsException && ubProfileID == gSkillTraitValues.ubSpecialMercID)
|
||||
{
|
||||
bMaxTraits++;
|
||||
bMaxMajorTraits++;
|
||||
}
|
||||
|
||||
for ( INT8 bCnt = 0; bCnt < bMaxTraits; bCnt++ )
|
||||
{
|
||||
if ( TwoStagedTrait(bSkillTrait) )
|
||||
{
|
||||
@@ -2675,7 +2684,7 @@ INT8 ProfileHasSkillTrait( INT32 ubProfileID, INT8 bSkillTrait )
|
||||
bNumMajorTraitsCounted++;
|
||||
}
|
||||
// if we exceeded the allowed number of major traits, ignore the rest of them
|
||||
if ( bNumMajorTraitsCounted >= gSkillTraitValues.ubNumberOfMajorTraitsAllowed )
|
||||
if ( bNumMajorTraitsCounted >= bMaxMajorTraits )
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user