Mercurial > mm7
diff Player.cpp @ 1561:f8c15e45de7e
Player::IsUnarmed fixing condition
author | Grumpy7 |
---|---|
date | Sun, 08 Sep 2013 01:17:33 +0200 |
parents | a0cd6465ae0d |
children | 0311debb684c |
line wrap: on
line diff
--- a/Player.cpp Sun Sep 08 01:03:04 2013 +0200 +++ b/Player.cpp Sun Sep 08 01:17:33 2013 +0200 @@ -1905,14 +1905,12 @@ //----- (0048D4B3) -------------------------------------------------------- int Player::CalculateIncommingDamage( DAMAGE_TYPE dmg_type, int dmg ) - { - +{ int resist_value; // edi@8 int player_luck; // eax@21 signed int res_rand_divider; // ebx@2 int armor_skill; // eax@29 - if ( classType == PLAYER_CLASS_LICH && (dmg_type == CHARACTER_ATTRIBUTE_RESIST_MIND || dmg_type == CHARACTER_ATTRIBUTE_RESIST_BODY || dmg_type == CHARACTER_ATTRIBUTE_RESIST_SPIRIT )) //TODO: determine if spirit resistance should be handled by body res. modifier return 0; @@ -1977,8 +1975,8 @@ //----- (0048D676) -------------------------------------------------------- bool Player::IsUnarmed() { - return HasItemEquipped(EQUIP_MAIN_HAND) != 0 && - !(HasItemEquipped(EQUIP_OFF_HAND) == 0 && GetEquippedItemEquipType(EQUIP_OFF_HAND) != EQUIP_SHIELD); + return !HasItemEquipped(EQUIP_MAIN_HAND) && + (!HasItemEquipped(EQUIP_OFF_HAND) || GetEquippedItemEquipType(EQUIP_OFF_HAND) == EQUIP_SHIELD); } //----- (0048D6AA) --------------------------------------------------------