Mercurial > mm7
diff Player.cpp @ 906:23655ae9cd18
Слияние
author | Ritor1 |
---|---|
date | Fri, 19 Apr 2013 18:11:28 +0600 |
parents | 4dc2252e0b03 |
children | 897b10712a1a |
line wrap: on
line diff
--- a/Player.cpp Fri Apr 19 18:11:01 2013 +0600 +++ b/Player.cpp Fri Apr 19 18:11:28 2013 +0600 @@ -256,8 +256,8 @@ v2 = &this->pEquipment; while ( 1 ) { - result = v2->uOffHand; - if ( v2->uOffHand ) + result = v2->uShield; + if ( v2->uShield ) { result = *(int *)&this->pInventoryItems[result-1]; if ( result ) @@ -1213,7 +1213,7 @@ if ( SHIDWORD(pParty->pPartyBuffs[13].uExpireTime) >= 0 && (SHIDWORD(pParty->pPartyBuffs[13].uExpireTime) > 0 || LODWORD(pParty->pPartyBuffs[13].uExpireTime) > 0) ) goto LABEL_10; - if ( v3->HasEnchantedItemEquipped(18) || v9->WearsItem(505, 3) || v10->WearsItem(530, 6) ) + if ( v3->HasEnchantedItemEquipped(18) || v3->WearsItem(505, 3) || v3->WearsItem(530, 6) ) goto LABEL_76; LABEL_40: v26 = 0; @@ -1540,7 +1540,7 @@ v4 = v2 + 1; v5 = (char *)this + 36 * v2; v6 = &byte_4E8394[pItemsTable->pItems[uItemID].uEquipType + 4]; - *(&this->pEquipment.uOffHand + (unsigned __int8)*v6) = v4; + *(&this->pEquipment.uShield + (unsigned __int8)*v6) = v4; *((int *)v5 + 133) = uItemID; v5[556] = *v6 + 1; } @@ -2787,7 +2787,7 @@ v7 = v6->uItemID; v8 = v6->uItemID; v9 = pItemsTable->pItems[v8].uDamageDice; - if ( pItemsTable->pItems[v8].uSkillType == PLAYER_SKILL_SPEAR && !v5->pEquipment.uOffHand ) + if ( pItemsTable->pItems[v8].uSkillType == PLAYER_SKILL_SPEAR && !v5->pEquipment.uShield ) ++v9; v30 = pItemsTable->pItems[v8].uDamageRoll; if ( v9 > 0 ) @@ -2855,7 +2855,7 @@ { if ( v5->HasItemEquipped((ITEM_EQUIP_TYPE)0) ) { - v15 = (ItemGen *)&v5->pInventoryItems[v5->pEquipment.uOffHand-1]; + v15 = (ItemGen *)&v5->pInventoryItems[v5->pEquipment.uShield - 1]; v16 = v15->uItemID; v17 = v15->uItemID; if ( pItemsTable->pItems[v17].uEquipType != 4 ) @@ -3320,7 +3320,7 @@ } if ( resistance == 4 ) { - v14 = v3->pEquipment.uBody; + v14 = v3->pEquipment.uArmor; if ( v14 ) { if ( !(v3->field_1F5[36 * v14 + 15] & 2) ) @@ -3685,7 +3685,7 @@ } if ( v6 ) { - v7 = v3->pEquipment.uBody; + v7 = v3->pEquipment.uArmor; if ( v7 ) { v8 = &v3->field_1F5[36 * v7 + 15]; @@ -3815,9 +3815,9 @@ if ( HasItemEquipped((ITEM_EQUIP_TYPE)v14) ) { if ( v15 == EQUIP_ARMOUR ) - v46[v4++] = LOBYTE(v5->pEquipment.uBody) - 1; + v46[v4++] = LOBYTE(v5->pEquipment.uArmor) - 1; if ( (!v15 || v15 == 1) && GetEquippedItemEquipType((ITEM_EQUIP_TYPE)v15) == 4 ) - v46[v4++] = *((char *)&v5->pEquipment.uOffHand + 4 * v15) - 1; + v46[v4++] = *((char *)&v5->pEquipment.uShield + 4 * v15) - 1; } v14 = v15 + 1; } @@ -3833,7 +3833,7 @@ v46[v4++] = LOBYTE(v5->pEquipment.uBow) - 1; if ( (!v17 || v17 == 1) && (!GetEquippedItemEquipType((ITEM_EQUIP_TYPE)v17) || GetEquippedItemEquipType((ITEM_EQUIP_TYPE)v17) == 1) ) - v46[v4++] = *((char *)&v5->pEquipment.uOffHand + 4 * v17) - 1; + v46[v4++] = *((char *)&v5->pEquipment.uShield + 4 * v17) - 1; } v16 = v17 + 1; } @@ -4107,11 +4107,11 @@ } if (HasItemEquipped(EQUIP_OFF_HAND) && GetEquippedItemEquipType(EQUIP_OFF_HAND) != EQUIP_SHIELD) // ADD: shield check because shield recovery is added later and can be accidentally doubled { - auto v12 = &pInventoryItems[pEquipment.uOffHand - 1]; + auto v12 = &pInventoryItems[pEquipment.uShield - 1]; auto v12_desc = &pItemsTable->pItems[v12->uItemID]; if (base_recovery_times_per_weapon_type[v12_desc->uSkillType] > weapon_recovery) { - weapon = &pInventoryItems[pEquipment.uOffHand - 1]; + weapon = &pInventoryItems[pEquipment.uShield - 1]; weapon_desc = &pItemsTable->pItems[weapon->uItemID]; weapon_recovery = base_recovery_times_per_weapon_type[pItemsTable->pItems[weapon->uItemID].uSkillType]; } @@ -4121,7 +4121,7 @@ uint armour_recovery = 0; if ( HasItemEquipped(EQUIP_ARMOUR) ) { - auto armour_skill_type = pItemsTable->pItems[pInventoryItems[pEquipment.uBody - 1].uItemID].uSkillType; + auto armour_skill_type = pItemsTable->pItems[pInventoryItems[pEquipment.uArmor - 1].uItemID].uSkillType; uint base_armour_recovery = base_recovery_times_per_weapon_type[armour_skill_type]; float armour_recovery_multipliers[4]; @@ -4164,7 +4164,7 @@ { float shield_recovery_multipliers[4] = {1, 0, 0, 0}; - auto shield = &pInventoryItems[pEquipment.uOffHand - 1]; + auto shield = &pInventoryItems[pEquipment.uShield - 1]; auto skill_type = pItemsTable->pItems[shield->uItemID].uSkillType; uint shield_base_recovery = base_recovery_times_per_weapon_type[skill_type]; @@ -4839,7 +4839,7 @@ { if ( !HasItemEquipped((ITEM_EQUIP_TYPE)v65) ) goto LABEL_361; - v31 = *(&v6->pEquipment.uOffHand + v65) - 1; + v31 = *(&v6->pEquipment.uShield + v65) - 1; if ( v3 == 9 ) { v32 = GetEquippedItemEquipType((ITEM_EQUIP_TYPE)v65); @@ -5411,7 +5411,7 @@ if ( v22 <= 2 ) { v23 = this->pInventoryItems[this->pEquipment.uMainHand].uItemID; - if ( v6->pEquipment.uOffHand || pItemsTable->pItems[v23].uSkillType != 4 ) + if ( v6->pEquipment.uShield || pItemsTable->pItems[v23].uSkillType != 4 ) { v24 = v23; v26 = pItemsTable->pItems[v23].uDamageRoll; @@ -5461,7 +5461,7 @@ } if ( a3 || !v6->HasItemEquipped(EQUIP_OFF_HAND) || (v19 = v6->GetEquippedItemEquipType(EQUIP_OFF_HAND), v19 < 0) || v19 > 2 ) return v5 + v62 + v61; - v20 = *(int *)&v6->pInventoryItems[v6->pEquipment.uOffHand-1]; + v20 = *(int *)&v6->pInventoryItems[v6->pEquipment.uShield - 1]; goto LABEL_365; } if ( attr == 27 ) @@ -5479,7 +5479,7 @@ if ( v9 <= 2 ) { v5 = pItemsTable->pItems[this->pInventoryItems[this->pEquipment.uMainHand].uItemID].uDamageDice + pItemsTable->pItems[this->pInventoryItems[this->pEquipment.uMainHand].uItemID].uDamageMod; - if ( !v6->pEquipment.uOffHand ) + if ( !v6->pEquipment.uShield ) { if ( pItemsTable->pItems[this->pInventoryItems[this->pEquipment.uMainHand].uItemID].uSkillType == 4 ) ++v5; @@ -5489,8 +5489,8 @@ } if ( a3 || !v6->HasItemEquipped(EQUIP_OFF_HAND) || (v12 = v6->GetEquippedItemEquipType(EQUIP_OFF_HAND), v12 < 0) || v12 > 2 ) return v5 + v62 + v61; - v14 = pItemsTable->pItems[this->pInventoryItems[this->pEquipment.uOffHand].uItemID].uDamageMod; - v15 = pItemsTable->pItems[this->pInventoryItems[this->pEquipment.uOffHand].uItemID].uDamageDice; + v14 = pItemsTable->pItems[this->pInventoryItems[this->pEquipment.uShield].uItemID].uDamageMod; + v15 = pItemsTable->pItems[this->pInventoryItems[this->pEquipment.uShield].uItemID].uDamageDice; LABEL_88: v5 += v15 + v14; } @@ -6190,7 +6190,7 @@ v69 = &v2->pEquipment; do { - if ( !v69->uOffHand || (v42 = (int)((char *)v2 + 36 * v69->uOffHand), *(char *)(v42 + 516) & 2) ) + if ( !v69->uShield || (v42 = (int)((char *)v2 + 36 * v69->uShield), *(char *)(v42 + 516) & 2) ) goto LABEL_117; v43 = (PLAYER_SKILL_TYPE)pItemsTable->pItems[*(int *)(v42 + 496)].uSkillType; v44 = pItemsTable->pItems[*(int *)(v42 + 496)].uSkillType;