Mercurial > mm7
comparison Player.cpp @ 1116:6a4d654ef9fb
minor GetMaxMana cleanup
author | Grumpy7 |
---|---|
date | Wed, 29 May 2013 03:21:19 +0200 |
parents | 39eaa6b00141 |
children | 29a8defbad9e |
comparison
equal
deleted
inserted
replaced
1115:849b848ed871 | 1116:6a4d654ef9fb |
---|---|
4129 int v6; // eax@5 | 4129 int v6; // eax@5 |
4130 int v7; // esi@6 | 4130 int v7; // esi@6 |
4131 int v8; // esi@6 | 4131 int v8; // esi@6 |
4132 int v9; // esi@6 | 4132 int v9; // esi@6 |
4133 int result; // eax@7 | 4133 int result; // eax@7 |
4134 | 4134 |
4135 switch (classType) | 4135 switch (classType) |
4136 { | 4136 { |
4137 case 5u: | 4137 case PLAYER_CLASS_ROGUE: |
4138 case 6u: | 4138 case PLAYER_CLASS_SPY: |
4139 case 7u: | 4139 case PLAYER_CLASS_ASSASSIN: |
4140 case 0x10u: | 4140 case PLAYER_CLASS_ARCHER: |
4141 case 0x11u: | 4141 case PLAYER_CLASS_WARRIOR_MAGE: |
4142 case 0x12u: | 4142 case PLAYER_CLASS_MASTER_ARCHER: |
4143 case 0x13u: | 4143 case PLAYER_CLASS_SNIPER: |
4144 case 0x20u: | 4144 case PLAYER_CLASS_SORCERER: |
4145 case 0x21u: | 4145 case PLAYER_CLASS_WIZARD: |
4146 case 0x22u: | 4146 case PLAYER_CLASS_ARCHMAGE: |
4147 case 0x23u: | 4147 case PLAYER_CLASS_LICH: |
4148 v2 = GetActualIntelligence(); | 4148 v2 = GetActualIntelligence(); |
4149 v3 = GetParameterBonus(v2); | 4149 v3 = GetParameterBonus(v2); |
4150 goto LABEL_6; | 4150 break; |
4151 case 9u: | 4151 case PLAYER_CLASS_INITIATE: |
4152 case 0xAu: | 4152 case PLAYER_CLASS_MASTER: |
4153 case 0xBu: | 4153 case PLAYER_CLASS_NINJA: |
4154 case 0xCu: | 4154 case PLAYER_CLASS_PALADIN: |
4155 case 0xDu: | 4155 case PLAYER_CLASS_CRUSADER: |
4156 case 0xEu: | 4156 case PLAYER_CLASS_HERO: |
4157 case 0xFu: | 4157 case PLAYER_CLASS_VILLIAN: |
4158 case 0x18u: | 4158 case PLAYER_CLASS_CLERIC: |
4159 case 0x19u: | 4159 case PLAYER_CLASS_PRIEST: |
4160 case 0x1Au: | 4160 case PLAYER_CLASS_PRIEST_OF_SUN: |
4161 case 0x1Bu: | 4161 case PLAYER_CLASS_PRIEST_OF_MOON: |
4162 v2 = GetActualWillpower(); | 4162 v2 = GetActualWillpower(); |
4163 v3 = GetParameterBonus(v2); | 4163 v3 = GetParameterBonus(v2); |
4164 goto LABEL_6; | 4164 break; |
4165 case 0x15u: | 4165 case PLAYER_CLASS_HUNTER: |
4166 case 0x16u: | 4166 case PLAYER_CLASS_RANGER_LORD: |
4167 case 0x17u: | 4167 case PLAYER_CLASS_BOUNTY_HUNTER: |
4168 case 0x1Cu: | 4168 case PLAYER_CLASS_DRUID: |
4169 case 0x1Du: | 4169 case PLAYER_CLASS_GREAT_DRUID: |
4170 case 0x1Eu: | 4170 case PLAYER_CLASS_ARCH_DRUID: |
4171 case 0x1Fu: | 4171 case PLAYER_CLASS_WARLOCK: |
4172 v4 = GetActualWillpower(); | 4172 v4 = GetActualWillpower(); |
4173 v5 = GetParameterBonus(v4); | 4173 v5 = GetParameterBonus(v4); |
4174 v6 = GetActualIntelligence(); | 4174 v6 = GetActualIntelligence(); |
4175 v3 = GetParameterBonus(v6) + v5; | 4175 v3 = GetParameterBonus(v6) + v5; |
4176 LABEL_6: | |
4177 v7 = pBaseManaPerLevelByClass[classType] * (GetActualLevel() + v3); | |
4178 v8 = GetItemsBonus(CHARACTER_ATTRIBUTE_MANA, 0) + v7; | |
4179 v9 = uFullManaBonus | |
4180 + pBaseManaByClass[classType / 4] | |
4181 + GetSkillBonus(CHARACTER_ATTRIBUTE_MANA) | |
4182 + v8; | |
4183 if ( v9 < 1 ) | |
4184 goto LABEL_7; | |
4185 result = v9; | |
4186 break; | 4176 break; |
4187 default: | 4177 default: |
4188 LABEL_7: | 4178 return 0; |
4189 result = 0; | |
4190 break; | 4179 break; |
4191 } | 4180 } |
4192 return result; | 4181 v7 = pBaseManaPerLevelByClass[classType] * (GetActualLevel() + v3); |
4182 v8 = GetItemsBonus(CHARACTER_ATTRIBUTE_MANA, 0) + v7; | |
4183 v9 = uFullManaBonus | |
4184 + pBaseManaByClass[classType / 4] | |
4185 + GetSkillBonus(CHARACTER_ATTRIBUTE_MANA) | |
4186 + v8; | |
4187 return max(0,v9); | |
4193 } | 4188 } |
4194 | 4189 |
4195 //----- (0048E656) -------------------------------------------------------- | 4190 //----- (0048E656) -------------------------------------------------------- |
4196 int Player::GetBaseAC() | 4191 int Player::GetBaseAC() |
4197 { | 4192 { |