diff mm7_6.cpp @ 232:c879446b4a22

inventory indexing fixed
author zipi
date Sun, 17 Feb 2013 15:04:56 +0100
parents 9917d3b4925e
children a6a8fa73b4ec
line wrap: on
line diff
--- a/mm7_6.cpp	Sun Feb 17 14:47:34 2013 +0100
+++ b/mm7_6.cpp	Sun Feb 17 15:04:56 2013 +0100
@@ -8016,7 +8016,7 @@
         v12 = v1->pEquipment.uMainHand;
         v29 = 1;
         _42777D_CastSpell_UseWand_ShootArrow(
-          *((int *)&pSpellDatas[66].field_8 + *(int *)&v1->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v12 + 5]),
+          *((int *)&pSpellDatas[66].field_8 + *(int *)&v1->pInventoryItems[v12-1]),
           v0 - 1,
           8u,
           0,
@@ -8039,7 +8039,7 @@
           {
             v15 = v1->pEquipment.uMainHand;
             if ( v1->HasItemEquipped(EQUIP_TWO_HANDED) )
-              v34 = pItemsTable->pItems[*(int *)&v1->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v15 + 5]].uSkillType;
+              v34 = pItemsTable->pItems[*(int *)&v1->pInventoryItems[v15-1]].uSkillType;
             pTurnEngine->_40471C();
           }
           else