comparison mm7_4.cpp @ 232:c879446b4a22

inventory indexing fixed
author zipi
date Sun, 17 Feb 2013 15:04:56 +0100
parents 46ae2602aceb
children 37dcbe8f3cca
comparison
equal deleted inserted replaced
231:a69fc44061d5 232:c879446b4a22
9102 v18 = (v8 >> 5) + 14 * ((pMouse->GetCursorPos((POINT *)&v14)->y - 17) >> 5); 9102 v18 = (v8 >> 5) + 14 * ((pMouse->GetCursorPos((POINT *)&v14)->y - 17) >> 5);
9103 if ( pMouse->GetCursorPos((POINT *)&v13)->x <= 13 9103 if ( pMouse->GetCursorPos((POINT *)&v13)->x <= 13
9104 || pMouse->GetCursorPos((POINT *)&v12)->x >= 462 9104 || pMouse->GetCursorPos((POINT *)&v12)->x >= 462
9105 || (v9 = v0->GetItemIDAtInventoryIndex(&v18)) == 0 ) 9105 || (v9 = v0->GetItemIDAtInventoryIndex(&v18)) == 0 )
9106 return; 9106 return;
9107 v7 = (ItemGen *)&v0->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v9 + 5]; 9107 v7 = (ItemGen *)&v0->pInventoryItems[v9-1];
9108 LABEL_15: 9108 LABEL_15:
9109 GameUI_DrawItemInfo(v7); 9109 GameUI_DrawItemInfo(v7);
9110 return; 9110 return;
9111 } 9111 }
9112 if ( dword_F8B19C != 95 ) 9112 if ( dword_F8B19C != 95 )
12264 v3 = 0; 12264 v3 = 0;
12265 if ( result ) 12265 if ( result )
12266 { 12266 {
12267 v96 = 0; 12267 v96 = 0;
12268 v94 = 4; 12268 v94 = 4;
12269 v4 = &_this->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * result + 5]; 12269 v4 = (char *)&_this->pInventoryItems[result-1];
12270 if ( v4[20] & 1 ) 12270 if ( v4[20] & 1 )
12271 { 12271 {
12272 v5 = sub_495461("%24", uActiveCharacter - 1, (ItemGen *)v4, (char *)ptr_507BC0->ptr_1C, 4, 0); 12272 v5 = sub_495461("%24", uActiveCharacter - 1, (ItemGen *)v4, (char *)ptr_507BC0->ptr_1C, 4, 0);
12273 v97 = 3; 12273 v97 = 3;
12274 v95 = v5; 12274 v95 = v5;
12304 || (result = v0->GetItemIDAtInventoryIndex((int *)&v117), v3 = 0, !result) ) 12304 || (result = v0->GetItemIDAtInventoryIndex((int *)&v117), v3 = 0, !result) )
12305 return result; 12305 return result;
12306 v96 = 0; 12306 v96 = 0;
12307 v94 = 3; 12307 v94 = 3;
12308 v93 = ptr_507BC0->ptr_1C; 12308 v93 = ptr_507BC0->ptr_1C;
12309 v90 = (ItemGen *)&_this->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * result + 5]; 12309 v90 = (ItemGen *)&_this->pInventoryItems[result-1];
12310 v12 = (int)ptr_507BC0->ptr_1C; 12310 v12 = (int)ptr_507BC0->ptr_1C;
12311 uPlayerID = uActiveCharacter - 1; 12311 uPlayerID = uActiveCharacter - 1;
12312 v13 = _this->_490EEE(v90, 3, v12, 3); 12312 v13 = _this->_490EEE(v90, 3, v12, 3);
12313 v9 = uPlayerID; 12313 v9 = uPlayerID;
12314 v10 = (char *)pMerchantsSellPhrases[v13]; 12314 v10 = (char *)pMerchantsSellPhrases[v13];