Mercurial > mm7
changeset 1042:0744f8665045
Merge
author | Gloval |
---|---|
date | Thu, 23 May 2013 08:27:15 +0400 |
parents | c5498375832a (diff) 682ba1c83fd3 (current diff) |
children | d36681a9e4f8 |
files | |
diffstat | 2 files changed, 166 insertions(+), 225 deletions(-) [+] |
line wrap: on
line diff
--- a/Player.cpp Thu May 23 03:32:36 2013 +0200 +++ b/Player.cpp Thu May 23 08:27:15 2013 +0400 @@ -2915,9 +2915,9 @@ int result; // eax@6 v1 = this; - v2 = GetItemsBonus(CHARACTER_ATTRIBUTE_RANGED_DAMAGE_MIN, 0); - v3 = GetSkillBonus(CHARACTER_ATTRIBUTE_RANGED_DAMAGE_BONUS) + v2; - v4 = v1->_ranged_dmg_bonus + GetMagicalBonus(CHARACTER_ATTRIBUTE_RANGED_DAMAGE_BONUS) + v3; + v2 = GetItemsBonus(CHARACTER_ATTRIBUTE_RANGED_DMG_MIN, 0); + v3 = GetSkillBonus(CHARACTER_ATTRIBUTE_RANGED_DMG_BONUS) + v2; + v4 = v1->_ranged_dmg_bonus + GetMagicalBonus(CHARACTER_ATTRIBUTE_RANGED_DMG_BONUS) + v3; v5 = v1->pActiveSkills[5]; if ( v5 && (signed int)SkillToMastery(v5) >= 4 && HasItemEquipped(EQUIP_BOW) ) v4 += v1->pActiveSkills[5] & 0x3F; @@ -2939,9 +2939,9 @@ int result; // eax@6 v1 = this; - v2 = GetItemsBonus(CHARACTER_ATTRIBUTE_RANGED_DAMAGE_MAX, 0); - v3 = GetSkillBonus(CHARACTER_ATTRIBUTE_RANGED_DAMAGE_BONUS) + v2; - v4 = v1->_ranged_dmg_bonus + GetMagicalBonus(CHARACTER_ATTRIBUTE_RANGED_DAMAGE_BONUS) + v3; + v2 = GetItemsBonus(CHARACTER_ATTRIBUTE_RANGED_DMG_MAX, 0); + v3 = GetSkillBonus(CHARACTER_ATTRIBUTE_RANGED_DMG_BONUS) + v2; + v4 = v1->_ranged_dmg_bonus + GetMagicalBonus(CHARACTER_ATTRIBUTE_RANGED_DMG_BONUS) + v3; v5 = v1->pActiveSkills[5]; if ( v5 && (signed int)SkillToMastery(v5) >= 4 && HasItemEquipped(EQUIP_BOW) ) v4 += v1->pActiveSkills[5] & 0x3F; @@ -4483,7 +4483,7 @@ int Player::GetItemsBonus(CHARACTER_ATTRIBUTE_TYPE attr, int a3) { CHARACTER_ATTRIBUTE_TYPE v3; // esi@1 - signed int v4; // eax@1 + // signed int v4; // eax@1 int v5; // edi@1 Player *v6; // ebx@1 Player *v8; // ecx@48 @@ -4544,145 +4544,73 @@ int v63; // [sp+18h] [bp-4h]@101 ItemGen *attra; // [sp+20h] [bp+4h]@101 unsigned int v65; // [sp+24h] [bp+8h]@95 + bool no_skills; v3 = attr; - v4 = 36; v5 = 0; v6 = this; v62 = 0; v61 = 0; + + no_skills=false; switch (attr) - { - case CHARACTER_ATTRIBUTE_LEVEL: - if (HasEnchantedItemEquipped(25)) - return 5; - return 0; - }; - - if ( (signed int)attr > 36 ) - { - switch ( attr ) - { - case 37: - v58 = 15; - goto LABEL_35; - case 38: - v58 = 16; - goto LABEL_35; - case 39: - v58 = 17; - goto LABEL_35; - case 40: - v58 = 18; - goto LABEL_35; - case 41: - v58 = 19; - goto LABEL_35; - case 42: - v58 = 20; - goto LABEL_35; - case 43: - v58 = 25; - goto LABEL_35; - case 44: - v58 = 5; - goto LABEL_35; - case 45: - v58 = 8; - goto LABEL_35; - case 46: - goto LABEL_36; - default: - break; - } - } - else - { - if ( attr == 36 ) - { - v58 = 14; - } - else - { - if ( (signed int)attr > 21 ) { - switch ( attr ) - { - case 22: - v58 = 30; - break; - case 23: - v58 = 31; - break; - case 34: - v58 = 12; - break; - default: - if ( attr != 35 ) - goto LABEL_38; - v58 = 13; - break; - } + case CHARACTER_ATTRIBUTE_SKILL_ALCHEMY: v58 = PLAYER_SKILL_ALCHEMY; break; + case CHARACTER_ATTRIBUTE_SKILL_STEALING: v58 = PLAYER_SKILL_STEALING; break; + case CHARACTER_ATTRIBUTE_SKILL_TRAP_DISARM: v58 = PLAYER_SKILL_TRAP_DISARM; break; + case CHARACTER_ATTRIBUTE_SKILL_ITEM_ID: v58 = PLAYER_SKILL_ITEM_ID; break; + case CHARACTER_ATTRIBUTE_SKILL_MONSTER_ID: v58 = PLAYER_SKILL_MONSTER_ID; break; + case CHARACTER_ATTRIBUTE_SKILL_ARMSMASTER: v58 = PLAYER_SKILL_ARMSMASTER; break; + case CHARACTER_ATTRIBUTE_SKILL_DODGE: v58 = PLAYER_SKILL_DODGE; break; + case CHARACTER_ATTRIBUTE_SKILL_UNARMED: v58 = PLAYER_SKILL_UNARMED; break; + case CHARACTER_ATTRIBUTE_SKILL_FIRE: v58 = PLAYER_SKILL_FIRE; break; + case CHARACTER_ATTRIBUTE_SKILL_AIR: v58 = PLAYER_SKILL_AIR; break; + case CHARACTER_ATTRIBUTE_SKILL_WATER: v58 = PLAYER_SKILL_WATER; break; + case CHARACTER_ATTRIBUTE_SKILL_EARTH: v58 = PLAYER_SKILL_EARTH; break; + case CHARACTER_ATTRIBUTE_SKILL_SPIRIT: v58 = PLAYER_SKILL_SPIRIT; break; + case CHARACTER_ATTRIBUTE_SKILL_MIND: v58 = PLAYER_SKILL_MIND; break; + case CHARACTER_ATTRIBUTE_SKILL_BODY: v58 = PLAYER_SKILL_BODY; break; + case CHARACTER_ATTRIBUTE_SKILL_LIGHT: v58 = PLAYER_SKILL_LIGHT; break; + case CHARACTER_ATTRIBUTE_SKILL_DARK: v58 = PLAYER_SKILL_DARK; break; + case CHARACTER_ATTRIBUTE_SKILL_MEDITATION: v58 = PLAYER_SKILL_MEDITATION; break; + case CHARACTER_ATTRIBUTE_SKILL_BOW: v58 = PLAYER_SKILL_BOW; break; + case CHARACTER_ATTRIBUTE_SKILL_SHIELD: v58 = PLAYER_SKILL_SHIELD; break; + case CHARACTER_ATTRIBUTE_SKILL_LEARNING: v58 = PLAYER_SKILL_LEARNING; break; + default: + no_skills=true; } - else + if (!no_skills) { - switch ( attr ) - { - case 21: - v58 = 33; - break; - case 16: - v58 = 35; - break; - case 17: - v58 = 34; - break; - case 18: - v58 = 29; - break; - case 19: - v58 = 21; - break; - default: - if ( attr != 20 ) - goto LABEL_38; - v58 = 32; - break; - } + if ( !this->pActiveSkills[v58] ) + return 0; } - } -LABEL_35: - v4 = v58; -LABEL_36: - if ( !this->pActiveSkills[v4] ) - return 0; - } -LABEL_38: + if ( (signed int)attr > 28 ) { if ( (signed int)attr < 29 ) return v5 + v62 + v61; - if ( (signed int)attr <= 30 ) + if ( (signed int)attr <= CHARACTER_ATTRIBUTE_RANGED_DMG_BONUS ) { if ( HasItemEquipped(EQUIP_BOW) ) - v5 = pItemsTable->pItems[*(int *)&v6->pInventoryItems[v6->pEquipment.uBow-1]].uDamageMod; + v5 = pItemsTable->pItems[v6->pOwnItems[v6->pEquipment.uBow-1].uItemID].uDamageMod; return v5 + v62 + v61; } - if ( attr == 31 ) + if ( attr == CHARACTER_ATTRIBUTE_RANGED_DMG_MIN ) { if ( !HasItemEquipped(EQUIP_BOW) ) return v5 + v62 + v61; - v57 = *(int *)&v6->pInventoryItems[v6->pEquipment.uBow-1]; + v57 = v6->pOwnItems[v6->pEquipment.uBow-1].uItemID; v5 = pItemsTable->pItems[v57].uDamageMod; v56 = pItemsTable->pItems[v57].uDamageDice; - goto LABEL_366; - } - if ( attr == 32 ) + v5 += v56; + return v5 + v62 + v61; + } + if ( attr == CHARACTER_ATTRIBUTE_RANGED_DMG_MAX ) { if ( !HasItemEquipped(EQUIP_BOW) ) return v5 + v62 + v61; - v20 = *(int *)&v6->pInventoryItems[v6->pEquipment.uBow-1]; + v20 = v6->pOwnItems[v6->pEquipment.uBow-1].uItemID; v5 = pItemsTable->pItems[v20].uDamageDice * pItemsTable->pItems[v20].uDamageRoll; LABEL_365: v56 = pItemsTable->pItems[v20].uDamageMod; @@ -5258,7 +5186,7 @@ return v5 + v62 + v61; } } - if ( attr == 28 ) + if ( attr == CHARACTER_ATTRIBUTE_MELEE_DMG_MAX ) { if ( IsUnarmed() != 1 ) { @@ -5269,7 +5197,7 @@ { if ( v22 <= 2 ) { - v23 = this->pInventoryItems[this->pEquipment.uMainHand].uItemID; + v23 = this->pOwnItems[this->pEquipment.uMainHand].uItemID; if ( v6->pEquipment.uShield || pItemsTable->pItems[v23].uSkillType != 4 ) { v24 = v23; @@ -5285,11 +5213,18 @@ } } } - if ( a3 || !v6->HasItemEquipped(EQUIP_OFF_HAND) || (v28 = v6->GetEquippedItemEquipType(EQUIP_OFF_HAND), v28 < 0) || v28 > 2 ) - return v5 + v62 + v61; + + if ( a3 || !v6->HasItemEquipped(EQUIP_OFF_HAND) ) + { + + v28 = v6->GetEquippedItemEquipType(EQUIP_OFF_HAND); + if ((v28 < 0) || v28 > 2 ) + return v5 + v62 + v61; + } v15 = pItemsTable->pItems[v29].uDamageMod; v14 = pItemsTable->pItems[v29].uDamageDice * pItemsTable->pItems[v29].uDamageRoll; - goto LABEL_88; + v5 += v15 + v14; + return v5 + v62 + v61 } v59 = 3; LABEL_74: @@ -5298,11 +5233,18 @@ } if ( (signed int)attr < 0 ) return v5 + v62 + v61; - if ( (signed int)attr <= 23 ) + if ( (signed int)attr <= CHARACTER_ATTRIBUTE_SKILL_UNARMED ) goto LABEL_95; - if ( (signed int)attr <= 24 ) + if ( attr == CHARACTER_ATTRIBUTE_LEVEL ) + { + if ( !Player::HasEnchantedItemEquipped(25) ) + return v5 + v62 + v61; + v5 = 5; + return v5 + v62 + v61; + } + if ( (signed int)attr <= CHARACTER_ATTRIBUTE_LEVEL ) return v5 + v62 + v61; - if ( (signed int)attr <= 26 ) + if ( (signed int)attr <= CHARACTER_ATTRIBUTE_MELEE_DMG_BONUS ) { if ( IsUnarmed() == 1 ) { @@ -5315,15 +5257,17 @@ if ( v17 >= 0 ) { if ( v17 <= 2 ) - v5 = pItemsTable->pItems[*(int *)&v6->pInventoryItems[v6->pEquipment.uMainHand-1]].uDamageMod; + v5 = pItemsTable->pItems[v6->pOwnItems[v6->pEquipment.uMainHand-1].uItemID].uDamageMod; } } 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.uShield - 1]; - goto LABEL_365; - } - if ( attr == 27 ) + v20 = v6->pOwnItems[v6->pEquipment.uShield - 1].uItemID; + v56 = pItemsTable->pItems[v20].uDamageMod; + v5 += v56; + return v5 + v62 + v61; + } + if ( attr == CHARACTER_ATTRIBUTE_MELEE_DMG_MIN ) { if ( IsUnarmed() == 1 ) { @@ -5337,20 +5281,25 @@ { if ( v9 <= 2 ) { - v5 = pItemsTable->pItems[this->pInventoryItems[this->pEquipment.uMainHand].uItemID].uDamageDice + - pItemsTable->pItems[this->pInventoryItems[this->pEquipment.uMainHand].uItemID].uDamageMod; + v5 = pItemsTable->pItems[this->pOwnItems[this->pEquipment.uMainHand].uItemID].uDamageDice + + pItemsTable->pItems[this->pOwnItems[this->pEquipment.uMainHand].uItemID].uDamageMod; if ( !v6->pEquipment.uShield ) { - if ( pItemsTable->pItems[this->pInventoryItems[this->pEquipment.uMainHand].uItemID].uSkillType == 4 ) + if ( pItemsTable->pItems[this->pOwnItems[this->pEquipment.uMainHand].uItemID].uSkillType == 4 ) ++v5; } } } } - 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.uShield].uItemID].uDamageMod; - v15 = pItemsTable->pItems[this->pInventoryItems[this->pEquipment.uShield].uItemID].uDamageDice; + + if ( a3 || !v6->HasItemEquipped(EQUIP_OFF_HAND)) + { + v12 = v6->GetEquippedItemEquipType(EQUIP_OFF_HAND); + if ((v12 < 0) || v12 > 2 ) + return v5 + v62 + v61; + } + v14 = pItemsTable->pItems[this->pOwnItems[this->pEquipment.uShield].uItemID].uDamageMod; + v15 = pItemsTable->pItems[this->pOwnItems[this->pEquipment.uShield].uItemID].uDamageDice; LABEL_88: v5 += v15 + v14; } @@ -5476,8 +5425,7 @@ v2 = 6; if ( CheckHiredNPCSpeciality(Sage) ) v2 += 6; - v8 = (CHARACTER_ATTRIBUTE_TYPE)20; - v2 += GetItemsBonus(v8, 0); + v2 += GetItemsBonus(CHARACTER_ATTRIBUTE_SKILL_MONSTER_ID, 0); } break; @@ -5487,8 +5435,7 @@ v2 = 2; if ( CheckHiredNPCSpeciality(Weaponsmaster) ) v2 += 3; - v8 = (CHARACTER_ATTRIBUTE_TYPE)21; - v2 += GetItemsBonus(v8, 0); + v2 += GetItemsBonus(CHARACTER_ATTRIBUTE_SKILL_ARMSMASTER, 0); } break; @@ -5496,8 +5443,7 @@ { if (CheckHiredNPCSpeciality(Burglar)) v2 = 8; - v8 = (CHARACTER_ATTRIBUTE_TYPE)17; - v2 += GetItemsBonus(v8, 0); + v2 += GetItemsBonus(CHARACTER_ATTRIBUTE_SKILL_STEALING, 0); } break; @@ -5508,8 +5454,7 @@ v2 = 4; if ( CheckHiredNPCSpeciality(Apothecary) ) v2 += 8; - v8 = (CHARACTER_ATTRIBUTE_TYPE)16; - v2 += GetItemsBonus(v8, 0); + v2 += GetItemsBonus(CHARACTER_ATTRIBUTE_SKILL_ALCHEMY, 0); } break; @@ -5521,8 +5466,7 @@ v2 += 15; if ( CheckHiredNPCSpeciality(Scholar) ) v2 += 5; - v8 = (CHARACTER_ATTRIBUTE_TYPE)46; - v2 += GetItemsBonus(v8, 0); + v2 += GetItemsBonus(CHARACTER_ATTRIBUTE_SKILL_LEARNING, 0); } break; @@ -5530,8 +5474,7 @@ { if (CheckHiredNPCSpeciality(Monk) ) v2 = 2; - v8 = (CHARACTER_ATTRIBUTE_TYPE)23; - v2 += GetItemsBonus(v8, 0); + v2 += GetItemsBonus(CHARACTER_ATTRIBUTE_SKILL_UNARMED, 0); } break; @@ -5539,18 +5482,15 @@ { if ( CheckHiredNPCSpeciality(Monk) ) v2 = 2; - v8 = (CHARACTER_ATTRIBUTE_TYPE)22; - v2 += GetItemsBonus(v8, 0); + v2 += GetItemsBonus(CHARACTER_ATTRIBUTE_SKILL_DODGE, 0); } break; case PLAYER_SKILL_BOW: - v8 = (CHARACTER_ATTRIBUTE_TYPE)44; - v2 += GetItemsBonus(v8, 0); + v2 += GetItemsBonus(CHARACTER_ATTRIBUTE_SKILL_BOW, 0); break; case PLAYER_SKILL_SHIELD: - v8 = (CHARACTER_ATTRIBUTE_TYPE)45; - v2 += GetItemsBonus(v8, 0); + v2 += GetItemsBonus(CHARACTER_ATTRIBUTE_SKILL_SHIELD, 0); break; case PLAYER_SKILL_EARTH: @@ -5562,8 +5502,7 @@ v2 += 4; if ( classType == PLAYER_CLASS_WARLOCK && PartyHasDragon() ) v2 += 3; - v8 = (CHARACTER_ATTRIBUTE_TYPE)37; - v2 += GetItemsBonus(v8, 0); + v2 += GetItemsBonus(CHARACTER_ATTRIBUTE_SKILL_EARTH, 0); break; case PLAYER_SKILL_FIRE: if ( CheckHiredNPCSpeciality(Apprentice) ) @@ -5574,8 +5513,7 @@ v2 += 4; if ( classType == PLAYER_CLASS_WARLOCK && PartyHasDragon() ) v2 += 3; - v8 = (CHARACTER_ATTRIBUTE_TYPE)34; - v2 += GetItemsBonus(v8, 0); + v2 += GetItemsBonus(CHARACTER_ATTRIBUTE_SKILL_FIRE, 0); break; case PLAYER_SKILL_AIR: if ( CheckHiredNPCSpeciality(Apprentice) ) @@ -5586,8 +5524,7 @@ v2 += 4; if ( classType == PLAYER_CLASS_WARLOCK && PartyHasDragon() ) v2 += 3; - v8 = (CHARACTER_ATTRIBUTE_TYPE)35; - v2 += GetItemsBonus(v8, 0); + v2 += GetItemsBonus(CHARACTER_ATTRIBUTE_SKILL_AIR, 0); break; case PLAYER_SKILL_WATER: if ( CheckHiredNPCSpeciality(Apprentice) ) @@ -5598,8 +5535,7 @@ v2 += 4; if ( classType == PLAYER_CLASS_WARLOCK && PartyHasDragon() ) v2 += 3; - v8 = (CHARACTER_ATTRIBUTE_TYPE)36; - v2 += GetItemsBonus(v8, 0); + v2 += GetItemsBonus(CHARACTER_ATTRIBUTE_SKILL_WATER, 0); break; case PLAYER_SKILL_SPIRIT: if ( CheckHiredNPCSpeciality(Acolyte2) ) @@ -5608,8 +5544,7 @@ v2 += 3; if ( CheckHiredNPCSpeciality(Prelate) ) v2 += 4; - v8 = (CHARACTER_ATTRIBUTE_TYPE)38; - v2 += GetItemsBonus(v8, 0); + v2 += GetItemsBonus(CHARACTER_ATTRIBUTE_SKILL_SPIRIT, 0); break; case PLAYER_SKILL_MIND: if ( CheckHiredNPCSpeciality(Acolyte2) ) @@ -5618,8 +5553,7 @@ v2 += 3; if ( CheckHiredNPCSpeciality(Prelate) ) v2 += 4; - v8 = (CHARACTER_ATTRIBUTE_TYPE)39; - v2 += GetItemsBonus(v8, 0); + v2 += GetItemsBonus(CHARACTER_ATTRIBUTE_SKILL_MIND, 0); break; case PLAYER_SKILL_BODY: if ( CheckHiredNPCSpeciality(Acolyte2) ) @@ -5628,17 +5562,14 @@ v2 += 3; if ( CheckHiredNPCSpeciality(Prelate) ) v2 += 4; - v8 = (CHARACTER_ATTRIBUTE_TYPE)40; - v2 += GetItemsBonus(v8, 0); + v2 += GetItemsBonus(CHARACTER_ATTRIBUTE_SKILL_BODY, 0); break; case PLAYER_SKILL_LIGHT: - v8 = (CHARACTER_ATTRIBUTE_TYPE)41; - v2 += GetItemsBonus(v8, 0); + v2 += GetItemsBonus(CHARACTER_ATTRIBUTE_SKILL_LIGHT, 0); break; case PLAYER_SKILL_DARK: { - v8 = (CHARACTER_ATTRIBUTE_TYPE)42; - v2 += GetItemsBonus(v8, 0); + v2 += GetItemsBonus(CHARACTER_ATTRIBUTE_SKILL_DARK, 0); } break; @@ -5665,12 +5596,10 @@ break; case PLAYER_SKILL_ITEM_ID: - v8 = (CHARACTER_ATTRIBUTE_TYPE)19; - v2 += GetItemsBonus(v8, 0); + v2 += GetItemsBonus(CHARACTER_ATTRIBUTE_SKILL_ITEM_ID, 0); break; case PLAYER_SKILL_MEDITATION: - v8 = (CHARACTER_ATTRIBUTE_TYPE)43; - v2 += GetItemsBonus(v8, 0); + v2 += GetItemsBonus(CHARACTER_ATTRIBUTE_SKILL_MEDITATION, 0); break; case PLAYER_SKILL_TRAP_DISARM: { @@ -5680,8 +5609,7 @@ v2 += 6; if ( CheckHiredNPCSpeciality(Burglar) ) v2 += 8; - v8 = (CHARACTER_ATTRIBUTE_TYPE)18; - v2 += GetItemsBonus(v8, 0); + v2 += GetItemsBonus(CHARACTER_ATTRIBUTE_SKILL_TRAP_DISARM, 0); } break; } @@ -6526,43 +6454,43 @@ pStep = StatTable[0][v2].uBaseStep; switch ( eAttribute ) { - case CHARACTER_MIGHT: + case CHARACTER_ATTRIBUTE_STRENGTH: if ( this->uMight <= pBaseValue ) pStep = pDroppedStep; if ( this->uMight - pStep >= uMinValue ) this->uMight -= pStep; break; - case CHARACTER_INTELLIGANCE: + case CHARACTER_ATTRIBUTE_INTELLIGENCE: if ( this->uIntelligence <= pBaseValue ) pStep = pDroppedStep; if ( this->uIntelligence - pStep >= uMinValue ) this->uIntelligence -= pStep; break; - case CHARACTER_WILLPOWER: + case CHARACTER_ATTRIBUTE_WILLPOWER: if ( this->uWillpower <= pBaseValue ) pStep = pDroppedStep; if ( this->uWillpower - pStep >= uMinValue ) this->uWillpower -= pStep; break; - case CHARACTER_ENDURANCE: + case CHARACTER_ATTRIBUTE_ENDURANCE: if ( this->uEndurance <= pBaseValue ) pStep = pDroppedStep; if ( this->uEndurance - pStep >= uMinValue ) this->uEndurance -= pStep; break; - case CHARACTER_ACCURACY: + case CHARACTER_ATTRIBUTE_ACCURACY: if ( this->uAccuracy <= pBaseValue ) pStep = pDroppedStep; if ( this->uAccuracy - pStep >= uMinValue ) this->uAccuracy -= pStep; break; - case CHARACTER_SPEED: + case CHARACTER_ATTRIBUTE_SPEED: if ( this->uSpeed <= pBaseValue ) pStep = pDroppedStep; if ( this->uSpeed - pStep >= uMinValue ) this->uSpeed -= pStep; break; - case CHARACTER_LUCK: + case CHARACTER_ATTRIBUTE_LUCK: if ( this->uLuck <= pBaseValue ) pStep = pDroppedStep; if ( this->uLuck - pStep >= uMinValue )
--- a/Player.h Thu May 23 03:32:36 2013 +0200 +++ b/Player.h Thu May 23 08:27:15 2013 +0400 @@ -143,48 +143,61 @@ CHARACTER_RACE_GOBLIN = 2, CHARACTER_RACE_DWARF = 3, }; -enum CHARACTER_ATTRIBUTE -{ - CHARACTER_MIGHT = 0x0, - CHARACTER_INTELLIGANCE = 0x1, - CHARACTER_WILLPOWER = 0x2, - CHARACTER_ENDURANCE = 0x3, - CHARACTER_ACCURACY = 0x4, - CHARACTER_SPEED = 0x5, - CHARACTER_LUCK = 0x6, -}; - - /* 332 */ enum CHARACTER_ATTRIBUTE_TYPE { - CHARACTER_ATTRIBUTE_STRENGTH = 0x0, - CHARACTER_ATTRIBUTE_INTELLIGENCE = 0x1, - CHARACTER_ATTRIBUTE_WILLPOWER = 0x2, - CHARACTER_ATTRIBUTE_ENDURANCE = 0x3, - CHARACTER_ATTRIBUTE_ACCURACY = 0x4, - CHARACTER_ATTRIBUTE_SPEED = 0x5, - CHARACTER_ATTRIBUTE_LUCK = 0x6, - CHARACTER_ATTRIBUTE_HEALTH = 0x7, - CHARACTER_ATTRIBUTE_MANA = 0x8, - CHARACTER_ATTRIBUTE_AC_BONUS = 0x9, - CHARACTER_ATTRIBUTE_RESIST_FIRE = 0xA, - CHARACTER_ATTRIBUTE_RESIST_AIR = 0xB, - CHARACTER_ATTRIBUTE_RESIST_WATER = 0xC, - CHARACTER_ATTRIBUTE_RESIST_EARTH = 0xD, - CHARACTER_ATTRIBUTE_RESIST_MIND = 0xE, - CHARACTER_ATTRIBUTE_RESIST_BODY = 0xF, - CHARACTER_ATTRIBUTE_LEVEL = 0x18, - CHARACTER_ATTRIBUTE_ATTACK = 0x19, - CHARACTER_ATTRIBUTE_MELEE_DMG_BONUS = 0x1A, - CHARACTER_ATTRIBUTE_MELEE_DMG_MIN = 0x1B, - CHARACTER_ATTRIBUTE_MELEE_DMG_MAX = 0x1C, - CHARACTER_ATTRIBUTE_RANGED_ATTACK = 0x1D, - CHARACTER_ATTRIBUTE_RANGED_DAMAGE_BONUS = 0x1E, - CHARACTER_ATTRIBUTE_RANGED_DAMAGE_MIN = 0x1F, - CHARACTER_ATTRIBUTE_RANGED_DAMAGE_MAX = 0x20, - CHARACTER_ATTRIBUTE_RESIST_SPIRIT = 0x21 + CHARACTER_ATTRIBUTE_STRENGTH = 0, + CHARACTER_ATTRIBUTE_INTELLIGENCE = 1, + CHARACTER_ATTRIBUTE_WILLPOWER = 2, + CHARACTER_ATTRIBUTE_ENDURANCE = 3, + CHARACTER_ATTRIBUTE_ACCURACY = 4, + CHARACTER_ATTRIBUTE_SPEED = 5, + CHARACTER_ATTRIBUTE_LUCK = 6, + CHARACTER_ATTRIBUTE_HEALTH = 7, + CHARACTER_ATTRIBUTE_MANA = 8, + CHARACTER_ATTRIBUTE_AC_BONUS = 9, + + CHARACTER_ATTRIBUTE_RESIST_FIRE = 10, + CHARACTER_ATTRIBUTE_RESIST_AIR = 11, + CHARACTER_ATTRIBUTE_RESIST_WATER = 12, + CHARACTER_ATTRIBUTE_RESIST_EARTH = 13, + CHARACTER_ATTRIBUTE_RESIST_MIND = 14, + CHARACTER_ATTRIBUTE_RESIST_BODY = 15, + + CHARACTER_ATTRIBUTE_SKILL_ALCHEMY = 16, + CHARACTER_ATTRIBUTE_SKILL_STEALING = 17, + CHARACTER_ATTRIBUTE_SKILL_TRAP_DISARM = 18, + CHARACTER_ATTRIBUTE_SKILL_ITEM_ID = 19, + CHARACTER_ATTRIBUTE_SKILL_MONSTER_ID = 20, + CHARACTER_ATTRIBUTE_SKILL_ARMSMASTER = 21, + CHARACTER_ATTRIBUTE_SKILL_DODGE = 22, + CHARACTER_ATTRIBUTE_SKILL_UNARMED = 23, + + CHARACTER_ATTRIBUTE_LEVEL = 24, + CHARACTER_ATTRIBUTE_ATTACK = 25, + CHARACTER_ATTRIBUTE_MELEE_DMG_BONUS = 26, + CHARACTER_ATTRIBUTE_MELEE_DMG_MIN = 27, + CHARACTER_ATTRIBUTE_MELEE_DMG_MAX = 28, + CHARACTER_ATTRIBUTE_RANGED_ATTACK = 29, + CHARACTER_ATTRIBUTE_RANGED_DMG_BONUS = 30, + CHARACTER_ATTRIBUTE_RANGED_DMG_MIN = 31, + CHARACTER_ATTRIBUTE_RANGED_DMG_MAX = 32, + CHARACTER_ATTRIBUTE_RESIST_SPIRIT = 33, + + CHARACTER_ATTRIBUTE_SKILL_FIRE = 34, + CHARACTER_ATTRIBUTE_SKILL_AIR = 35, + CHARACTER_ATTRIBUTE_SKILL_WATER = 36, + CHARACTER_ATTRIBUTE_SKILL_EARTH = 37, + CHARACTER_ATTRIBUTE_SKILL_SPIRIT = 38, + CHARACTER_ATTRIBUTE_SKILL_MIND = 39, + CHARACTER_ATTRIBUTE_SKILL_BODY = 40, + CHARACTER_ATTRIBUTE_SKILL_LIGHT = 41, + CHARACTER_ATTRIBUTE_SKILL_DARK = 42, + CHARACTER_ATTRIBUTE_SKILL_MEDITATION = 43, + CHARACTER_ATTRIBUTE_SKILL_BOW = 44, + CHARACTER_ATTRIBUTE_SKILL_SHIELD = 45, + CHARACTER_ATTRIBUTE_SKILL_LEARNING = 46 }; /* 328 */