49 lines
919 B
Plaintext
49 lines
919 B
Plaintext
void DecrementTalentIndex(int iIndex, object oPC)
|
|
{
|
|
int iDecrementIndex;
|
|
|
|
talent tSpell;
|
|
talent tFeat;
|
|
|
|
tSpell = TalentSpell(iIndex);
|
|
tFeat = TalentFeat(iIndex);
|
|
|
|
if (GetIsTalentValid(tSpell))
|
|
{
|
|
if (GetHasSpell(GetIdFromTalent(tSpell), oPC))
|
|
{
|
|
for (iDecrementIndex = 1; iDecrementIndex < 20; iDecrementIndex++)
|
|
{
|
|
DecrementRemainingSpellUses(oPC, GetIdFromTalent(tSpell));
|
|
if(!GetHasSpell(GetIdFromTalent(tSpell), oPC))
|
|
iDecrementIndex=20;
|
|
}
|
|
}
|
|
}
|
|
|
|
if (GetIsTalentValid(tFeat))
|
|
{
|
|
if (GetHasFeat(GetIdFromTalent(tFeat), oPC))
|
|
{
|
|
for (iDecrementIndex = 1; iDecrementIndex < 20; iDecrementIndex++)
|
|
{
|
|
DecrementRemainingFeatUses(oPC, GetIdFromTalent(tFeat));
|
|
if(!GetHasFeat(GetIdFromTalent(tFeat), oPC))
|
|
iDecrementIndex=20;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
void KillSpells(object oPC, location oPCLoc)
|
|
{
|
|
int iIndex;
|
|
|
|
for (iIndex = 1; iIndex < 1000; iIndex++)
|
|
{
|
|
DecrementTalentIndex(iIndex, oPC);
|
|
}
|
|
|
|
DecrementRemainingSpellUses(oPC,SPELL_ALL_SPELLS);
|
|
}
|