# HG changeset patch # User Grumpy7 # Date 1378595853 -7200 # Node ID f8c15e45de7e35b81b5e02f1d9f2050b4b617cce # Parent a0cd6465ae0d53c86762aebb94d419f0ab80178e Player::IsUnarmed fixing condition diff -r a0cd6465ae0d -r f8c15e45de7e Player.cpp --- 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) --------------------------------------------------------