|
|
|
@ -53,7 +53,9 @@ Function UpdateSpells() |
|
|
|
|
setPieces = __Config_SetList.ToArray() |
|
|
|
|
else |
|
|
|
|
int nPieces = __Config_SetList.GetSize() |
|
|
|
|
if nPieces == 4 |
|
|
|
|
if nPieces == 3 |
|
|
|
|
setPieces = new Form[3] |
|
|
|
|
elseif nPieces == 4 |
|
|
|
|
setPieces = new Form[4] |
|
|
|
|
elseif nPieces == 5 |
|
|
|
|
setPieces = new Form[5] |
|
|
|
@ -87,7 +89,10 @@ Function UpdateSpells() |
|
|
|
|
bonusSpells = __Config_SetBonusesList.ToArray() |
|
|
|
|
else |
|
|
|
|
int nSpells = __Config_SetBonusesList.GetSize() |
|
|
|
|
if nSpells == 4 |
|
|
|
|
|
|
|
|
|
if nSpells == 3 |
|
|
|
|
bonusSpells = new Form[3] |
|
|
|
|
elseif nSpells == 4 |
|
|
|
|
bonusSpells = new Form[4] |
|
|
|
|
elseif nSpells == 5 |
|
|
|
|
bonusSpells = new Form[5] |
|
|
|
@ -95,7 +100,7 @@ Function UpdateSpells() |
|
|
|
|
bonusSpells = new Form[6] |
|
|
|
|
endif |
|
|
|
|
iIndex = 0 |
|
|
|
|
while iIndex < nSpells |
|
|
|
|
while iIndex < bonusSpells.Length |
|
|
|
|
bonusSpells[iIndex] = __Config_SetBonusesList.GetAt(iIndex) |
|
|
|
|
iIndex += 1 |
|
|
|
|
endwhile |
|
|
|
@ -104,17 +109,20 @@ Function UpdateSpells() |
|
|
|
|
iIndex = 0 |
|
|
|
|
While iIndex < bonusSpells.Length |
|
|
|
|
Spell bonusSpell = bonusSpells[iIndex] as Spell |
|
|
|
|
If iIndex < nBonusSpells |
|
|
|
|
If PlayerREF.HasSpell(bonusSpell) == False |
|
|
|
|
PlayerREF.AddSpell(bonusSpell) |
|
|
|
|
bSpellAdded = True |
|
|
|
|
EndIf |
|
|
|
|
Else ; iIndex >= nBonusSpells |
|
|
|
|
If PlayerREF.HasSpell(bonusSpell) |
|
|
|
|
PlayerREF.RemoveSpell(bonusSpell) |
|
|
|
|
bSpellRemoved = True |
|
|
|
|
|
|
|
|
|
if bonusSpell |
|
|
|
|
If iIndex < nBonusSpells |
|
|
|
|
If PlayerREF.HasSpell(bonusSpell) == False |
|
|
|
|
PlayerREF.AddSpell(bonusSpell) |
|
|
|
|
bSpellAdded = True |
|
|
|
|
EndIf |
|
|
|
|
Else ; iIndex >= nBonusSpells |
|
|
|
|
If PlayerREF.HasSpell(bonusSpell) |
|
|
|
|
PlayerREF.RemoveSpell(bonusSpell) |
|
|
|
|
bSpellRemoved = True |
|
|
|
|
EndIf |
|
|
|
|
EndIf |
|
|
|
|
EndIf |
|
|
|
|
endif |
|
|
|
|
|
|
|
|
|
iIndex += 1 |
|
|
|
|
EndWhile |
|
|
|
|