Initial Commit

Initial Commit.
This commit is contained in:
Jaysyn904
2025-09-14 15:40:46 -04:00
parent 7083b33d71
commit 1eefc84201
19230 changed files with 11539227 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
#include "prc_x2_itemprop"
#include "prc_inc_spells"
void main()
{
float fLvl;
object oItem = PRCGetSpellCastItem();
int nSpell = PRCGetSpellId();
int nLvl = StringToInt(Get2DAString("spells","innate",nSpell));
if (nLvl==0) fLvl = 0.5;
else fLvl = IntToFloat(nLvl);
fLvl = GetLocalFloat(oItem,"CurrentLvl")-fLvl;
if (GetTag(oItem)=="storering")
{
int nIPCast = IPGetIPConstCastSpellFromSpellID(nSpell);
itemproperty ipTest = ItemPropertyCastSpell(nIPCast,IP_CONST_CASTSPELL_NUMUSES_0_CHARGES_PER_USE);
SetItemCharges(oItem,3);
itemproperty ipTmp = GetFirstItemProperty(oItem);
while (GetIsItemPropertyValid(ipTmp))
{
if (GetItemPropertyType(ipTmp) == GetItemPropertyType(ipTest))
if (GetItemPropertySubType(ipTmp) == GetItemPropertySubType(ipTest))
{
RemoveItemProperty(oItem,ipTmp);
SetLocalFloat(oItem,"CurrentLvl",fLvl);
return;
}
ipTmp = GetNextItemProperty(oItem);
}
}
}