comparison Player.cpp @ 1533:a2e1174c428b

Player::GetSkillBonus fixing indentation
author Grumpy7
date Fri, 06 Sep 2013 03:36:08 +0200
parents a109bb203e28
children d4bc1cb9d953
comparison
equal deleted inserted replaced
1526:f47eab1a70d8 1533:a2e1174c428b
4804 } 4804 }
4805 4805
4806 //----- (0048FC00) -------------------------------------------------------- 4806 //----- (0048FC00) --------------------------------------------------------
4807 int Player::GetSkillBonus(enum CHARACTER_ATTRIBUTE_TYPE a2) 4807 int Player::GetSkillBonus(enum CHARACTER_ATTRIBUTE_TYPE a2)
4808 { 4808 {
4809
4810
4811
4812 Player *v2; // esi@1 4809 Player *v2; // esi@1
4813 int armmaster_skill; // eax@1 4810 int armmaster_skill; // eax@1
4814 char v4; // di@1 4811 char v4; // di@1
4815 signed int v5; // ebx@1 4812 signed int v5; // ebx@1
4816 unsigned int armaster_mastery; // eax@2 4813 unsigned int armaster_mastery; // eax@2
4898 { 4895 {
4899 armaster_mastery = SkillToMastery(armmaster_skill); 4896 armaster_mastery = SkillToMastery(armmaster_skill);
4900 if ( a2 == CHARACTER_ATTRIBUTE_MELEE_DMG_BONUS ) 4897 if ( a2 == CHARACTER_ATTRIBUTE_MELEE_DMG_BONUS )
4901 { 4898 {
4902 if ( armaster_mastery == 4 ) 4899 if ( armaster_mastery == 4 )
4903 multiplier =2; 4900 multiplier =2;
4904 else if ( armaster_mastery == 3 ) 4901 else if ( armaster_mastery == 3 )
4905 multiplier =1; 4902 multiplier =1;
4906 } 4903 }
4907 else if ( a2 == CHARACTER_ATTRIBUTE_ATTACK ) 4904 else if ( a2 == CHARACTER_ATTRIBUTE_ATTACK )
4908 { 4905 {
4909 if ( armaster_mastery == 4 ) 4906 if ( armaster_mastery == 4 )
4910 multiplier =2; 4907 multiplier =2;
4911 else if ( armaster_mastery >= 2 ) 4908 else if ( armaster_mastery >= 2 )
4912 multiplier =1; 4909 multiplier =1;
4913 } 4910 }
4914 arm_bonus=(armmaster_skill&0x3F)*multiplier; 4911 arm_bonus=(armmaster_skill&0x3F)*multiplier;
4915 } 4912 }
4916 4913
4917
4918 if ( a2 == CHARACTER_ATTRIBUTE_HEALTH ) 4914 if ( a2 == CHARACTER_ATTRIBUTE_HEALTH )
4919 { 4915 {
4920 base_value = pBaseHealthPerLevelByClass[classType]; 4916 base_value = pBaseHealthPerLevelByClass[classType];
4921 attrib_modif = GetBodybuilding(); 4917 attrib_modif = GetBodybuilding();
4922 return base_value * attrib_modif; 4918 return base_value * attrib_modif;
4926 base_value = pBaseManaPerLevelByClass[classType]; 4922 base_value = pBaseManaPerLevelByClass[classType];
4927 attrib_modif = GetMeditation(); 4923 attrib_modif = GetMeditation();
4928 return base_value * attrib_modif; 4924 return base_value * attrib_modif;
4929 } 4925 }
4930 if ( a2 == CHARACTER_ATTRIBUTE_AC_BONUS ) 4926 if ( a2 == CHARACTER_ATTRIBUTE_AC_BONUS )
4931 { 4927 {
4932 a1b = 0; 4928 a1b = 0;
4933 v71 = (ITEM_EQUIP_TYPE)0; 4929 v71 = (ITEM_EQUIP_TYPE)0;
4934 4930
4935 for (j=0; j<16; ++j) 4931 for (j=0; j<16; ++j)
4936 { 4932 {
4937 if (pEquipment.pIndices[j]&&(!pOwnItems[ pEquipment.pIndices[j]].Broken())) 4933 if (pEquipment.pIndices[j]&&(!pOwnItems[ pEquipment.pIndices[j]].Broken()))
4938 { 4934 {
4939 int curr_item =pOwnItems[pEquipment.pIndices[j]].uItemID; 4935 int curr_item =pOwnItems[pEquipment.pIndices[j]].uItemID;
4940 v44=pItemsTable->pItems[curr_item].uSkillType; 4936 v44=pItemsTable->pItems[curr_item].uSkillType;
4941 switch (v44) 4937 switch (v44)
4942 { 4938 {
4943 4939 case PLAYER_SKILL_STAFF:
4944 case PLAYER_SKILL_STAFF: 4940
4945 4941 lvl_avl[0]=0;
4946 lvl_avl[0]=0; 4942 lvl_avl[1]=1;
4947 lvl_avl[1]=1; 4943 lvl_avl[2]=0;
4948 lvl_avl[2]=0; 4944 lvl_avl[3]=0;
4949 lvl_avl[3]=0; 4945 break;
4950 break; 4946 case PLAYER_SKILL_SWORD:
4951 case PLAYER_SKILL_SWORD: 4947 case PLAYER_SKILL_SPEAR:
4952 case PLAYER_SKILL_SPEAR: 4948 lvl_avl[0]=0;
4953 lvl_avl[0]=0; 4949 lvl_avl[1]=0;
4954 lvl_avl[1]=0; 4950 lvl_avl[2]=0;
4955 lvl_avl[2]=0; 4951 lvl_avl[3]=1;
4956 lvl_avl[3]=1; 4952 break;
4957 break; 4953 case PLAYER_SKILL_SHIELD:
4958 case PLAYER_SKILL_SHIELD: 4954 a1b = 1;
4959 a1b = 1; 4955 lvl_avl[0]=1;
4960 lvl_avl[0]=1; 4956 lvl_avl[1]=0;
4961 lvl_avl[1]=0; 4957 lvl_avl[2]=1;
4962 lvl_avl[2]=1; 4958 lvl_avl[3]=0;
4963 lvl_avl[3]=0; 4959 break;
4964 break; 4960 case PLAYER_SKILL_LEATHER:
4965 case PLAYER_SKILL_LEATHER: 4961 v71 = (ITEM_EQUIP_TYPE)1;
4966 v71 = (ITEM_EQUIP_TYPE)1; 4962 lvl_avl[0]=1;
4967 lvl_avl[0]=1; 4963 lvl_avl[1]=0;
4968 lvl_avl[1]=0; 4964 lvl_avl[2]=1;
4969 lvl_avl[2]=1; 4965 lvl_avl[3]=0;
4970 lvl_avl[3]=0; 4966
4971 4967 break;
4972 break; 4968 case PLAYER_SKILL_CHAIN:
4973 case PLAYER_SKILL_CHAIN: 4969 a1b = 1;
4974 a1b = 1; 4970 lvl_avl[0]=1;
4975 lvl_avl[0]=1; 4971 lvl_avl[1]=0;
4976 lvl_avl[1]=0; 4972 lvl_avl[2]=0;
4977 lvl_avl[2]=0; 4973 lvl_avl[3]=0;
4978 lvl_avl[3]=0; 4974 break;
4979 break; 4975 case PLAYER_SKILL_PLATE:
4980 case PLAYER_SKILL_PLATE: 4976 a1b = 1;
4981 a1b = 1; 4977 lvl_avl[0]=1;
4982 lvl_avl[0]=1; 4978 lvl_avl[1]=0;
4983 lvl_avl[1]=0; 4979 lvl_avl[2]=0;
4984 lvl_avl[2]=0; 4980 lvl_avl[3]=0;
4985 lvl_avl[3]=0; 4981 break;
4986 break; 4982 default:
4987 default: 4983 continue;
4988 continue; 4984 }
4989 } 4985
4990 4986 v50= GetActualSkillLevel((PLAYER_SKILL_TYPE)v44);
4991 v50= GetActualSkillLevel((PLAYER_SKILL_TYPE)v44); 4987 v51 = v50;
4992 v51 = v50; 4988 v52 = SkillToMastery(v50);
4993 v52 = SkillToMastery(v50); 4989 v53 = v51 & 0x3F;
4994 v53 = v51 & 0x3F; 4990 for ( i = 0; i < (signed int)v52; ++i )
4995 for ( i = 0; i < (signed int)v52; ++i ) 4991 {
4996 { 4992 if ( lvl_avl[i] )
4997 if ( lvl_avl[i] ) 4993 skill_bonus += v53;
4998 skill_bonus += v53; 4994 }
4999 } 4995 }
5000 4996 }
5001 } 4997
5002 } 4998 lvl_avl[0]=1;
5003 4999 lvl_avl[1]=1;
5004 lvl_avl[0]=1; 5000 lvl_avl[2]=1;
5005 lvl_avl[1]=1; 5001 lvl_avl[3]=0;
5006 lvl_avl[2]=1; 5002
5007 lvl_avl[3]=0; 5003 v55 = GetActualSkillLevel(PLAYER_SKILL_DODGE);
5008 5004 v56 = v55;
5009 v55 = GetActualSkillLevel(PLAYER_SKILL_DODGE); 5005 v57 = SkillToMastery(v55);
5010 v56 = v55; 5006 if ( !a1b && (!v71 || v57 == 4) )
5011 v57 = SkillToMastery(v55); 5007 {
5012 if ( !a1b && (!v71 || v57 == 4) ) 5008 v58 = v56 & 0x3F;
5013 { 5009 for ( j = 0; j < (signed int)v57; ++j )
5014 v58 = v56 & 0x3F; 5010 {
5015 for ( j = 0; j < (signed int)v57; ++j ) 5011 if ( lvl_avl[j] )
5016 { 5012 skill_bonus += v58;
5017 if ( lvl_avl[j] ) 5013 }
5018 skill_bonus += v58; 5014 }
5019 } 5015 return skill_bonus;
5020 } 5016 }
5021 return skill_bonus; 5017
5022 5018 if (a2 == CHARACTER_ATTRIBUTE_ATTACK)
5023 5019 {
5024 } 5020 if ( v2->IsUnarmed() == 1 )
5025 5021 {
5026 if (a2 == CHARACTER_ATTRIBUTE_ATTACK)
5027 {
5028
5029 if ( v2->IsUnarmed() == 1 )
5030 {
5031 v33 = v2->GetActualSkillLevel(PLAYER_SKILL_UNARMED); 5022 v33 = v2->GetActualSkillLevel(PLAYER_SKILL_UNARMED);
5032 v34 = v33; 5023 v34 = v33;
5033 if ( !v33 ) 5024 if ( !v33 )
5034 return skill_bonus; 5025 return skill_bonus;
5035 if ( SkillToMastery(v33) >= 3 ) 5026 if ( SkillToMastery(v33) >= 3 )
5036 multiplier = 2; 5027 multiplier = 2;
5037 else 5028 else
5038 multiplier=1; 5029 multiplier=1;
5039 v30 = multiplier * (v34 & 0x3F); 5030 v30 = multiplier * (v34 & 0x3F);
5040 return arm_bonus + v30; 5031 return arm_bonus + v30;
5041 } 5032 }
5042 v35 = (ITEM_EQUIP_TYPE)0; 5033 v35 = (ITEM_EQUIP_TYPE)0;
5043 v68 = 0; 5034 v68 = 0;
5044 for (i=0; i<16 ; ++i) 5035 for (i=0; i<16 ; ++i)
5045 { 5036 {
5046 if ( v2->HasItemEquipped((ITEM_EQUIP_TYPE)i) ) 5037 if ( v2->HasItemEquipped((ITEM_EQUIP_TYPE)i) )
5047 { 5038 {
5048 v37 = v2->pEquipment.pIndices[i]-1; 5039 v37 = v2->pEquipment.pIndices[i]-1;
5049 if ( pItemsTable->pItems[v37].uEquipType <= EQUIP_MAIN_HAND) 5040 if ( pItemsTable->pItems[v37].uEquipType <= EQUIP_MAIN_HAND)
5050 break; 5041 break;
5051 } 5042 }
5052 } 5043 }
5053 if ( i >= 16 ) 5044 if ( i >= 16 )
5054 return skill_bonus; 5045 return skill_bonus;
5055 5046
5056 v38 = (PLAYER_SKILL_TYPE)pItemsTable->pItems[v37].uSkillType; 5047 v38 = (PLAYER_SKILL_TYPE)pItemsTable->pItems[v37].uSkillType;
5057 a1a = v2->GetActualSkillLevel(v38); 5048 a1a = v2->GetActualSkillLevel(v38);
5058 v39= SkillToMastery(a1a); 5049 v39= SkillToMastery(a1a);
5059 v71 = (ITEM_EQUIP_TYPE)0; 5050 v71 = (ITEM_EQUIP_TYPE)0;
5060 switch (v38) 5051 switch (v38)
5061 { 5052 {
5062 case PLAYER_SKILL_STAFF: 5053 case PLAYER_SKILL_STAFF:
5063 v71 = (ITEM_EQUIP_TYPE)1; 5054 v71 = (ITEM_EQUIP_TYPE)1;
5064 if ( v39 == 4 ) 5055 if ( v39 == 4 )
5065 { 5056 {
5066 v40 = v2->GetActualSkillLevel(PLAYER_SKILL_UNARMED); 5057 v40 = v2->GetActualSkillLevel(PLAYER_SKILL_UNARMED);
5067 v41 = v40; 5058 v41 = v40;
5068 5059
5069 if ( v40 ) 5060 if ( v40 )
5070 { 5061 {
5071 if ( SkillToMastery(v40) >= 3 ) 5062 if ( SkillToMastery(v40) >= 3 )
5072 multiplier = 2; 5063 multiplier = 2;
5073 else 5064 else
5074 multiplier=1; 5065 multiplier=1;
5075 v68 = multiplier * (v41 & 0x3F); 5066 v68 = multiplier * (v41 & 0x3F);
5076 } 5067 }
5077 } 5068 }
5078 break; 5069 break;
5079 case PLAYER_SKILL_SWORD: 5070 case PLAYER_SKILL_SWORD:
5080 case PLAYER_SKILL_DAGGER: 5071 case PLAYER_SKILL_DAGGER:
5081 case PLAYER_SKILL_AXE: 5072 case PLAYER_SKILL_AXE:
5082 case PLAYER_SKILL_SPEAR: 5073 case PLAYER_SKILL_SPEAR:
5083 case PLAYER_SKILL_MACE: 5074 case PLAYER_SKILL_MACE:
5084 v71 = (ITEM_EQUIP_TYPE)1; 5075 v71 = (ITEM_EQUIP_TYPE)1;
5085 break; 5076 break;
5086 case PLAYER_SKILL_BLASTER: 5077 case PLAYER_SKILL_BLASTER:
5087 5078
5088 switch (v39) 5079 switch (v39)
5089 { 5080 {
5090 case 0: multiplier=1; break; 5081 case 0: multiplier=1; break;
5091 case 1: multiplier=3; break; 5082 case 1: multiplier=3; break;
5092 case 3: multiplier=3; break; 5083 case 3: multiplier=3; break;
5093 case 4: multiplier=5; break; 5084 case 4: multiplier=5; break;
5094 } 5085 }
5095 v5 = multiplier; 5086 v5 = multiplier;
5096 return v5 * (a1a & 0x3F); 5087 return v5 * (a1a & 0x3F);
5097 break; 5088 break;
5098 } 5089 }
5099 5090
5100 5091 v30 = v68 + v71 * (a1a & 0x3F);
5101 5092 return (int)((char *)v69 + v30);
5102 v30 = v68 + v71 * (a1a & 0x3F); 5093 }
5103 return (int)((char *)v69 + v30); 5094
5104 5095
5105 } 5096 if ( a2 != 9 )
5106 5097 {
5107 5098 if ( a2 <= CHARACTER_ATTRIBUTE_ATTACK )
5108 if ( a2 != 9 ) 5099 return skill_bonus;
5109 { 5100 if ( a2 > CHARACTER_ATTRIBUTE_MELEE_DMG_MAX )
5110 5101 {
5111 if ( a2 <= CHARACTER_ATTRIBUTE_ATTACK ) 5102 if ( a2 != CHARACTER_ATTRIBUTE_RANGED_ATTACK )
5112 return skill_bonus; 5103 return skill_bonus;
5113 if ( a2 > CHARACTER_ATTRIBUTE_MELEE_DMG_MAX ) 5104 v71 = (ITEM_EQUIP_TYPE)0;
5114 { 5105 v9 = &v2->pEquipment;
5115 if ( a2 != CHARACTER_ATTRIBUTE_RANGED_ATTACK ) 5106 while ( 1 )
5107 {
5108 if ( v2->HasItemEquipped(v71) )
5109 {
5110 v11 = (PLAYER_SKILL_TYPE)pItemsTable->pItems[v2->pInventoryItemList[*(_DWORD *)v9].uItemID].uEquipType;
5111 LOBYTE(v12) = this->GetActualSkillLevel(v11);
5112 a1 = v12;
5113 SkillToMastery(v12);
5114 v13 = v11 - 5;
5115 if ( !v13 )
5116 return a1 & 0x3F;
5117 if ( v13 == 2 )
5118 break;
5119 }
5120 v71 = (ITEM_EQUIP_TYPE)((int)v71 + 1);
5121 v9 = (PlayerEquipment *)((char *)v9 + 4);
5122 if ( (signed int)v71 >= 16 )
5116 return skill_bonus; 5123 return skill_bonus;
5117 v71 = (ITEM_EQUIP_TYPE)0; 5124 }
5118 v9 = &v2->pEquipment; 5125 v14 = a1;
5119 while ( 1 ) 5126 v15 = 1;
5127 if ( (signed int)SkillToMastery(a1) >= 4 )
5128 {
5129 v62 = 5;
5130 goto LABEL_31;
5131 }
5132 if ( (signed int)SkillToMastery(a1) >= 3 )
5133 {
5134 v62 = 3;
5135 goto LABEL_31;
5136 }
5137 if ( (signed int)SkillToMastery(a1) < 2 )
5138 goto LABEL_32;
5139 goto LABEL_30;
5140 }
5141 if ( v2->IsUnarmed() )
5142 {
5143 LOBYTE(v18) = v2->GetActualSkillLevel(PLAYER_SKILL_UNARMED);
5144 v14 = v18;
5145 if ( !v18 )
5146 return skill_bonus;
5147 v15 = 0;
5148 v19 = SkillToMastery(v18);
5149 if ( (signed int)v19 < 3 )
5150 {
5151 if ( (signed int)v19 >= 2 )
5152 v15 = 1;
5153 LABEL_32:
5154 v16 = v14;
5155 return v15 * (v16 & 0x3F);
5156 }
5157 LABEL_30:
5158 v62 = 2;
5159 LABEL_31:
5160 v15 = v62;
5161 goto LABEL_32;
5162 }
5163 v20 = (ITEM_EQUIP_TYPE)0;
5164 while ( 1 )
5165 {
5166 if ( v2->HasItemEquipped(v20) )
5167 {
5168 v22 = this->pInventoryItemList[this->pEquipment.pIndices[v20]].uItemID;
5169 if ( pItemsTable->pItems[v22].uEquipType <= 1u )
5170 break;
5171 }
5172 v20 = (ITEM_EQUIP_TYPE)((int)v20 + 1);
5173 if ( (signed int)v20 >= 16 )
5174 return skill_bonus;
5175 }
5176 v71 = (ITEM_EQUIP_TYPE)0;
5177 v23 = (PLAYER_SKILL_TYPE)pItemsTable->pItems[v22].uSkillType;
5178 LOBYTE(v24) = v2->GetActualSkillLevel(v23);
5179 v25 = v24;
5180 v26 = SkillToMastery(v24);
5181 if ( !v23 )
5182 {
5183 if ( (signed int)SkillToMastery(v25) >= 4 )
5184 {
5185 LOBYTE(v31) = v2->GetActualSkillLevel(PLAYER_SKILL_UNARMED);
5186 LOBYTE(v25) = v31;
5187 if ( v31 )
5120 { 5188 {
5121 if ( v2->HasItemEquipped(v71) ) 5189 v15 = 0;
5190 v32 = SkillToMastery(v31);
5191 if ( (signed int)v32 < 3 )
5122 { 5192 {
5123 v11 = (PLAYER_SKILL_TYPE)pItemsTable->pItems[v2->pInventoryItemList[*(_DWORD *)v9].uItemID].uEquipType; 5193 if ( (signed int)v32 >= 2 )
5124 LOBYTE(v12) = this->GetActualSkillLevel(v11); 5194 v15 = 1;
5125 a1 = v12;
5126 SkillToMastery(v12);
5127 v13 = v11 - 5;
5128 if ( !v13 )
5129 return a1 & 0x3F;
5130 if ( v13 == 2 )
5131 break;
5132 } 5195 }
5133 v71 = (ITEM_EQUIP_TYPE)((int)v71 + 1); 5196 else
5134 v9 = (PlayerEquipment *)((char *)v9 + 4); 5197 {
5135 if ( (signed int)v71 >= 16 ) 5198 v15 = 2;
5136 return skill_bonus; 5199 }
5137 } 5200 v16 = v25;
5138 v14 = a1;
5139 v15 = 1;
5140 if ( (signed int)SkillToMastery(a1) >= 4 )
5141 {
5142 v62 = 5;
5143 goto LABEL_31;
5144 }
5145 if ( (signed int)SkillToMastery(a1) >= 3 )
5146 {
5147 v62 = 3;
5148 goto LABEL_31;
5149 }
5150 if ( (signed int)SkillToMastery(a1) < 2 )
5151 goto LABEL_32;
5152 goto LABEL_30;
5153 }
5154 if ( v2->IsUnarmed() )
5155 {
5156 LOBYTE(v18) = v2->GetActualSkillLevel(PLAYER_SKILL_UNARMED);
5157 v14 = v18;
5158 if ( !v18 )
5159 return skill_bonus;
5160 v15 = 0;
5161 v19 = SkillToMastery(v18);
5162 if ( (signed int)v19 < 3 )
5163 {
5164 if ( (signed int)v19 >= 2 )
5165 v15 = 1;
5166 LABEL_32:
5167 v16 = v14;
5168 return v15 * (v16 & 0x3F); 5201 return v15 * (v16 & 0x3F);
5169 } 5202 }
5170 LABEL_30: 5203 }
5171 v62 = 2; 5204 goto LABEL_55;
5172 LABEL_31: 5205 }
5173 v15 = v62; 5206 if ( v23 == PLAYER_SKILL_DAGGER )
5174 goto LABEL_32; 5207 {
5175 } 5208 v29 = SkillToMastery(v25);
5176 v20 = (ITEM_EQUIP_TYPE)0; 5209 v28 = __OFSUB__(v29, 4);
5177 while ( 1 ) 5210 v27 = ((v29 - 4) & 0x80000000u) != 0;
5178 { 5211 }
5179 if ( v2->HasItemEquipped(v20) ) 5212 else
5213 {
5214 if ( v23 <= PLAYER_SKILL_DAGGER )
5215 goto LABEL_55;
5216 if ( v23 > PLAYER_SKILL_SPEAR )
5217 {
5218 if ( v23 == PLAYER_SKILL_MACE )
5180 { 5219 {
5181 v22 = this->pInventoryItemList[this->pEquipment.pIndices[v20]].uItemID; 5220 v28 = __OFSUB__(v26, 2);
5182 if ( pItemsTable->pItems[v22].uEquipType <= 1u ) 5221 v27 = v26 - 2 < 0;
5183 break; 5222 goto LABEL_53;
5184 } 5223 }
5185 v20 = (ITEM_EQUIP_TYPE)((int)v20 + 1);
5186 if ( (signed int)v20 >= 16 )
5187 return skill_bonus;
5188 }
5189 v71 = (ITEM_EQUIP_TYPE)0;
5190 v23 = (PLAYER_SKILL_TYPE)pItemsTable->pItems[v22].uSkillType;
5191 LOBYTE(v24) = v2->GetActualSkillLevel(v23);
5192 v25 = v24;
5193 v26 = SkillToMastery(v24);
5194 if ( !v23 )
5195 {
5196 if ( (signed int)SkillToMastery(v25) >= 4 )
5197 {
5198 LOBYTE(v31) = v2->GetActualSkillLevel(PLAYER_SKILL_UNARMED);
5199 LOBYTE(v25) = v31;
5200 if ( v31 )
5201 {
5202 v15 = 0;
5203 v32 = SkillToMastery(v31);
5204 if ( (signed int)v32 < 3 )
5205 {
5206 if ( (signed int)v32 >= 2 )
5207 v15 = 1;
5208 }
5209 else
5210 {
5211 v15 = 2;
5212 }
5213 v16 = v25;
5214 return v15 * (v16 & 0x3F);
5215 }
5216 }
5217 goto LABEL_55;
5218 }
5219 if ( v23 == PLAYER_SKILL_DAGGER )
5220 {
5221 v29 = SkillToMastery(v25);
5222 v28 = __OFSUB__(v29, 4);
5223 v27 = ((v29 - 4) & 0x80000000u) != 0;
5224 }
5225 else
5226 {
5227 if ( v23 <= PLAYER_SKILL_DAGGER )
5228 goto LABEL_55;
5229 if ( v23 > PLAYER_SKILL_SPEAR )
5230 {
5231 if ( v23 == PLAYER_SKILL_MACE )
5232 {
5233 v28 = __OFSUB__(v26, 2);
5234 v27 = v26 - 2 < 0;
5235 goto LABEL_53;
5236 }
5237 LABEL_55: 5224 LABEL_55:
5238 v30 = v71 * (v25 & 0x3F); 5225 v30 = v71 * (v25 & 0x3F);
5239 return (int)((char *)v69 + v30); 5226 return (int)((char *)v69 + v30);
5240 } 5227 }
5241 v28 = __OFSUB__(v26, 3); 5228 v28 = __OFSUB__(v26, 3);
5242 v27 = v26 - 3 < 0; 5229 v27 = v26 - 3 < 0;
5243 } 5230 }
5244 LABEL_53: 5231 LABEL_53:
5245 if ( !(v27 ^ v28) ) 5232 if ( !(v27 ^ v28) )
5246 v71 = (ITEM_EQUIP_TYPE)1; 5233 v71 = (ITEM_EQUIP_TYPE)1;
5247 goto LABEL_55; 5234 goto LABEL_55;
5248 } 5235 }
5249 5236
5250 5237
5251 assert(false && "Unknown attribute!"); 5238 assert(false && "Unknown attribute!");
5252 return 0; 5239 return 0;
5253 } 5240 }
5254 5241
5255 //----- (00490109) -------------------------------------------------------- 5242 //----- (00490109) --------------------------------------------------------
5256 // faces are: 0 1 2 3 human males 5243 // faces are: 0 1 2 3 human males
5257 // 4 5 6 7 human females 5244 // 4 5 6 7 human females