Mercurial > mm7
diff Player.cpp @ 198:e6e348d66a75
Some work on spellbook
author | Nomad |
---|---|
date | Sat, 16 Feb 2013 21:46:07 +0200 |
parents | 9b77686e2239 |
children | 30aa44013f7a |
line wrap: on
line diff
--- a/Player.cpp Sat Feb 16 20:24:31 2013 +0200 +++ b/Player.cpp Sat Feb 16 21:46:07 2013 +0200 @@ -1761,6 +1761,8 @@ unsigned int uSlota; // [sp+14h] [bp+4h]@1 pIndices = &this->pInventoryIndices[uSlot]; + + __debugbreak(); // the following indexing is invalid v3 = (ItemGen *)&this->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * *pIndices + 5]; v4 = v3->uItemID; v3->Reset(); @@ -2315,6 +2317,8 @@ field_FC = 0; field_100 = 0; field_104 = 0; + + lastOpenedSpellbookPage = 0; } //----- (0048C6F6) -------------------------------------------------------- @@ -6534,15 +6538,15 @@ switch (i) { - case PLAYER_SKILL_FIRE: spellbook.pFireSpellbook.bIsSpellbookAvailable = true; break; - case PLAYER_SKILL_AIR: spellbook.pAirSpellbook.bIsSpellbookAvailable = true; break; - case PLAYER_SKILL_WATER: spellbook.pWaterSpellbook.bIsSpellbookAvailable = true; break; - case PLAYER_SKILL_EARTH: spellbook.pEarthSpellbook.bIsSpellbookAvailable = true; break; - case PLAYER_SKILL_SPIRIT: spellbook.pSpiritSpellbook.bIsSpellbookAvailable = true; break; - case PLAYER_SKILL_MIND: spellbook.pMindSpellbook.bIsSpellbookAvailable = 1; break; - case PLAYER_SKILL_BODY: spellbook.pBodySpellbook.bIsSpellbookAvailable = 1; break; - case PLAYER_SKILL_LIGHT: spellbook.pLightSpellbook.bIsSpellbookAvailable = 1; break; - case PLAYER_SKILL_DARK: spellbook.pDarkSpellbook.bIsSpellbookAvailable = 1; break; + case PLAYER_SKILL_FIRE: spellbook.pFireSpellbook.bIsSpellAvailable[0] = true; break; + case PLAYER_SKILL_AIR: spellbook.pAirSpellbook.bIsSpellAvailable[0] = true; break; + case PLAYER_SKILL_WATER: spellbook.pWaterSpellbook.bIsSpellAvailable[0] = true; break; + case PLAYER_SKILL_EARTH: spellbook.pEarthSpellbook.bIsSpellAvailable[0] = true; break; + case PLAYER_SKILL_SPIRIT: spellbook.pSpiritSpellbook.bIsSpellAvailable[0] = true; break; + case PLAYER_SKILL_MIND: spellbook.pMindSpellbook.bIsSpellAvailable[0] = true; break; + case PLAYER_SKILL_BODY: spellbook.pBodySpellbook.bIsSpellAvailable[0] = true; break; + case PLAYER_SKILL_LIGHT: spellbook.pLightSpellbook.bIsSpellAvailable[0] = true; break; + case PLAYER_SKILL_DARK: spellbook.pDarkSpellbook.bIsSpellAvailable[0] = true; break; } }