Major update
inv_inc_invfunc.nss - GetHighestInvokerLevel(), GetFirstInvocationClassPosition(), GetPrimaryInvocationClass() inc_epicspellfnc.nss - GetCanLearnSeed() inc_newspellbook.nss - CheckNewSpellbooks(), GetSpellslotLevel() moi_inc_moifunc.nss - GetHighestMeldshaperLevel(), GetPrimaryIncarnumClass(), GetFirstIncarnumClassPosition() nw_o2_coninclude.nss - nDetermineClassToUse() prc_inc_castlvl.nss - GetArcanePRCLevels(), GetDivinePRCLevels(), GetFirstArcaneClassPosition(), GetFirstDivineClassPosition(), GetPrimaryArcaneClass(), GetPrimaryDivineClass(), GetPrimarySpellcastingClass(), UrPriestCL(), GetLevelByTypeArcane(), GetLevelByTypeDivine(), [Needs marker feats] prc_inc_clsfunc.nss - [Needs marker feats] prc_inc_core.nss - PRCGetSpellLevel(), UseNewSpellBook(), PRCGetHasSpell(), PRCGetIsRealSpellKnown() prc_inc_domain.nss - CastDomainSpell() prc_inc_function.nss - SetupCharacterData(), [Needs marker feats] prc_inc_itmrstr.nss - _prc_inc_itmrstr_ApplyWizardry() prc_inc_leadersh.nss - StoreCohort() prc_inc_spells.nss - GetPrCAdjustedCasterLevelByType(), GetLevelByTypeArcaneFeats(), GetLevelByTypeDivineFeats(), PRCDecrementRemainingSpellUses(), PRCGetSpellUsesLeft() prc_shifter_info.nss - _prc_inc_PrintDebugItem(), _prc_inc_PrintShape() psi_inc_core.nss - GetHighestManifesterLevel(), GetPrimaryPsionicClass(), GetFirstPsionicClassPosition() shd_inc_shdfunc.nss - GetHighestShadowcasterLevel(), GetPrimaryShadowMagicClass(), GetFirstShadowMagicClassPosition() tob_inc_recovery.nss - RecoverPrCAbilities() tob_inc_tobfunc.nss - GetHighestInitiatorLevel(), GetPrimaryBladeMagicClass(), GetFirstBladeMagicClassPosition() true_inc_trufunc.nss - GetHighestTrueSpeakerLevel()
This commit is contained in:
@@ -16,6 +16,11 @@
|
||||
//:://////////////////////////////////////////////
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
//:: Updated for .35 by Jaysyn 2023/03/10
|
||||
|
||||
//:: Test Void
|
||||
// void main (){}
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
/* Function prototypes */
|
||||
//////////////////////////////////////////////////
|
||||
@@ -295,13 +300,35 @@ int GetIsShadowMagicUser(object oCreature)
|
||||
}
|
||||
|
||||
int GetHighestShadowcasterLevel(object oCreature)
|
||||
{
|
||||
int n = 0;
|
||||
int nHighest;
|
||||
int nTemp;
|
||||
|
||||
while(n <= 8)
|
||||
{
|
||||
if(GetClassByPosition(n, oCreature) != CLASS_TYPE_INVALID)
|
||||
{
|
||||
nTemp = GetShadowcasterLevel(oCreature, GetClassByPosition(n, oCreature));
|
||||
|
||||
if(nTemp > nHighest)
|
||||
nHighest = nTemp;
|
||||
}
|
||||
n++;
|
||||
|
||||
}
|
||||
|
||||
return nHighest;
|
||||
}
|
||||
|
||||
/* int GetHighestShadowcasterLevel(object oCreature)
|
||||
{
|
||||
return max(max(GetClassByPosition(1, oCreature) != CLASS_TYPE_INVALID ? GetShadowcasterLevel(oCreature, GetClassByPosition(1, oCreature)) : 0,
|
||||
GetClassByPosition(2, oCreature) != CLASS_TYPE_INVALID ? GetShadowcasterLevel(oCreature, GetClassByPosition(2, oCreature)) : 0
|
||||
),
|
||||
GetClassByPosition(3, oCreature) != CLASS_TYPE_INVALID ? GetShadowcasterLevel(oCreature, GetClassByPosition(3, oCreature)) : 0
|
||||
);
|
||||
}
|
||||
} */
|
||||
|
||||
int GetIsShadowMagicClass(int nClass)
|
||||
{
|
||||
@@ -376,18 +403,30 @@ int GetPrimaryShadowMagicClass(object oCreature = OBJECT_SELF)
|
||||
else
|
||||
{
|
||||
int nClassLvl;
|
||||
int nClass1, nClass2, nClass3;
|
||||
int nClass1Lvl, nClass2Lvl, nClass3Lvl;
|
||||
int nClass1, nClass2, nClass3, nClass4, nClass5, nClass6, nClass7, nClass8;
|
||||
int nClass1Lvl, nClass2Lvl, nClass3Lvl, nClass4Lvl, nClass5Lvl, nClass6Lvl, nClass7Lvl, nClass8Lvl;
|
||||
|
||||
nClass1 = GetClassByPosition(1, oCreature);
|
||||
nClass2 = GetClassByPosition(2, oCreature);
|
||||
nClass3 = GetClassByPosition(3, oCreature);
|
||||
nClass4 = GetClassByPosition(4, oCreature);
|
||||
nClass5 = GetClassByPosition(5, oCreature);
|
||||
nClass6 = GetClassByPosition(6, oCreature);
|
||||
nClass7 = GetClassByPosition(7, oCreature);
|
||||
nClass8 = GetClassByPosition(8, oCreature);
|
||||
|
||||
if(GetIsShadowMagicClass(nClass1)) nClass1Lvl = GetLevelByClass(nClass1, oCreature);
|
||||
if(GetIsShadowMagicClass(nClass2)) nClass2Lvl = GetLevelByClass(nClass2, oCreature);
|
||||
if(GetIsShadowMagicClass(nClass3)) nClass3Lvl = GetLevelByClass(nClass3, oCreature);
|
||||
if(GetIsShadowMagicClass(nClass4)) nClass4Lvl = GetLevelByClass(nClass4, oCreature);
|
||||
if(GetIsShadowMagicClass(nClass5)) nClass5Lvl = GetLevelByClass(nClass5, oCreature);
|
||||
if(GetIsShadowMagicClass(nClass6)) nClass6Lvl = GetLevelByClass(nClass6, oCreature);
|
||||
if(GetIsShadowMagicClass(nClass7)) nClass7Lvl = GetLevelByClass(nClass7, oCreature);
|
||||
if(GetIsShadowMagicClass(nClass8)) nClass8Lvl = GetLevelByClass(nClass8, oCreature);
|
||||
|
||||
nClass = nClass1;
|
||||
nClassLvl = nClass1Lvl;
|
||||
|
||||
if(nClass2Lvl > nClassLvl)
|
||||
{
|
||||
nClass = nClass2;
|
||||
@@ -398,6 +437,32 @@ int GetPrimaryShadowMagicClass(object oCreature = OBJECT_SELF)
|
||||
nClass = nClass3;
|
||||
nClassLvl = nClass3Lvl;
|
||||
}
|
||||
if(nClass4Lvl > nClassLvl)
|
||||
{
|
||||
nClass = nClass4;
|
||||
nClassLvl = nClass4Lvl;
|
||||
}
|
||||
if(nClass5Lvl > nClassLvl)
|
||||
{
|
||||
nClass = nClass5;
|
||||
nClassLvl = nClass5Lvl;
|
||||
}
|
||||
if(nClass6Lvl > nClassLvl)
|
||||
{
|
||||
nClass = nClass6;
|
||||
nClassLvl = nClass6Lvl;
|
||||
}
|
||||
if(nClass7Lvl > nClassLvl)
|
||||
{
|
||||
nClass = nClass7;
|
||||
nClassLvl = nClass7Lvl;
|
||||
}
|
||||
if(nClass8Lvl > nClassLvl)
|
||||
{
|
||||
nClass = nClass8;
|
||||
nClassLvl = nClass8Lvl;
|
||||
}
|
||||
|
||||
if(nClassLvl == 0)
|
||||
nClass = CLASS_TYPE_INVALID;
|
||||
}
|
||||
@@ -413,7 +478,17 @@ int GetFirstShadowMagicClassPosition(object oCreature = OBJECT_SELF)
|
||||
return 2;
|
||||
if (GetIsShadowMagicClass(GetClassByPosition(3, oCreature)))
|
||||
return 3;
|
||||
|
||||
if (GetIsShadowMagicClass(GetClassByPosition(4, oCreature)))
|
||||
return 4;
|
||||
if (GetIsShadowMagicClass(GetClassByPosition(5, oCreature)))
|
||||
return 5;
|
||||
if (GetIsShadowMagicClass(GetClassByPosition(6, oCreature)))
|
||||
return 6;
|
||||
if (GetIsShadowMagicClass(GetClassByPosition(7, oCreature)))
|
||||
return 7;
|
||||
if (GetIsShadowMagicClass(GetClassByPosition(8, oCreature)))
|
||||
return 8;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user