Mercurial > mm7
diff Player.cpp @ 118:acff5a5d563b
Items bonus fix
author | Ritor1 |
---|---|
date | Sun, 10 Feb 2013 23:06:36 +0600 |
parents | 81e93310f73c |
children | 1c471f3629fb |
line wrap: on
line diff
--- a/Player.cpp Sun Feb 10 18:46:10 2013 +0600 +++ b/Player.cpp Sun Feb 10 23:06:36 2013 +0600 @@ -3389,7 +3389,7 @@ { v6 = 0; while ( !HasItemEquipped((ITEM_EQUIP_TYPE)v6) - || *(int *)&this->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * *(int *)v7 + 5] != a1 ) + || *(int *)&this->pInventoryItems[a2-1].uItemID != a1 ) { ++v6; if ( (signed int)v6 >= 16 ) @@ -5450,12 +5450,13 @@ { if ( v6->HasItemEquipped(EQUIP_TWO_HANDED) ) { - v22 = v21->GetEquippedItemEquipType(1u); + v22 = this->GetEquippedItemEquipType(1u); if ( v22 >= 0 ) { if ( v22 <= 2 ) { - if ( v6->pEquipment.uOffHand || (v24 = v23, pItemsTable->pItems[v23].uSkillType != 4) ) + v23 = this->pInventoryItems[this->pEquipment.uMainHand].uItemID; + if ( v6->pEquipment.uOffHand || pItemsTable->pItems[v23].uSkillType != 4 ) { v24 = v23; v26 = pItemsTable->pItems[v23].uDamageRoll; @@ -5496,7 +5497,7 @@ } if ( v6->HasItemEquipped(EQUIP_TWO_HANDED) ) { - v17 = v16->GetEquippedItemEquipType(1u); + v17 = this->GetEquippedItemEquipType(1u); if ( v17 >= 0 ) { if ( v17 <= 2 ) @@ -5517,15 +5518,15 @@ } if ( v6->HasItemEquipped(EQUIP_TWO_HANDED) ) { - v9 = v8->GetEquippedItemEquipType(1u); + v9 = this->GetEquippedItemEquipType(1u); if ( v9 >= 0 ) { if ( v9 <= 2 ) { - v5 = pItemsTable->pItems[v10].uDamageDice + pItemsTable->pItems[v10].uDamageMod; + v5 = pItemsTable->pItems[this->pInventoryItems[this->pEquipment.uMainHand].uItemID].uDamageDice + pItemsTable->pItems[this->pInventoryItems[this->pEquipment.uMainHand].uItemID].uDamageMod; if ( !v6->pEquipment.uOffHand ) { - if ( pItemsTable->pItems[v10].uSkillType == 4 ) + if ( pItemsTable->pItems[this->pInventoryItems[this->pEquipment.uMainHand].uItemID].uSkillType == 4 ) ++v5; } } @@ -5533,8 +5534,8 @@ } if ( a3 || !v6->HasItemEquipped((ITEM_EQUIP_TYPE)0) || (v12 = v11->GetEquippedItemEquipType(0), v12 < 0) || v12 > 2 ) return v5 + v62 + v61; - v14 = pItemsTable->pItems[v13].uDamageMod; - v15 = pItemsTable->pItems[v13].uDamageDice; + v14 = pItemsTable->pItems[this->pInventoryItems[this->pEquipment.uOffHand].uItemID].uDamageMod; + v15 = pItemsTable->pItems[this->pInventoryItems[this->pEquipment.uOffHand].uItemID].uDamageDice; LABEL_88: v5 += v15 + v14; } @@ -6041,8 +6042,8 @@ { if ( v2->HasItemEquipped(v71) ) { - v11 = (PLAYER_SKILL_TYPE)pItemsTable->pItems[*(int *)&v2->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v9->uOffHand + 5]].uSkillType; - LOBYTE(v12) = v10->GetActualSkillLevel(v11); + v11 = (PLAYER_SKILL_TYPE)pItemsTable->pItems[v2->pInventoryItems[*(_DWORD *)v9].uItemID].uEquipType; + LOBYTE(v12) = this->GetActualSkillLevel(v11); a1 = v12; SkillToMastery(v12); v13 = v11 - 5; @@ -6099,7 +6100,7 @@ { if ( v2->HasItemEquipped(v20) ) { - v22 = *(int *)&v2->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * *(int *)v21 + 5]; + v22 = this->pInventoryItems[this->pEquipment.pIndices[v20]].uItemID; if ( pItemsTable->pItems[v22].uEquipType <= 1u ) break; } @@ -6152,7 +6153,7 @@ if ( v23 == PLAYER_SKILL_MACE ) { v28 = __OFSUB__(v26, 2); - v27 = ((v26 - 2) & 0x80000000u) != 0; + v27 = v26 - 2 < 0; goto LABEL_53; } LABEL_55: @@ -6160,7 +6161,7 @@ return (int)((char *)v69 + v30); } v28 = __OFSUB__(v26, 3); - v27 = ((v26 - 3) & 0x80000000u) != 0; + v27 = v26 - 3 < 0; } LABEL_53: if ( !(v27 ^ v28) ) @@ -6184,7 +6185,7 @@ { if ( v2->HasItemEquipped(v35) ) { - v37 = *(int *)&v2->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * *(int *)v36 + 5]; + v37 = *(int *)&v2->pInventoryItems[v35].uItemID; if ( pItemsTable->pItems[v37].uEquipType <= 1u ) break; }