Added DC cap switch to prevent roll-over.
Added DC cap switch to prevent roll-over.
This commit is contained in:
@@ -634,6 +634,14 @@ int PRCGetSpellSaveDC(int nSpellID = -1, int nSchool = -1, object oCaster = OBJE
|
||||
}
|
||||
}
|
||||
|
||||
if (GetPRCSwitch(PRC_ACTIVATE_MAX_SPELL_DC_CAP))
|
||||
{
|
||||
if (nDC > GetPRCSwitch(PRC_SET_MAX_SPELL_DC_CAP))
|
||||
{
|
||||
nDC = GetPRCSwitch(PRC_SET_MAX_SPELL_DC_CAP);
|
||||
}
|
||||
}
|
||||
|
||||
return nDC;
|
||||
}
|
||||
|
||||
|
@@ -84,7 +84,7 @@ int GetLevelByTypeDivine(object oCaster = OBJECT_SELF);
|
||||
* note: PrCs with their own spellbook eg. assassin are not PrCs for this function
|
||||
*
|
||||
* @param oCaster The creature to check
|
||||
* @param nCastingClass Casting class.
|
||||
* @param nCastingClass Casting class
|
||||
*
|
||||
* @return Number of arcane caster levels contributed by PrCs.
|
||||
*/
|
||||
@@ -109,7 +109,7 @@ int GetDivinePRCLevels(object oCaster, int nCastingClass = CLASS_TYPE_INVALID);
|
||||
*
|
||||
* @param oCaster The creature to check
|
||||
*
|
||||
* @return The position (1,2 or 3) of the first arcane *base* class of oCaster
|
||||
* @return The position (1-8) of the first arcane *base* class of oCaster
|
||||
*/
|
||||
int GetFirstArcaneClassPosition(object oCaster = OBJECT_SELF);
|
||||
|
||||
@@ -118,7 +118,7 @@ int GetFirstArcaneClassPosition(object oCaster = OBJECT_SELF);
|
||||
*
|
||||
* @param oCaster The creature to check
|
||||
*
|
||||
* @return The position (1,2 or 3) of the first divine *base* class of oCaster
|
||||
* @return The position (1-8) of the first divine *base* class of oCaster
|
||||
*/
|
||||
int GetFirstDivineClassPosition(object oCaster = OBJECT_SELF);
|
||||
|
||||
|
@@ -259,6 +259,14 @@ const string PRC_SLEEP_NO_HD_CAP = "PRC_SLEEP_NO_HD_CAP";
|
||||
*/
|
||||
const string PRC_165_DEATH_IMMUNITY = "PRC_165_DEATH_IMMUNITY";
|
||||
|
||||
/*
|
||||
* PRC_ACTIVATE_MAX_SPELL_DC_CAP: activate a max cap on DC casted by creature/player
|
||||
* PRC_SET_MAX_SPELL_DC_CAP: the max value ex: 99
|
||||
*
|
||||
*/
|
||||
const string PRC_ACTIVATE_MAX_SPELL_DC_CAP = "PRC_ACTIVATE_MAX_SPELL_DC_CAP";
|
||||
const string PRC_SET_MAX_SPELL_DC_CAP = "PRC_SET_MAX_SPELL_DC_CAP";
|
||||
|
||||
/*
|
||||
* This is for builders. It should not be set on the module, but should be set on players/creatures.
|
||||
* When this is set, it will override spell DC for all spells cast (including SLAs and items)
|
||||
@@ -1305,9 +1313,9 @@ const string PRC_ACP_NPC_AUTOMATIC = "PRC_ACP_NPC_AUTOMATIC";
|
||||
const string PRC_ACP_DELAY = "PRC_ACP_DELAY";
|
||||
|
||||
|
||||
/******************************************************************************\
|
||||
* File End switches *
|
||||
\******************************************************************************/
|
||||
/******************************************************************************
|
||||
* File End switches
|
||||
******************************************************************************/
|
||||
|
||||
/**
|
||||
* If this is set it will disable the defaults and the module builder must set
|
||||
@@ -2956,3 +2964,6 @@ void SetPRCSwitch(string sSwitch, int nState)
|
||||
{
|
||||
SetLocalInt(GetModule(), sSwitch, nState);
|
||||
}
|
||||
|
||||
|
||||
// void main (){}
|
||||
|
Reference in New Issue
Block a user