comparison Player.cpp @ 1040:4430136083a6

CHARACTER_ATTRIBUTE_ GetItemsBonus
author Gloval
date Wed, 22 May 2013 23:52:01 +0400
parents ff2d888f8033
children c5498375832a
comparison
equal deleted inserted replaced
1037:ff2d888f8033 1040:4430136083a6
2913 int v4; // edi@1 2913 int v4; // edi@1
2914 unsigned __int16 v5; // ax@1 2914 unsigned __int16 v5; // ax@1
2915 int result; // eax@6 2915 int result; // eax@6
2916 2916
2917 v1 = this; 2917 v1 = this;
2918 v2 = GetItemsBonus(CHARACTER_ATTRIBUTE_RANGED_DAMAGE_MIN, 0); 2918 v2 = GetItemsBonus(CHARACTER_ATTRIBUTE_RANGED_DMG_MIN, 0);
2919 v3 = GetSkillBonus(CHARACTER_ATTRIBUTE_RANGED_DAMAGE_BONUS) + v2; 2919 v3 = GetSkillBonus(CHARACTER_ATTRIBUTE_RANGED_DMG_BONUS) + v2;
2920 v4 = v1->_ranged_dmg_bonus + GetMagicalBonus(CHARACTER_ATTRIBUTE_RANGED_DAMAGE_BONUS) + v3; 2920 v4 = v1->_ranged_dmg_bonus + GetMagicalBonus(CHARACTER_ATTRIBUTE_RANGED_DMG_BONUS) + v3;
2921 v5 = v1->pActiveSkills[5]; 2921 v5 = v1->pActiveSkills[5];
2922 if ( v5 && (signed int)SkillToMastery(v5) >= 4 && HasItemEquipped(EQUIP_BOW) ) 2922 if ( v5 && (signed int)SkillToMastery(v5) >= 4 && HasItemEquipped(EQUIP_BOW) )
2923 v4 += v1->pActiveSkills[5] & 0x3F; 2923 v4 += v1->pActiveSkills[5] & 0x3F;
2924 if ( v4 >= 1 ) 2924 if ( v4 >= 1 )
2925 result = v4; 2925 result = v4;
2937 int v4; // edi@1 2937 int v4; // edi@1
2938 unsigned __int16 v5; // ax@1 2938 unsigned __int16 v5; // ax@1
2939 int result; // eax@6 2939 int result; // eax@6
2940 2940
2941 v1 = this; 2941 v1 = this;
2942 v2 = GetItemsBonus(CHARACTER_ATTRIBUTE_RANGED_DAMAGE_MAX, 0); 2942 v2 = GetItemsBonus(CHARACTER_ATTRIBUTE_RANGED_DMG_MAX, 0);
2943 v3 = GetSkillBonus(CHARACTER_ATTRIBUTE_RANGED_DAMAGE_BONUS) + v2; 2943 v3 = GetSkillBonus(CHARACTER_ATTRIBUTE_RANGED_DMG_BONUS) + v2;
2944 v4 = v1->_ranged_dmg_bonus + GetMagicalBonus(CHARACTER_ATTRIBUTE_RANGED_DAMAGE_BONUS) + v3; 2944 v4 = v1->_ranged_dmg_bonus + GetMagicalBonus(CHARACTER_ATTRIBUTE_RANGED_DMG_BONUS) + v3;
2945 v5 = v1->pActiveSkills[5]; 2945 v5 = v1->pActiveSkills[5];
2946 if ( v5 && (signed int)SkillToMastery(v5) >= 4 && HasItemEquipped(EQUIP_BOW) ) 2946 if ( v5 && (signed int)SkillToMastery(v5) >= 4 && HasItemEquipped(EQUIP_BOW) )
2947 v4 += v1->pActiveSkills[5] & 0x3F; 2947 v4 += v1->pActiveSkills[5] & 0x3F;
2948 if ( v4 >= 1 ) 2948 if ( v4 >= 1 )
2949 result = v4; 2949 result = v4;
4481 4481
4482 //----- (0048EAAE) -------------------------------------------------------- 4482 //----- (0048EAAE) --------------------------------------------------------
4483 int Player::GetItemsBonus(CHARACTER_ATTRIBUTE_TYPE attr, int a3) 4483 int Player::GetItemsBonus(CHARACTER_ATTRIBUTE_TYPE attr, int a3)
4484 { 4484 {
4485 CHARACTER_ATTRIBUTE_TYPE v3; // esi@1 4485 CHARACTER_ATTRIBUTE_TYPE v3; // esi@1
4486 signed int v4; // eax@1 4486 // signed int v4; // eax@1
4487 int v5; // edi@1 4487 int v5; // edi@1
4488 Player *v6; // ebx@1 4488 Player *v6; // ebx@1
4489 Player *v8; // ecx@48 4489 Player *v8; // ecx@48
4490 int v9; // eax@49 4490 int v9; // eax@49
4491 int v10; // edx@49 4491 int v10; // edx@49
4542 int v61; // [sp+10h] [bp-Ch]@1 4542 int v61; // [sp+10h] [bp-Ch]@1
4543 int v62; // [sp+14h] [bp-8h]@1 4543 int v62; // [sp+14h] [bp-8h]@1
4544 int v63; // [sp+18h] [bp-4h]@101 4544 int v63; // [sp+18h] [bp-4h]@101
4545 ItemGen *attra; // [sp+20h] [bp+4h]@101 4545 ItemGen *attra; // [sp+20h] [bp+4h]@101
4546 unsigned int v65; // [sp+24h] [bp+8h]@95 4546 unsigned int v65; // [sp+24h] [bp+8h]@95
4547 bool no_skills;
4547 4548
4548 v3 = attr; 4549 v3 = attr;
4549 v4 = 36;
4550 v5 = 0; 4550 v5 = 0;
4551 v6 = this; 4551 v6 = this;
4552 v62 = 0; 4552 v62 = 0;
4553 v61 = 0; 4553 v61 = 0;
4554 4554
4555
4556 no_skills=false;
4555 switch (attr) 4557 switch (attr)
4556 { 4558 {
4557 case CHARACTER_ATTRIBUTE_LEVEL: 4559 case CHARACTER_ATTRIBUTE_SKILL_ALCHEMY: v58 = PLAYER_SKILL_ALCHEMY; break;
4558 if (HasEnchantedItemEquipped(25)) 4560 case CHARACTER_ATTRIBUTE_SKILL_STEALING: v58 = PLAYER_SKILL_STEALING; break;
4559 return 5; 4561 case CHARACTER_ATTRIBUTE_SKILL_TRAP_DISARM: v58 = PLAYER_SKILL_TRAP_DISARM; break;
4560 return 0; 4562 case CHARACTER_ATTRIBUTE_SKILL_ITEM_ID: v58 = PLAYER_SKILL_ITEM_ID; break;
4561 }; 4563 case CHARACTER_ATTRIBUTE_SKILL_MONSTER_ID: v58 = PLAYER_SKILL_MONSTER_ID; break;
4562 4564 case CHARACTER_ATTRIBUTE_SKILL_ARMSMASTER: v58 = PLAYER_SKILL_ARMSMASTER; break;
4563 if ( (signed int)attr > 36 ) 4565 case CHARACTER_ATTRIBUTE_SKILL_DODGE: v58 = PLAYER_SKILL_DODGE; break;
4564 { 4566 case CHARACTER_ATTRIBUTE_SKILL_UNARMED: v58 = PLAYER_SKILL_UNARMED; break;
4565 switch ( attr ) 4567 case CHARACTER_ATTRIBUTE_SKILL_FIRE: v58 = PLAYER_SKILL_FIRE; break;
4566 { 4568 case CHARACTER_ATTRIBUTE_SKILL_AIR: v58 = PLAYER_SKILL_AIR; break;
4567 case 37: 4569 case CHARACTER_ATTRIBUTE_SKILL_WATER: v58 = PLAYER_SKILL_WATER; break;
4568 v58 = 15; 4570 case CHARACTER_ATTRIBUTE_SKILL_EARTH: v58 = PLAYER_SKILL_EARTH; break;
4569 goto LABEL_35; 4571 case CHARACTER_ATTRIBUTE_SKILL_SPIRIT: v58 = PLAYER_SKILL_SPIRIT; break;
4570 case 38: 4572 case CHARACTER_ATTRIBUTE_SKILL_MIND: v58 = PLAYER_SKILL_MIND; break;
4571 v58 = 16; 4573 case CHARACTER_ATTRIBUTE_SKILL_BODY: v58 = PLAYER_SKILL_BODY; break;
4572 goto LABEL_35; 4574 case CHARACTER_ATTRIBUTE_SKILL_LIGHT: v58 = PLAYER_SKILL_LIGHT; break;
4573 case 39: 4575 case CHARACTER_ATTRIBUTE_SKILL_DARK: v58 = PLAYER_SKILL_DARK; break;
4574 v58 = 17; 4576 case CHARACTER_ATTRIBUTE_SKILL_MEDITATION: v58 = PLAYER_SKILL_MEDITATION; break;
4575 goto LABEL_35; 4577 case CHARACTER_ATTRIBUTE_SKILL_BOW: v58 = PLAYER_SKILL_BOW; break;
4576 case 40: 4578 case CHARACTER_ATTRIBUTE_SKILL_SHIELD: v58 = PLAYER_SKILL_SHIELD; break;
4577 v58 = 18; 4579 case CHARACTER_ATTRIBUTE_SKILL_LEARNING: v58 = PLAYER_SKILL_LEARNING; break;
4578 goto LABEL_35; 4580 default:
4579 case 41: 4581 no_skills=true;
4580 v58 = 19; 4582 }
4581 goto LABEL_35; 4583 if (!no_skills)
4582 case 42: 4584 {
4583 v58 = 20; 4585 if ( !this->pActiveSkills[v58] )
4584 goto LABEL_35; 4586 return 0;
4585 case 43: 4587 }
4586 v58 = 25; 4588
4587 goto LABEL_35;
4588 case 44:
4589 v58 = 5;
4590 goto LABEL_35;
4591 case 45:
4592 v58 = 8;
4593 goto LABEL_35;
4594 case 46:
4595 goto LABEL_36;
4596 default:
4597 break;
4598 }
4599 }
4600 else
4601 {
4602 if ( attr == 36 )
4603 {
4604 v58 = 14;
4605 }
4606 else
4607 {
4608 if ( (signed int)attr > 21 )
4609 {
4610 switch ( attr )
4611 {
4612 case 22:
4613 v58 = 30;
4614 break;
4615 case 23:
4616 v58 = 31;
4617 break;
4618 case 34:
4619 v58 = 12;
4620 break;
4621 default:
4622 if ( attr != 35 )
4623 goto LABEL_38;
4624 v58 = 13;
4625 break;
4626 }
4627 }
4628 else
4629 {
4630 switch ( attr )
4631 {
4632 case 21:
4633 v58 = 33;
4634 break;
4635 case 16:
4636 v58 = 35;
4637 break;
4638 case 17:
4639 v58 = 34;
4640 break;
4641 case 18:
4642 v58 = 29;
4643 break;
4644 case 19:
4645 v58 = 21;
4646 break;
4647 default:
4648 if ( attr != 20 )
4649 goto LABEL_38;
4650 v58 = 32;
4651 break;
4652 }
4653 }
4654 }
4655 LABEL_35:
4656 v4 = v58;
4657 LABEL_36:
4658 if ( !this->pActiveSkills[v4] )
4659 return 0;
4660 }
4661 LABEL_38:
4662 if ( (signed int)attr > 28 ) 4589 if ( (signed int)attr > 28 )
4663 { 4590 {
4664 if ( (signed int)attr < 29 ) 4591 if ( (signed int)attr < 29 )
4665 return v5 + v62 + v61; 4592 return v5 + v62 + v61;
4666 if ( (signed int)attr <= 30 ) 4593 if ( (signed int)attr <= CHARACTER_ATTRIBUTE_RANGED_DMG_BONUS )
4667 { 4594 {
4668 if ( HasItemEquipped(EQUIP_BOW) ) 4595 if ( HasItemEquipped(EQUIP_BOW) )
4669 v5 = pItemsTable->pItems[*(int *)&v6->pInventoryItems[v6->pEquipment.uBow-1]].uDamageMod; 4596 v5 = pItemsTable->pItems[v6->pOwnItems[v6->pEquipment.uBow-1].uItemID].uDamageMod;
4670 return v5 + v62 + v61; 4597 return v5 + v62 + v61;
4671 } 4598 }
4672 if ( attr == 31 ) 4599 if ( attr == CHARACTER_ATTRIBUTE_RANGED_DMG_MIN )
4673 { 4600 {
4674 if ( !HasItemEquipped(EQUIP_BOW) ) 4601 if ( !HasItemEquipped(EQUIP_BOW) )
4675 return v5 + v62 + v61; 4602 return v5 + v62 + v61;
4676 v57 = *(int *)&v6->pInventoryItems[v6->pEquipment.uBow-1]; 4603 v57 = v6->pOwnItems[v6->pEquipment.uBow-1].uItemID;
4677 v5 = pItemsTable->pItems[v57].uDamageMod; 4604 v5 = pItemsTable->pItems[v57].uDamageMod;
4678 v56 = pItemsTable->pItems[v57].uDamageDice; 4605 v56 = pItemsTable->pItems[v57].uDamageDice;
4679 goto LABEL_366; 4606 v5 += v56;
4680 } 4607 return v5 + v62 + v61;
4681 if ( attr == 32 ) 4608 }
4609 if ( attr == CHARACTER_ATTRIBUTE_RANGED_DMG_MAX )
4682 { 4610 {
4683 if ( !HasItemEquipped(EQUIP_BOW) ) 4611 if ( !HasItemEquipped(EQUIP_BOW) )
4684 return v5 + v62 + v61; 4612 return v5 + v62 + v61;
4685 v20 = *(int *)&v6->pInventoryItems[v6->pEquipment.uBow-1]; 4613 v20 = v6->pOwnItems[v6->pEquipment.uBow-1].uItemID;
4686 v5 = pItemsTable->pItems[v20].uDamageDice * pItemsTable->pItems[v20].uDamageRoll; 4614 v5 = pItemsTable->pItems[v20].uDamageDice * pItemsTable->pItems[v20].uDamageRoll;
4687 LABEL_365: 4615 LABEL_365:
4688 v56 = pItemsTable->pItems[v20].uDamageMod; 4616 v56 = pItemsTable->pItems[v20].uDamageMod;
4689 LABEL_366: 4617 LABEL_366:
4690 v5 += v56; 4618 v5 += v56;
5256 ++v65; 5184 ++v65;
5257 if ( (signed int)v65 >= 16 ) 5185 if ( (signed int)v65 >= 16 )
5258 return v5 + v62 + v61; 5186 return v5 + v62 + v61;
5259 } 5187 }
5260 } 5188 }
5261 if ( attr == 28 ) 5189 if ( attr == CHARACTER_ATTRIBUTE_MELEE_DMG_MAX )
5262 { 5190 {
5263 if ( IsUnarmed() != 1 ) 5191 if ( IsUnarmed() != 1 )
5264 { 5192 {
5265 if ( v6->HasItemEquipped(EQUIP_MAIN_HAND) ) 5193 if ( v6->HasItemEquipped(EQUIP_MAIN_HAND) )
5266 { 5194 {
5267 v22 = this->GetEquippedItemEquipType(EQUIP_MAIN_HAND); 5195 v22 = this->GetEquippedItemEquipType(EQUIP_MAIN_HAND);
5268 if ( v22 >= 0 ) 5196 if ( v22 >= 0 )
5269 { 5197 {
5270 if ( v22 <= 2 ) 5198 if ( v22 <= 2 )
5271 { 5199 {
5272 v23 = this->pInventoryItems[this->pEquipment.uMainHand].uItemID; 5200 v23 = this->pOwnItems[this->pEquipment.uMainHand].uItemID;
5273 if ( v6->pEquipment.uShield || pItemsTable->pItems[v23].uSkillType != 4 ) 5201 if ( v6->pEquipment.uShield || pItemsTable->pItems[v23].uSkillType != 4 )
5274 { 5202 {
5275 v24 = v23; 5203 v24 = v23;
5276 v26 = pItemsTable->pItems[v23].uDamageRoll; 5204 v26 = pItemsTable->pItems[v23].uDamageRoll;
5277 v25 = pItemsTable->pItems[v23].uDamageDice; 5205 v25 = pItemsTable->pItems[v23].uDamageDice;
5283 } 5211 }
5284 v5 = pItemsTable->pItems[v24].uDamageMod + v25 * v26; 5212 v5 = pItemsTable->pItems[v24].uDamageMod + v25 * v26;
5285 } 5213 }
5286 } 5214 }
5287 } 5215 }
5288 if ( a3 || !v6->HasItemEquipped(EQUIP_OFF_HAND) || (v28 = v6->GetEquippedItemEquipType(EQUIP_OFF_HAND), v28 < 0) || v28 > 2 ) 5216
5289 return v5 + v62 + v61; 5217 if ( a3 || !v6->HasItemEquipped(EQUIP_OFF_HAND) )
5218 {
5219
5220 v28 = v6->GetEquippedItemEquipType(EQUIP_OFF_HAND);
5221 if ((v28 < 0) || v28 > 2 )
5222 return v5 + v62 + v61;
5223 }
5290 v15 = pItemsTable->pItems[v29].uDamageMod; 5224 v15 = pItemsTable->pItems[v29].uDamageMod;
5291 v14 = pItemsTable->pItems[v29].uDamageDice * pItemsTable->pItems[v29].uDamageRoll; 5225 v14 = pItemsTable->pItems[v29].uDamageDice * pItemsTable->pItems[v29].uDamageRoll;
5292 goto LABEL_88; 5226 v5 += v15 + v14;
5227 return v5 + v62 + v61
5293 } 5228 }
5294 v59 = 3; 5229 v59 = 3;
5295 LABEL_74: 5230 LABEL_74:
5296 v5 = v59; 5231 v5 = v59;
5297 return v5 + v62 + v61; 5232 return v5 + v62 + v61;
5298 } 5233 }
5299 if ( (signed int)attr < 0 ) 5234 if ( (signed int)attr < 0 )
5300 return v5 + v62 + v61; 5235 return v5 + v62 + v61;
5301 if ( (signed int)attr <= 23 ) 5236 if ( (signed int)attr <= CHARACTER_ATTRIBUTE_SKILL_UNARMED )
5302 goto LABEL_95; 5237 goto LABEL_95;
5303 if ( (signed int)attr <= 24 ) 5238 if ( attr == CHARACTER_ATTRIBUTE_LEVEL )
5239 {
5240 if ( !Player::HasEnchantedItemEquipped(25) )
5241 return v5 + v62 + v61;
5242 v5 = 5;
5243 return v5 + v62 + v61;
5244 }
5245 if ( (signed int)attr <= CHARACTER_ATTRIBUTE_LEVEL )
5304 return v5 + v62 + v61; 5246 return v5 + v62 + v61;
5305 if ( (signed int)attr <= 26 ) 5247 if ( (signed int)attr <= CHARACTER_ATTRIBUTE_MELEE_DMG_BONUS )
5306 { 5248 {
5307 if ( IsUnarmed() == 1 ) 5249 if ( IsUnarmed() == 1 )
5308 { 5250 {
5309 v5 = 0; 5251 v5 = 0;
5310 return v5 + v62 + v61; 5252 return v5 + v62 + v61;
5313 { 5255 {
5314 v17 = this->GetEquippedItemEquipType(EQUIP_MAIN_HAND); 5256 v17 = this->GetEquippedItemEquipType(EQUIP_MAIN_HAND);
5315 if ( v17 >= 0 ) 5257 if ( v17 >= 0 )
5316 { 5258 {
5317 if ( v17 <= 2 ) 5259 if ( v17 <= 2 )
5318 v5 = pItemsTable->pItems[*(int *)&v6->pInventoryItems[v6->pEquipment.uMainHand-1]].uDamageMod; 5260 v5 = pItemsTable->pItems[v6->pOwnItems[v6->pEquipment.uMainHand-1].uItemID].uDamageMod;
5319 } 5261 }
5320 } 5262 }
5321 if ( a3 || !v6->HasItemEquipped(EQUIP_OFF_HAND) || (v19 = v6->GetEquippedItemEquipType(EQUIP_OFF_HAND), v19 < 0) || v19 > 2 ) 5263 if ( a3 || !v6->HasItemEquipped(EQUIP_OFF_HAND) || (v19 = v6->GetEquippedItemEquipType(EQUIP_OFF_HAND), v19 < 0) || v19 > 2 )
5322 return v5 + v62 + v61; 5264 return v5 + v62 + v61;
5323 v20 = *(int *)&v6->pInventoryItems[v6->pEquipment.uShield - 1]; 5265 v20 = v6->pOwnItems[v6->pEquipment.uShield - 1].uItemID;
5324 goto LABEL_365; 5266 v56 = pItemsTable->pItems[v20].uDamageMod;
5325 } 5267 v5 += v56;
5326 if ( attr == 27 ) 5268 return v5 + v62 + v61;
5269 }
5270 if ( attr == CHARACTER_ATTRIBUTE_MELEE_DMG_MIN )
5327 { 5271 {
5328 if ( IsUnarmed() == 1 ) 5272 if ( IsUnarmed() == 1 )
5329 { 5273 {
5330 v5 = 1; 5274 v5 = 1;
5331 return v5 + v62 + v61; 5275 return v5 + v62 + v61;
5335 v9 = this->GetEquippedItemEquipType(EQUIP_MAIN_HAND); 5279 v9 = this->GetEquippedItemEquipType(EQUIP_MAIN_HAND);
5336 if ( v9 >= 0 ) 5280 if ( v9 >= 0 )
5337 { 5281 {
5338 if ( v9 <= 2 ) 5282 if ( v9 <= 2 )
5339 { 5283 {
5340 v5 = pItemsTable->pItems[this->pInventoryItems[this->pEquipment.uMainHand].uItemID].uDamageDice + 5284 v5 = pItemsTable->pItems[this->pOwnItems[this->pEquipment.uMainHand].uItemID].uDamageDice +
5341 pItemsTable->pItems[this->pInventoryItems[this->pEquipment.uMainHand].uItemID].uDamageMod; 5285 pItemsTable->pItems[this->pOwnItems[this->pEquipment.uMainHand].uItemID].uDamageMod;
5342 if ( !v6->pEquipment.uShield ) 5286 if ( !v6->pEquipment.uShield )
5343 { 5287 {
5344 if ( pItemsTable->pItems[this->pInventoryItems[this->pEquipment.uMainHand].uItemID].uSkillType == 4 ) 5288 if ( pItemsTable->pItems[this->pOwnItems[this->pEquipment.uMainHand].uItemID].uSkillType == 4 )
5345 ++v5; 5289 ++v5;
5346 } 5290 }
5347 } 5291 }
5348 } 5292 }
5349 } 5293 }
5350 if ( a3 || !v6->HasItemEquipped(EQUIP_OFF_HAND) || (v12 = v6->GetEquippedItemEquipType(EQUIP_OFF_HAND), v12 < 0) || v12 > 2 ) 5294
5351 return v5 + v62 + v61; 5295 if ( a3 || !v6->HasItemEquipped(EQUIP_OFF_HAND))
5352 v14 = pItemsTable->pItems[this->pInventoryItems[this->pEquipment.uShield].uItemID].uDamageMod; 5296 {
5353 v15 = pItemsTable->pItems[this->pInventoryItems[this->pEquipment.uShield].uItemID].uDamageDice; 5297 v12 = v6->GetEquippedItemEquipType(EQUIP_OFF_HAND);
5298 if ((v12 < 0) || v12 > 2 )
5299 return v5 + v62 + v61;
5300 }
5301 v14 = pItemsTable->pItems[this->pOwnItems[this->pEquipment.uShield].uItemID].uDamageMod;
5302 v15 = pItemsTable->pItems[this->pOwnItems[this->pEquipment.uShield].uItemID].uDamageDice;
5354 LABEL_88: 5303 LABEL_88:
5355 v5 += v15 + v14; 5304 v5 += v15 + v14;
5356 } 5305 }
5357 return v5 + v62 + v61; 5306 return v5 + v62 + v61;
5358 } 5307 }
6524 pDroppedStep = StatTable[0][v2].uDroppedStep; 6473 pDroppedStep = StatTable[0][v2].uDroppedStep;
6525 uMinValue = pBaseValue - 2; 6474 uMinValue = pBaseValue - 2;
6526 pStep = StatTable[0][v2].uBaseStep; 6475 pStep = StatTable[0][v2].uBaseStep;
6527 switch ( eAttribute ) 6476 switch ( eAttribute )
6528 { 6477 {
6529 case CHARACTER_MIGHT: 6478 case CHARACTER_ATTRIBUTE_STRENGTH:
6530 if ( this->uMight <= pBaseValue ) 6479 if ( this->uMight <= pBaseValue )
6531 pStep = pDroppedStep; 6480 pStep = pDroppedStep;
6532 if ( this->uMight - pStep >= uMinValue ) 6481 if ( this->uMight - pStep >= uMinValue )
6533 this->uMight -= pStep; 6482 this->uMight -= pStep;
6534 break; 6483 break;
6535 case CHARACTER_INTELLIGANCE: 6484 case CHARACTER_ATTRIBUTE_INTELLIGENCE:
6536 if ( this->uIntelligence <= pBaseValue ) 6485 if ( this->uIntelligence <= pBaseValue )
6537 pStep = pDroppedStep; 6486 pStep = pDroppedStep;
6538 if ( this->uIntelligence - pStep >= uMinValue ) 6487 if ( this->uIntelligence - pStep >= uMinValue )
6539 this->uIntelligence -= pStep; 6488 this->uIntelligence -= pStep;
6540 break; 6489 break;
6541 case CHARACTER_WILLPOWER: 6490 case CHARACTER_ATTRIBUTE_WILLPOWER:
6542 if ( this->uWillpower <= pBaseValue ) 6491 if ( this->uWillpower <= pBaseValue )
6543 pStep = pDroppedStep; 6492 pStep = pDroppedStep;
6544 if ( this->uWillpower - pStep >= uMinValue ) 6493 if ( this->uWillpower - pStep >= uMinValue )
6545 this->uWillpower -= pStep; 6494 this->uWillpower -= pStep;
6546 break; 6495 break;
6547 case CHARACTER_ENDURANCE: 6496 case CHARACTER_ATTRIBUTE_ENDURANCE:
6548 if ( this->uEndurance <= pBaseValue ) 6497 if ( this->uEndurance <= pBaseValue )
6549 pStep = pDroppedStep; 6498 pStep = pDroppedStep;
6550 if ( this->uEndurance - pStep >= uMinValue ) 6499 if ( this->uEndurance - pStep >= uMinValue )
6551 this->uEndurance -= pStep; 6500 this->uEndurance -= pStep;
6552 break; 6501 break;
6553 case CHARACTER_ACCURACY: 6502 case CHARACTER_ATTRIBUTE_ACCURACY:
6554 if ( this->uAccuracy <= pBaseValue ) 6503 if ( this->uAccuracy <= pBaseValue )
6555 pStep = pDroppedStep; 6504 pStep = pDroppedStep;
6556 if ( this->uAccuracy - pStep >= uMinValue ) 6505 if ( this->uAccuracy - pStep >= uMinValue )
6557 this->uAccuracy -= pStep; 6506 this->uAccuracy -= pStep;
6558 break; 6507 break;
6559 case CHARACTER_SPEED: 6508 case CHARACTER_ATTRIBUTE_SPEED:
6560 if ( this->uSpeed <= pBaseValue ) 6509 if ( this->uSpeed <= pBaseValue )
6561 pStep = pDroppedStep; 6510 pStep = pDroppedStep;
6562 if ( this->uSpeed - pStep >= uMinValue ) 6511 if ( this->uSpeed - pStep >= uMinValue )
6563 this->uSpeed -= pStep; 6512 this->uSpeed -= pStep;
6564 break; 6513 break;
6565 case CHARACTER_LUCK: 6514 case CHARACTER_ATTRIBUTE_LUCK:
6566 if ( this->uLuck <= pBaseValue ) 6515 if ( this->uLuck <= pBaseValue )
6567 pStep = pDroppedStep; 6516 pStep = pDroppedStep;
6568 if ( this->uLuck - pStep >= uMinValue ) 6517 if ( this->uLuck - pStep >= uMinValue )
6569 this->uLuck -= pStep; 6518 this->uLuck -= pStep;
6570 break; 6519 break;